当前位置: 首页>>代码示例>>C++>>正文


C++ ZMap::RenderZSurface方法代码示例

本文整理汇总了C++中ZMap::RenderZSurface方法的典型用法代码示例。如果您正苦于以下问题:C++ ZMap::RenderZSurface方法的具体用法?C++ ZMap::RenderZSurface怎么用?C++ ZMap::RenderZSurface使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ZMap的用法示例。


在下文中一共展示了ZMap::RenderZSurface方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: DoRender

void EMissileCRockets::DoRender(ZMap &zmap, SDL_Surface *dest)
{
	SDL_Rect from_rect, to_rect;

	if(killme) return;

	zmap.RenderZSurface(&bullet_img, x, y, false, true);
	//if(zmap.GetBlitInfo(bullet_img, x, y, from_rect, to_rect))
	//	SDL_BlitSurface( bullet_img, &from_rect, dest, &to_rect);

	zmap.RenderZSurface(&bullet_img, x + other_x_shift, y + other_y_shift, false, true);
	//if(zmap.GetBlitInfo(bullet_img, x + other_x_shift, y + other_y_shift, from_rect, to_rect))
	//	SDL_BlitSurface( bullet_img, &from_rect, dest, &to_rect);
}
开发者ID:Nitaym,项目名称:zodengine,代码行数:14,代码来源:emissilecrockets.cpp

示例2: DoRender

void ELightInitFire::DoRender(ZMap &zmap/*, SDL_Surface *dest*/)
{
	//SDL_Rect from_rect, to_rect;

	if(killme) return;

	zmap.RenderZSurface(&render_img[render_i], x, y);
	//if(zmap.GetBlitInfo( render_img[render_i], x, y, from_rect, to_rect))
	//	SDL_BlitSurface( render_img[render_i], &from_rect, dest, &to_rect);
}
开发者ID:capehill,项目名称:zodengine,代码行数:10,代码来源:elightinitfire.cpp

示例3: DoRender

void EToughSmoke::DoRender(ZMap &zmap, SDL_Surface *dest)
{
	SDL_Rect from_rect, to_rect;

	if(killme) return;

	zmap.RenderZSurface(&render_img[render_i], x, y, false, true);
	//if(zmap.GetBlitInfo( render_img[render_i], x, y, from_rect, to_rect))
	//	SDL_BlitSurface( render_img[render_i], &from_rect, dest, &to_rect);
}
开发者ID:Nitaym,项目名称:zodengine,代码行数:10,代码来源:etoughsmoke.cpp

示例4: DoPreRender

void ETankSpark::DoPreRender(ZMap &zmap, SDL_Surface *dest)
{
	ZSDL_Surface *render_img;

	if(killme) return;

	render_img = &tank_spark[ni];

	if(!render_img) return;

	zmap.RenderZSurface(render_img, cx, cy, false, true);
}
开发者ID:Nitaym,项目名称:zodengine,代码行数:12,代码来源:etankspark.cpp

示例5: DoRender

void EDeath::DoRender(ZMap &zmap/*, SDL_Surface *dest*/)
{
	//SDL_Rect from_rect, to_rect;

	if(killme) return;

	zmap.RenderZSurface(wasted_img, x, y);
	//if(zmap.GetBlitInfo( wasted_img, x, y, from_rect, to_rect))
	//	SDL_BlitSurface( wasted_img, &from_rect, dest, &to_rect);

	for(vector<EStandard*>::iterator i=extra_effects.begin(); i!=extra_effects.end(); i++)
		(*i)->DoRender(zmap/*, dest*/);
}
开发者ID:capehill,项目名称:zodengine,代码行数:13,代码来源:edeath.cpp

示例6: DoRender

