本文整理汇总了C++中ZMap::SubmergeAmount方法的典型用法代码示例。如果您正苦于以下问题:C++ ZMap::SubmergeAmount方法的具体用法?C++ ZMap::SubmergeAmount怎么用?C++ ZMap::SubmergeAmount使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ZMap
的用法示例。
在下文中一共展示了ZMap::SubmergeAmount方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DoRender
void RLaser::DoRender(ZMap &the_map, SDL_Surface *dest, int shift_x, int shift_y)
{
int &x = loc.x;
int &y = loc.y;
ZSDL_Surface *base_surface;
SDL_Rect from_rect, to_rect;
int lx, ly;
if(owner != NULL_TEAM)
{
switch(mode)
{
case R_WALKING: base_surface = &walk[owner][direction][move_i]; break;
case R_STANDING: base_surface = &stand[owner][direction]; break;
case R_BEER: base_surface = &beer[owner][action_i]; break;
case R_CIGARETTE: base_surface = &cigarette[owner][action_i]; break;
case R_FULLSCAN: base_surface = &full_area_scan[owner][action_i]; break;
case R_HEADSTRETCH: base_surface = &head_stretch[owner][action_i]; break;
case R_PICKUP_UP_GRENADES: base_surface = &pickup_up[owner][action_i]; break;
case R_PICKUP_DOWN_GRENADES: base_surface = &pickup_down[owner][action_i]; break;
case R_ATTACKING:
if(this->CanThrowGrenades() || (m_attacked_object && m_attacked_object->AttackedOnlyByExplosives()))
base_surface = &throw_something[owner][direction][grenade_i];
else
base_surface = &fire[owner][direction][action_i];
break;
default: base_surface = &null_img;
}
}
else
base_surface = &null_img;
if(!base_surface) return;
submerge_amount = the_map.SubmergeAmount(loc.x+8,loc.y+8);
//if(the_map.GetBlitInfo(base_surface, x, y, from_rect, to_rect))
if(the_map.GetBlitInfo(x, y + submerge_amount, 16, 16 - submerge_amount, from_rect, to_rect))
{
to_rect.x += shift_x;
to_rect.y += shift_y;
base_surface->BlitHitSurface(&from_rect, &to_rect, NULL, do_hit_effect);
//ZSDL_BlitHitSurface( base_surface, &from_rect, dest, &to_rect, do_hit_effect);
}
do_hit_effect = false;
}