Example #1
0
// ----------------------------------------------------------------------
// hud_display_escort()
//
// Display the data on ships in the escort list
void hud_display_escort()
{
	int i = 0;

	if (!Show_escort_view)
	{
		return;
	}

	if (!Num_escort_ships)
	{
		return;
	}

	// hud_set_default_color();
	hud_set_gauge_color(HUD_ESCORT_VIEW);

	// draw the top of the escort view
	hud_aabitmap(Escort_gauges[0].first_frame, current_hud->Escort_coords[0], current_hud->Escort_coords[1]);
	gr_string(current_hud->Escort_htext_coords[0], current_hud->Escort_htext_coords[1], current_hud->Escort_htext);

	int x = current_hud->Escort_coords[0] + current_hud->Escort_list[0];
	int y = current_hud->Escort_coords[1] + current_hud->Escort_list[1];

	//This is temporary
	Num_escort_ships--;
	i = 0;

	if (Num_escort_ships)
	{
		for (; i < Num_escort_ships; i++)
		{
			if (i != 0)
			{
				x += current_hud->Escort_entry[0];
				y += current_hud->Escort_entry[1];
			}
			hud_aabitmap(Escort_gauges[1].first_frame, x, y);

			//Now we just show the ships info
			hud_escort_show_icon(x, y, i);
		}

		//Increment for last entry
		x += current_hud->Escort_entry_last[0];
		y += current_hud->Escort_entry_last[1];
	}

	//Back to right #
	Num_escort_ships++;

	//Show the last escort entry
	hud_aabitmap(Escort_gauges[2].first_frame, x, y);
	hud_escort_show_icon(x, y, i);
}
Example #2
0
// ----------------------------------------------------------------------
// hud_display_escort()
//
// Display the data on ships in the escort list
void hud_display_escort()
{
#ifndef NEW_HUD
	int	i = 0;

	if ( !Show_escort_view ) {
		return;
	}

	if ( !Num_escort_ships ) {
		return;
	}

	// hud_set_default_color();
	hud_set_gauge_color(HUD_ESCORT_VIEW);

	// draw the top of the escort view
	GR_AABITMAP(Escort_gauges[0].first_frame, current_hud->Escort_coords[0], current_hud->Escort_coords[1]);	
	gr_string(current_hud->Escort_htext_coords[0], current_hud->Escort_htext_coords[1], current_hud->Escort_htext);

	int x = current_hud->Escort_coords[0] + current_hud->Escort_list[0];
	int y = current_hud->Escort_coords[1] + current_hud->Escort_list[1];

	//This is temporary
	Num_escort_ships--;
	i=0;

	if(Num_escort_ships)
	{
		for(; i < Num_escort_ships; i++)
		{
			if(i != 0)
			{
				x += current_hud->Escort_entry[0];
				y += current_hud->Escort_entry[1];
			}
			GR_AABITMAP(Escort_gauges[1].first_frame, x, y);
			
			//Now we just show the ships info
			hud_escort_show_icon(x, y, i);
		}

		//Increment for last entry
		x += current_hud->Escort_entry_last[0];
		y += current_hud->Escort_entry_last[1];
	}

	//Back to right #
	Num_escort_ships++;

	//Show the last escort entry
	GR_AABITMAP(Escort_gauges[2].first_frame, x, y);
	hud_escort_show_icon(x, y, i);

/*
	if ( Num_escort_ships >= 2 ) {
		GR_AABITMAP(Escort_gauges[1].first_frame, Escort_coords[gr_screen.res][1][0], Escort_coords[gr_screen.res][1][1]);		
	}

	if ( Num_escort_ships >= 3 ) {
		GR_AABITMAP(Escort_gauges[1].first_frame, Escort_coords[gr_screen.res][2][0], Escort_coords[gr_screen.res][2][1]);		
	}
	
	// draw bottom of box
	GR_AABITMAP(Escort_gauges[2].first_frame, Escort_coords[gr_screen.res][3][0], Escort_coords[gr_screen.res][Num_escort_ships][1]);

	// multiplayer dogfight
	if((Game_mode & GM_MULTIPLAYER) && (Netgame.type_flags & NG_TYPE_DOGFIGHT)){
		// draw the escort ship data
		for ( i = 0; i < Num_escort_ships; i++ ) {
			// oops. only show top 3
			if(i > 2){
				break;
			}

			// draw
			hud_escort_show_icon_dogfight(i);
		}
	}
	// everything else
	else {
		// draw the escort ship data
		for ( i = 0; i < Num_escort_ships; i++ ) {
			objp = &Objects[Escort_ships[i].objnum];
			hud_escort_show_icon(i, objp);
		}
	}*/
#endif
}