void GWProduction::DoRender(ZMap &the_map, SDL_Surface *dest)
{
	int lx, ly;
	SDL_Rect from_rect, to_rect;

	if(killme) return;

	if(!building_obj)
	{
		killme = true;
		return;
	}

	if(!is_expanded)
		the_map.RenderZSurface(&base_img, x, y);
	else
		the_map.RenderZSurface(&base_expanded_img, x, y);

	lx = x + 9;
	ly = y + 6;

	the_map.RenderZSurface(&name_label[type], lx, ly);
	//if(the_map.GetBlitInfo(name_label[type], x + lx, y + ly, from_rect, to_rect))
	//	SDL_BlitSurface( name_label[type], &from_rect, dest, &to_rect);

	lx = x + 64;
	ly = y + 19;

	the_map.RenderZSurface(&state_label[state][state_i], lx, ly);
	//if(the_map.GetBlitInfo( state_label[state][state_i], x + lx, y + ly, from_rect, to_rect))
	//	SDL_BlitSurface( state_label[state][state_i], &from_rect, dest, &to_rect);

	//buttons
	ok_button.DoRender(the_map, dest, x, y);
	cancel_button.DoRender(the_map, dest, x, y);
	place_button.DoRender(the_map, dest, x, y);
	small_plus_button.DoRender(the_map, dest, x, y);
	small_minus_button.DoRender(the_map, dest, x, y);
	queue_button.DoRender(the_map, dest, x, y);

	//queue_list buttons
	RenderQueueButtonList(the_map, dest);

	lx = x + 90;
	ly = y + 35;

	the_map.RenderZSurface(&show_time_img, lx, ly);
	//if(show_time_img)
	//	if(the_map.GetBlitInfo( show_time_img, x + 90, y + 35, from_rect, to_rect))
	//		SDL_BlitSurface( show_time_img, &from_rect, dest, &to_rect);

	if(health_percent_img.GetBaseSurface())
	{
		lx = x + 86 - (health_percent_img.GetBaseSurface()->w >> 1);
		ly = y + 6;

		the_map.RenderZSurface(&health_percent_img, lx, ly);
	}
开发者ID:Nitaym,项目名称:zodengine,代码行数:58,代码来源:gwproduction.cpp

示例7: DoRender

void EToughRocket::DoRender(ZMap &zmap, SDL_Surface *dest)
{
	SDL_Rect from_rect, to_rect;

	if(killme) return;

	zmap.RenderZSurface(&bullet_img[0], x, y, false, true);
	//if(zmap.GetBlitInfo(bullet_img[0], x, y, from_rect, to_rect))
	//	SDL_BlitSurface( bullet_img[bullet_i], &from_rect, dest, &to_rect);

	//always new
	bullet_i++;
	if(bullet_i) bullet_i = 0;
}
开发者ID:Nitaym,项目名称:zodengine,代码行数:14,代码来源:etoughrocket.cpp

示例8: DoRender

void EDeathSparks::DoRender(ZMap &zmap, SDL_Surface *dest)
{
	SDL_Rect from_rect, to_rect;
	//SDL_Surface *render_img;

	if(killme) return;

	//render_img = base_img[render_i].GetImage(size);
	base_img[render_i].SetSize(size);

	zmap.RenderZSurface(&base_img[render_i], x, y, false, true);
	//if(zmap.GetBlitInfo( render_img, x, y, from_rect, to_rect))
	//	SDL_BlitSurface( render_img, &from_rect, dest, &to_rect);
}
开发者ID:sebhd,项目名称:zod,代码行数:14,代码来源:edeathsparks.cpp

示例9: DoRender

void ORockets::DoRender(ZMap &the_map, SDL_Surface *dest, int shift_x, int shift_y)
{
	int &x = loc.x;
	int &y = loc.y;
	SDL_Rect from_rect, to_rect;

	the_map.RenderZSurface(&render_img, x, y);
	//if(the_map.GetBlitInfo( render_img, x, y, from_rect, to_rect))
	//{
	//	to_rect.x += shift_x;
	//	to_rect.y += shift_y;

	//	SDL_BlitSurface( render_img, &from_rect, dest, &to_rect);
	//}
}
开发者ID:sebhd,项目名称:zod,代码行数:15,代码来源:orockets.cpp

示例10: DoPreRender

void ETankSmoke::DoPreRender(ZMap &zmap, SDL_Surface *dest)
{
	ZSDL_Surface *render_img;

	if(killme) return;

	if(do_spark && ni<4)
		render_img = &tank_spark[direction][ni];
	else
		render_img = &tank_smoke[direction][ni];

	if(!render_img) return;
	if(!render_img->GetBaseSurface()) return;

	zmap.RenderZSurface(render_img, x, y);
}
开发者ID:Nitaym,项目名称:zodengine,代码行数:16,代码来源:etanksmoke.cpp

示例11: DoRender

void ERockParticle::DoRender(ZMap &zmap, SDL_Surface *dest)
{
	SDL_Rect from_rect, to_rect;
	//SDL_Surface *surface;

	if(killme) return;

	//surface = render_img[render_i].GetImage(size);
	render_img[render_i].SetSize(size);

	//if(!surface) return;

	zmap.RenderZSurface(&render_img[render_i], x, y, false, true);
	//if(zmap.GetBlitInfo( surface, x - (surface->w >> 1), y - (surface->h >> 1), from_rect, to_rect))
	//	SDL_BlitSurface( surface, &from_rect, dest, &to_rect);
}
开发者ID:sebhd,项目名称:zod,代码行数:16,代码来源:erockparticle.cpp

示例12: DoRender

void EMapObjectTurrent::DoRender(ZMap &zmap, SDL_Surface *dest)
{
	SDL_Rect from_rect, to_rect;
	//SDL_Surface *render_img;

	if(killme) return;

	//render_img = object_img[object].GetImage(angle, size);
	object_img[object].SetAngle(angle);
	object_img[object].SetSize(size);

	//if(!render_img) return;

	zmap.RenderZSurface(&object_img[object], x, y, false, true);
	//if(zmap.GetBlitInfo(render_img, x - (render_img->w >> 1), y - (render_img->h >> 1), from_rect, to_rect))
	//	SDL_BlitSurface( render_img, &from_rect, dest, &to_rect);
}
开发者ID:sebhd,项目名称:zod,代码行数:17,代码来源:emapobjectturrent.cpp

示例13: DoRender

void ERockTurrent::DoRender(ZMap &zmap, SDL_Surface *dest)
{
	SDL_Rect from_rect, to_rect;
	//SDL_Surface *surface;

	if(killme) return;

	//surface = debri_large_img[large_i][palette][render_i].GetImage(angle, size);
	debri_large_img[large_i][palette][render_i].SetAngle(angle);
	debri_large_img[large_i][palette][render_i].SetSize(size);

	//if(!surface) return;

	zmap.RenderZSurface(&debri_large_img[large_i][palette][render_i], x, y, false, true);
	//if(zmap.GetBlitInfo( surface, x - (surface->w >> 1), y - (surface->h >> 1), from_rect, to_rect))
	//	SDL_BlitSurface( surface, &from_rect, dest, &to_rect);
}
开发者ID:sebhd,项目名称:zod,代码行数:17,代码来源:erockturrent.cpp

示例14: DoRender

void ZVote::DoRender(ZMap &the_map)
{
	if(in_progress && vote_in_progress_img.GetBaseSurface())
	{
		int shift_x, shift_y, view_w, view_h;

		int x, y;

		the_map.GetViewShiftFull(shift_x, shift_y, view_w, view_h);

		x = view_w - vote_in_progress_img.GetBaseSurface()->w;
		//y = view_h - vote_in_progress_img.GetBaseSurface()->h;

		x -= 4;
		y = 4;

		x += shift_x;
		y += shift_y;

		vote_in_progress_img.SetAlpha(200);
		description_img.SetAlpha(200);
		have_img.SetAlpha(200);
		needed_img.SetAlpha(200);
		for_img.SetAlpha(200);
		against_img.SetAlpha(200);

		the_map.RenderZSurface(&vote_in_progress_img, x, y);

		//the_map.RenderZSurface(&description_img, x+7, y+37, false, true);
		the_map.RenderZSurface(&description_img, x+57, y+36+5, false, true);

		the_map.RenderZSurface(&have_img, x+57, y+46+7, false, true);
		the_map.RenderZSurface(&needed_img, x+57, y+57+7, false, true);
		the_map.RenderZSurface(&for_img, x+22, y+57+7, false, true);
		the_map.RenderZSurface(&against_img, x+91, y+57+7, false, true);
	}
}
开发者ID:Nitaym,项目名称:zodengine,代码行数:37,代码来源:zvote.cpp

示例15: DoRender

void GWFactoryList::DoRender(ZMap &the_map, SDL_Surface *dest)
{
	int shift_x, shift_y, view_w, view_h;
	int tx, ty;

	if(!show) return;
	if(!finished_init) return;
	if(!ols) return;
	if(our_team == NULL_TEAM) return;

	the_map.GetViewShiftFull(shift_x, shift_y, view_w, view_h);

	x = shift_x;
	y = shift_y + view_h;

	DetermineHeight(view_h);

	y -= height;

	//top
	the_map.RenderZSurface(&main_top_img, x, y);

	//entries
	DoRenderEntries(the_map, dest);

	//right
	{
		tx = x + (main_top_img.GetBaseSurface()->w - main_right_img.GetBaseSurface()->w);
		ty = y + main_top_img.GetBaseSurface()->h;

		while(ty < shift_y + view_h)
		{
			the_map.RenderZSurface(&main_right_img, tx, ty);
			ty += main_right_img.GetBaseSurface()->h;
		}
	}

	if(entry_list.size())
	{
		int scroll_top;
		int scroll_bottom;
		int scroll_missing_entries;

		//buttons
		up_button.SetOffsets(123, main_top_img.GetBaseSurface()->h + 2);
		up_button.DoRender(the_map, dest, x, y);

		down_button.SetOffsets(123, height - 11);
		down_button.DoRender(the_map, dest, x, y);

		//scrollbar
		scroll_top = main_top_img.GetBaseSurface()->h + 14;
		scroll_bottom = height - 14;
		scroll_bar.SetOffsets(123, scroll_top);
		scroll_bar.SetHeight(scroll_bottom - scroll_top);

		scroll_missing_entries = entry_list.size() - show_able_entries;
		if(scroll_missing_entries > 0)
			scroll_bar.SetPercentDown(1.0 * show_start_entry / scroll_missing_entries);
		else
			scroll_bar.SetPercentDown(0);
		scroll_bar.SetPercentViewable(1.0 * show_able_entries / entry_list.size());

		scroll_bar.DoRender(the_map, dest, x, y);
	}
}
开发者ID:Nitaym,项目名称:zodengine,代码行数:66,代码来源:gwfactory_list.cpp


注:本文中的ZMap::RenderZSurface方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。