Ejemplo n.º 1
0
// called at the start of each level from HUD_init.  Use Hud_shield_init so we only init Shield_gauges[] once.
void hud_shield_level_init()
{
	int i;	

	hud_shield_hit_reset(1);	// reset for the player

	if ( Hud_shield_inited ) {
		return;
	}	

	for ( i = 0; i < MAX_SHIELD_ICONS; i++ ) {
		Shield_gauges[i].first_frame = -1;
		Shield_gauges[i].num_frames  = 0;
	}

	Hud_shield_inited = 1;

	if ( !Shield_mini_loaded ) {
		Shield_mini_gauge.first_frame = bm_load_animation(Shield_mini_fname[gr_screen.res], &Shield_mini_gauge.num_frames);
		if ( Shield_mini_gauge.first_frame == -1 ) {
			Warning(LOCATION, "Could not load in the HUD shield ani: Shield_mini_fname[gr_screen.res]\n");
			return;
		}
		Shield_mini_loaded = 1;
	}
}
Ejemplo n.º 2
0
// called at the start of each level from HUD_init.  Use Hud_shield_init so we only init Shield_gauges[] once.
void hud_shield_level_init()
{
	unsigned int i;
	hud_frames temp;

	hud_shield_hit_reset(Player_obj, 1);	// reset for the player

	if ( !Hud_shield_inited ) {
		for ( i = 0; i < Hud_shield_filenames.size(); i++ ) {
			Shield_gauges.push_back(temp);
			Shield_gauges.at(i).first_frame = -1;
			Shield_gauges.at(i).num_frames  = 0;
		}
		
		Hud_shield_inited = 1;
	}

	Shield_mini_gauge.first_frame = bm_load_animation("targhit1", &Shield_mini_gauge.num_frames);
	if ( Shield_mini_gauge.first_frame == -1 ) {
		Warning(LOCATION, "Could not load in the HUD shield ani: targhit1\n");
		return;
	}
	Shield_mini_loaded = 1;
}
Ejemplo n.º 3
0
// called at the start of each level from HUD_init.  Use Hud_shield_init so we only init Shield_gauges[] once.
void hud_shield_level_init()
{
	int i;

	hud_shield_hit_reset(1);	// reset for the player

	if (!Hud_shield_inited)
	{
		for (i = 0; i < MAX_SHIELD_ICONS; i++)
		{
			Shield_gauges[i].first_frame = -1;
			Shield_gauges[i].num_frames = 0;
		}

		Hud_shield_inited = 1;
	}

	//Shield_mini_gauge.first_frame = bm_load_animation(current_hud->Shield_mini_fname, &Shield_mini_gauge.num_frames);
	//if ( Shield_mini_gauge.first_frame == -1 ) {
	//	Warning(LOCATION, "Could not load in the HUD shield ani: Shield_mini_fname\n");
	//	return;
	//}
	//Shield_mini_loaded = 1;
}