2018-09-22 09:57 EDT


View Issue Details Jump to Notes ] Related Changesets ]
IDProjectCategoryView StatusLast Update
0003107FSSCPuser interfacepublic2014-09-24 22:07
ReporterYarn 
Assigned ToYarn 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
Platformx64OSWindows 7OS Version
Product Version3.7.1 
Target VersionFixed in Version3.7.2 
Summary0003107: Parts of the interface code assume a font size of 10
DescriptionBecause of what's described in the summary, if a font that's taller than the standard font is assigned to index 0, then the game may not provide enough vertical space for each line on certain screens, like the ship selection screen. Blue Planet 2 is a minor example of a mod where this occurs.
Additional InformationI have attached a patch that should fix every instance of an assumed font size of 10. I hope I didn't miss or mess up anything.
TagsNo tags attached.
Attached Files
  • patch file icon mantis3107.patch (47,825 bytes) 2014-09-13 21:29 -
    Index: code/freespace2/freespace.cpp
    ===================================================================
    --- code/freespace2/freespace.cpp	(revision 11075)
    +++ code/freespace2/freespace.cpp	(working copy)
    @@ -1200,6 +1200,8 @@
     		char filename[35];
     		int size;
     		int i;
    +		int line_height = gr_get_font_height() + 1;
    +
     	  	memblockinfo_sort();
     		for(i = 0; i < 30; i++)
     		{
    @@ -1217,10 +1219,10 @@
     				short_name++;
     
     			sprintf(mem_buffer,"%s:\t%d K", short_name, size);
    -			gr_string( 20, 220 + (i*10), mem_buffer, GR_RESIZE_MENU);
    +			gr_string( 20, 220 + (i*line_height), mem_buffer, GR_RESIZE_MENU);
     		}
     		sprintf(mem_buffer,"Total RAM:\t%d K", TotalRam / 1024);
    -		gr_string( 20, 230 + (i*10), mem_buffer, GR_RESIZE_MENU);
    +		gr_string( 20, 230 + (i*line_height), mem_buffer, GR_RESIZE_MENU);
     #endif	// _WIN32
     	}
     #endif	// !NDEBUG
    @@ -2126,6 +2128,7 @@
     void game_show_framerate()
     {	
     	float	cur_time;
    +	int line_height = gr_get_font_height() + 1;
     
     	cur_time = f2fl(timer_get_approx_seconds());
     	if (cur_time - Start_time > 30.0f) {
    @@ -2146,11 +2149,11 @@
     		for ( pss = GET_FIRST(&shipp->subsys_list); pss !=END_OF_LIST(&shipp->subsys_list); pss = GET_NEXT(pss) ) {
     			if (pss->system_info->type == SUBSYSTEM_TURRET) {
     				if(pss->turret_enemy_objnum == -1)
    -					gr_printf_no_resize(10, t*10, "Turret %d: <None>", t);
    +					gr_printf_no_resize(10, t*line_height, "Turret %d: <None>", t);
     				else if (Objects[pss->turret_enemy_objnum].type == OBJ_SHIP)
    -					gr_printf_no_resize(10, t*10, "Turret %d: %s", t, Ships[Objects[pss->turret_enemy_objnum].instance].ship_name);
    +					gr_printf_no_resize(10, t*line_height, "Turret %d: %s", t, Ships[Objects[pss->turret_enemy_objnum].instance].ship_name);
     				else
    -					gr_printf_no_resize(10, t*10, "Turret %d: <Object %d>", t, pss->turret_enemy_objnum);
    +					gr_printf_no_resize(10, t*line_height, "Turret %d: <Object %d>", t, pss->turret_enemy_objnum);
     
     				t++;
     			}
    @@ -2163,7 +2166,7 @@
     		gr_set_color_fast(&HUD_color_debug);
     
     		if (Cmdline_frame_profile) {
    -			gr_string(20, 110, profile_output, GR_RESIZE_NONE);
    +			gr_string(20, 100 + line_height, profile_output, GR_RESIZE_NONE);
     		}
     
     		if (Show_framerate) {
    @@ -2195,11 +2198,11 @@
     		else
     			sprintf(mem_buffer,"Using Physical: %d Meg",(Mem_starttime_phys - mem_stats.dwAvailPhys)/1024/1024);
     
    -		gr_string( 20, 120, mem_buffer, GR_RESIZE_NONE);
    +		gr_string( 20, 100 + (line_height * 2), mem_buffer, GR_RESIZE_NONE);
     		sprintf(mem_buffer,"Using Pagefile: %d Meg",(Mem_starttime_pagefile - mem_stats.dwAvailPageFile)/1024/1024);
    -		gr_string( 20, 130, mem_buffer, GR_RESIZE_NONE);
    +		gr_string( 20, 100 + (line_height * 3), mem_buffer, GR_RESIZE_NONE);
     		sprintf(mem_buffer,"Using Virtual:  %d Meg",(Mem_starttime_virtual - mem_stats.dwAvailVirtual)/1024/1024);
    -		gr_string( 20, 140, mem_buffer, GR_RESIZE_NONE);
    +		gr_string( 20, 100 + (line_height * 4), mem_buffer, GR_RESIZE_NONE);
     
     		if ( ((int)mem_stats.dwAvailPhys == -1) || ((int)mem_stats.dwTotalPhys == -1) )
     			sprintf(mem_buffer, "Physical Free: *** / *** (>4G)");
    @@ -2206,11 +2209,11 @@
     		else
     			sprintf(mem_buffer,"Physical Free: %d / %d Meg",mem_stats.dwAvailPhys/1024/1024, mem_stats.dwTotalPhys/1024/1024);
     
    -		gr_string( 20, 160, mem_buffer, GR_RESIZE_NONE);
    +		gr_string( 20, 100 + (line_height * 6), mem_buffer, GR_RESIZE_NONE);
     		sprintf(mem_buffer,"Pagefile Free: %d / %d Meg",mem_stats.dwAvailPageFile/1024/1024, mem_stats.dwTotalPageFile/1024/1024);
    -		gr_string( 20, 170, mem_buffer, GR_RESIZE_NONE);
    +		gr_string( 20, 100 + (line_height * 7), mem_buffer, GR_RESIZE_NONE);
     		sprintf(mem_buffer,"Virtual Free:  %d / %d Meg",mem_stats.dwAvailVirtual/1024/1024, mem_stats.dwTotalVirtual/1024/1024);
    -		gr_string( 20, 180, mem_buffer, GR_RESIZE_NONE);
    +		gr_string( 20, 100 + (line_height * 8), mem_buffer, GR_RESIZE_NONE);
     	}
     #endif
     
    @@ -2217,58 +2220,56 @@
     #ifndef NDEBUG
     	if ( Show_cpu == 1 ) {
     		
    -		int sx,sy,dy;
    +		int sx,sy;
     		sx = gr_screen.max_w - 154;
     		sy = 15;
    -		dy = gr_get_font_height() + 1;
     
     		gr_set_color_fast(&HUD_color_debug);
     
     		gr_printf_no_resize( sx, sy, NOX("DMA: %s"), transfer_text );
    -		sy += dy;
    +		sy += line_height;
     		gr_printf_no_resize( sx, sy, NOX("POLYP: %d"), modelstats_num_polys );
    -		sy += dy;
    +		sy += line_height;
     		gr_printf_no_resize( sx, sy, NOX("POLYD: %d"), modelstats_num_polys_drawn );
    -		sy += dy;
    +		sy += line_height;
     		gr_printf_no_resize( sx, sy, NOX("VERTS: %d"), modelstats_num_verts );
    -		sy += dy;
    +		sy += line_height;
     
     		{
     
     			extern int Num_pairs;		// Number of object pairs that were checked.
     			gr_printf_no_resize( sx, sy, NOX("PAIRS: %d"), Num_pairs );
    -			sy += dy;
    +			sy += line_height;
     
     			extern int Num_pairs_checked;	// What percent of object pairs were checked.
     			gr_printf_no_resize( sx, sy, NOX("FVI: %d"), Num_pairs_checked );
    -			sy += dy;
    +			sy += line_height;
     			Num_pairs_checked = 0;
     
     		}
     
     		gr_printf_no_resize( sx, sy, NOX("Snds: %d"), snd_num_playing() );
    -		sy += dy;
    +		sy += line_height;
     
     		if ( Timing_total > 0.01f )	{
     			gr_printf_no_resize(  sx, sy, NOX("CLEAR: %.0f%%"), Timing_clear*100.0f/Timing_total );
    -			sy += dy;
    +			sy += line_height;
     			gr_printf_no_resize( sx, sy, NOX("REND2D: %.0f%%"), Timing_render2*100.0f/Timing_total );
    -			sy += dy;
    +			sy += line_height;
     			gr_printf_no_resize( sx, sy, NOX("REND3D: %.0f%%"), Timing_render3*100.0f/Timing_total );
    -			sy += dy;
    +			sy += line_height;
     			gr_printf_no_resize( sx, sy, NOX("FLIP: %.0f%%"), Timing_flip*100.0f/Timing_total );
    -			sy += dy;
    +			sy += line_height;
     			gr_printf_no_resize( sx, sy, NOX("GAME: %.0f%%"), (Timing_total-(Timing_render2+Timing_render3+Timing_flip+Timing_clear))*100.0f/Timing_total );
    -			sy += dy;
    +			sy += line_height;
     		}
     	}
     	 	
     	if ( Show_mem  ) {
     
    -		int sx,sy,dy;
    +		int sx,sy;
     		sx = gr_screen.max_w - 154;
     		sy = 15;
    -		dy = gr_get_font_height() + 1;
     
     		gr_set_color_fast(&HUD_color_debug);
     
    @@ -2275,26 +2276,26 @@
     		{
     			extern int TotalRam;
     			gr_printf_no_resize( sx, sy, NOX("DYN: %d KB\n"), TotalRam/1024 );
    -			sy += dy;
    +			sy += line_height;
     		}	
     
     		{
     			extern int Model_ram;
     			gr_printf_no_resize( sx, sy, NOX("POF: %d KB\n"), Model_ram/1024 );
    -			sy += dy;
    +			sy += line_height;
     		}	
     
     		gr_printf_no_resize( sx, sy, NOX("%s: %d KB\n"), (Cmdline_cache_bitmaps) ? NOX("C-BMP") : NOX("BMP"), bm_texture_ram/1024 );
    -		sy += dy;
    +		sy += line_height;
     
     		gr_printf_no_resize( sx, sy, NOX("S-SRAM: %d KB\n"), Snd_sram/1024 );		// mem used to store game sound
    -		sy += dy;
    +		sy += line_height;
     
     		{
     			extern int GL_textures_in;
     			extern int GL_vertex_data_in;
     			gr_printf_no_resize( sx, sy, NOX("VRAM: %d KB\n"), (GL_textures_in + GL_vertex_data_in)/1024 );
    -			sy += dy;
    +			sy += line_height;
     		}
     	}
     
    @@ -2334,11 +2335,11 @@
     				short_name++;
     
     			sprintf(mem_buffer,"%s:\t%d K", short_name, size);
    -			gr_string( 20, 220 + (mi*10), mem_buffer, GR_RESIZE_NONE);
    +			gr_string( 20, 100 + (line_height * 12) + (mi*line_height), mem_buffer, GR_RESIZE_NONE);
     		}
     
     		sprintf(mem_buffer,"Total RAM:\t%d K", TotalRam / 1024);
    -		gr_string( 20, 230 + (mi*10), mem_buffer, GR_RESIZE_NONE);
    +		gr_string( 20, 100 + (line_height * 13) + (mi*line_height), mem_buffer, GR_RESIZE_NONE);
     	}
     #endif
     
    Index: code/hud/hudtarget.cpp
    ===================================================================
    --- code/hud/hudtarget.cpp	(revision 11075)
    +++ code/hud/hudtarget.cpp	(working copy)
    @@ -5550,12 +5550,13 @@
     
     	if(use_new_gauge)
     	{
    -		int currentx, currenty;
    +		int currentx, currenty, line_height;
     		int y;
     		int max_w = 100;
     		float remaining;
     		currentx = position[0] + 10;
     		currenty = position[1];
    +		line_height = gr_get_font_height() + 1;
     		if(gr_screen.max_w_unscaled == 640) {
     			max_w = 60;
     		}
    @@ -5566,7 +5567,7 @@
     		
     		//Draw name
     		renderString(currentx, currenty, "Energy");
    -		currenty += 10;
    +		currenty += line_height;
     
     		//Draw background
     		setGaugeColor(HUD_C_DIM);
    @@ -5606,7 +5607,7 @@
     			}
     
     			//Next 'line'
    -			currenty += 10;
    +			currenty += line_height;
     
     			//Draw the background for the gauge
     			setGaugeColor(HUD_C_DIM);
    Index: code/hud/hudtargetbox.cpp
    ===================================================================
    --- code/hud/hudtargetbox.cpp	(revision 11075)
    +++ code/hud/hudtargetbox.cpp	(working copy)
    @@ -1701,7 +1701,7 @@
     		if (n_linebreaks) {
     			p_line = strtok(outstr,linebreak);
     			while (p_line != NULL) {
    -				renderPrintf(subsys_name_pos_x, subsys_name_pos_y-h-(10*n_linebreaks), p_line);
    +				renderPrintf(subsys_name_pos_x, subsys_name_pos_y-h-((h+1)*n_linebreaks), p_line);
     				p_line = strtok(NULL,linebreak);
     				n_linebreaks--;
     			}
    Index: code/io/timer.cpp
    ===================================================================
    --- code/io/timer.cpp	(revision 11075)
    +++ code/io/timer.cpp	(working copy)
    @@ -436,16 +436,18 @@
     #else
     	int idx;
     
    +	int line_height = gr_get_font_height() + 1;
    +
     	gr_set_color_fast(&Color_bright_blue);
     
     	// total time
     	gr_printf_no_resize(x, y, "Total time %f\n", (float)timing_frame_total() / 1000000.0f);
    -	y += 10;
    +	y += line_height;
     
     	// each event percentage
     	for(idx=0; idx<Timing_event_count; idx++){
     		gr_printf_no_resize(x, y, "%s: %f\n", Timing_events[idx].name, timing_event_pct(Timing_events[idx].name));
    -		y += 10;
    +		y += line_height;
     	}
     #endif
     }
    Index: code/menuui/optionsmenumulti.cpp
    ===================================================================
    --- code/menuui/optionsmenumulti.cpp	(revision 11075)
    +++ code/menuui/optionsmenumulti.cpp	(working copy)
    @@ -642,6 +642,7 @@
     	int line_count;
     	int y_start;
     	int idx;
    +	int line_height;
     	
     	// if there is no timestamp, do nothing
     	if(Om_notify_stamp == -1){
    @@ -655,6 +656,7 @@
     	}
     
     	// otherwise display the string
    +	line_height = gr_get_font_height() + 1;
     	line_count = split_str(Om_notify_string, 600, n_chars, p_str, 3);	
     	y_start = OM_NOTIFY_Y;
     	gr_set_color_fast(&Color_bright);
    @@ -665,7 +667,7 @@
     		gr_get_string_size(&w,NULL,line);
     		gr_string((600 - w)/2,y_start,line,GR_RESIZE_MENU);
     
    -		y_start += 10;
    +		y_start += line_height;
     	}	
     }
     
    @@ -1203,6 +1205,7 @@
     {
     	int idx;
     	int y_start = Ip_list_coords[gr_screen.res][1];
    +	int line_height = gr_get_font_height() + 1;
     		
     	// get the # of items we should be displaying based upon the # of addresses and the starting display point
     	if(Om_ip_start >= Ip_list_max_display[gr_screen.res]){
    @@ -1220,7 +1223,7 @@
     		}
     
     		gr_printf_menu(Ip_list_coords[gr_screen.res][0], y_start, Om_ip_addrs[idx]);
    -		y_start += 10;
    +		y_start += line_height;
     	}
     }
     
    @@ -1255,7 +1258,7 @@
     	if(Om_ip_button.pressed()){
     		// determine which item he clicked on	
     		Om_ip_button.get_mouse_pos(NULL, &click_y);
    -		item = click_y / 10;
    +		item = click_y / (gr_get_font_height() + 1);
     			
     		// determine if there is an item in this location, and select it if so
     		if(item < Om_ip_disp_count){
    @@ -2055,10 +2058,12 @@
     	int selected_index,click_y;
     	char str[CALLSIGN_LEN+2];
     
    +	int line_height = gr_get_font_height() + 1;
    +
     	// check for mouse clicks
     	if(Om_vox_plist_button.pressed()){
     		Om_vox_plist_button.get_mouse_pos(NULL,&click_y);
    -		selected_index = (click_y / 10) + Om_vox_plist_start;
    +		selected_index = (click_y / line_height) + Om_vox_plist_start;
     
     		// if he clicked on a valid player, select him
     		if(Om_vox_players[selected_index] != NULL){
    @@ -2088,7 +2093,7 @@
     			gr_string(Om_vox_plist_coords[gr_screen.res][0], y_start, str, GR_RESIZE_MENU);
     
     			// increment the y index
    -			y_start += 10;
    +			y_start += line_height;
     
     			// increment the player count
     			p_count++;
    Index: code/missionui/chatbox.cpp
    ===================================================================
    --- code/missionui/chatbox.cpp	(revision 11075)
    +++ code/missionui/chatbox.cpp	(working copy)
    @@ -887,11 +887,12 @@
     
     void chatbox_render_chat_lines()
     {
    -   int started_at,player_num,count,ly;	
    +   int started_at,player_num,count,ly,line_height;	
     	
     	started_at = Brief_start_display_index;
     	count = 0;	
     	ly = Chatbox_begin_y;
    +	line_height = gr_get_font_height() + 1;
     	while((count < Chatbox_max_lines) && (count < Num_brief_chat_lines)){	
     		// determine what player this chat line came from, and set the appropriate text color
     		player_num = Brief_chat_lines[started_at][0];	   		
    @@ -942,7 +943,7 @@
     
     		// increment the count and line position
     		count++;		
    -		ly += 10;
    +		ly += line_height;
     		
     		// increment the started at index
     		started_at = Brief_chat_next_index[started_at];
    Index: code/missionui/missionshipchoice.cpp
    ===================================================================
    --- code/missionui/missionshipchoice.cpp	(revision 11075)
    +++ code/missionui/missionshipchoice.cpp	(working copy)
    @@ -917,7 +917,7 @@
     // blit any active ship information text
     void ship_select_blit_ship_info()
     {
    -	int y_start;
    +	int y_start, line_height;
     	ship_info *sip;
     	char str[100];
     	color *header = &Color_white;
    @@ -935,12 +935,14 @@
     	// starting line
     	y_start = Ship_info_coords[gr_screen.res][SHIP_SELECT_Y_COORD];
     
    +	line_height = gr_get_font_height() + 1;
    +
     	memset(str,0,100);
     
     	// blit the ship class (name)
     	gr_set_color_fast(header);
     	gr_string(Ship_info_coords[gr_screen.res][SHIP_SELECT_X_COORD], y_start, XSTR("Class",739), GR_RESIZE_MENU);
    -	y_start += 10;
    +	y_start += line_height;
     	if(strlen((sip->alt_name[0]) ? sip->alt_name : sip->name)){
     		gr_set_color_fast(text);
     
    @@ -951,12 +953,12 @@
     
     		gr_string(Ship_info_coords[gr_screen.res][SHIP_SELECT_X_COORD]+4, y_start, temp, GR_RESIZE_MENU);
     	}
    -	y_start += 10;
    +	y_start += line_height;
     
     	// blit the ship type
     	gr_set_color_fast(header);
     	gr_string(Ship_info_coords[gr_screen.res][SHIP_SELECT_X_COORD], y_start, XSTR("Type",740), GR_RESIZE_MENU);
    -	y_start += 10;
    +	y_start += line_height;
     	gr_set_color_fast(text);
     	if((sip->type_str != NULL) && strlen(sip->type_str)){
     		gr_string(Ship_info_coords[gr_screen.res][SHIP_SELECT_X_COORD]+4, y_start, sip->type_str, GR_RESIZE_MENU);
    @@ -966,12 +968,12 @@
     		ship_get_type(str, sip);
     		gr_string(Ship_info_coords[gr_screen.res][SHIP_SELECT_X_COORD]+4, y_start, str, GR_RESIZE_MENU);
     	}
    -	y_start+=10;
    +	y_start+=line_height;
     
     	// blit the ship length
     	gr_set_color_fast(header);
     	gr_string(Ship_info_coords[gr_screen.res][SHIP_SELECT_X_COORD], y_start, XSTR("Length",741), GR_RESIZE_MENU);
    -	y_start += 10;
    +	y_start += line_height;
     	gr_set_color_fast(text);
     	if((sip->ship_length != NULL) && strlen(sip->ship_length)){
     		if (Lcl_gr || Lcl_pl) {
    @@ -994,21 +996,21 @@
     	{
     		gr_string(Ship_info_coords[gr_screen.res][SHIP_SELECT_X_COORD]+4, y_start, "Unknown", GR_RESIZE_MENU);
     	}
    -	y_start += 10;
    +	y_start += line_height;
     
     	// blit the max velocity
     	gr_set_color_fast(header);
     	gr_string(Ship_info_coords[gr_screen.res][SHIP_SELECT_X_COORD], y_start, XSTR("Max Velocity",742), GR_RESIZE_MENU);	
    -	y_start += 10;
    +	y_start += line_height;
     	sprintf(str, XSTR("%d m/s",743),fl2i((float)sip->max_vel.xyz.z * Hud_speed_multiplier));
     	gr_set_color_fast(text);
     	gr_string(Ship_info_coords[gr_screen.res][SHIP_SELECT_X_COORD]+4, y_start,str, GR_RESIZE_MENU);	
    -	y_start += 10;
    +	y_start += line_height;
     
     	// blit the maneuverability
     	gr_set_color_fast(header);
     	gr_string(Ship_info_coords[gr_screen.res][SHIP_SELECT_X_COORD], y_start, XSTR("Maneuverability",744), GR_RESIZE_MENU);
    -	y_start += 10;
    +	y_start += line_height;
     	gr_set_color_fast(text);
     	if((sip->maneuverability_str != NULL) && strlen(sip->maneuverability_str)){
     		gr_string(Ship_info_coords[gr_screen.res][SHIP_SELECT_X_COORD]+4, y_start, sip->maneuverability_str, GR_RESIZE_MENU);
    @@ -1037,12 +1039,12 @@
     	{
     		gr_string(Ship_info_coords[gr_screen.res][SHIP_SELECT_X_COORD]+4, y_start, "Unknown", GR_RESIZE_MENU);
     	}
    -	y_start += 10;
    +	y_start += line_height;
     
     	// blit the armor
     	gr_set_color_fast(header);
     	gr_string(Ship_info_coords[gr_screen.res][SHIP_SELECT_X_COORD], y_start, XSTR("Armor",745), GR_RESIZE_MENU);
    -	y_start += 10;
    +	y_start += line_height;
     	gr_set_color_fast(text);
     	if((sip->armor_str != NULL) && strlen(sip->armor_str)){
     		gr_string(Ship_info_coords[gr_screen.res][SHIP_SELECT_X_COORD]+4, y_start, sip->armor_str, GR_RESIZE_MENU);
    @@ -1076,7 +1078,7 @@
     
     		gr_string(Ship_info_coords[gr_screen.res][SHIP_SELECT_X_COORD]+4, y_start,str, GR_RESIZE_MENU);
     	}
    -	y_start += 10;
    +	y_start += line_height;
     
     	// blit the gun mounts 
     	gr_set_color_fast(header);
    @@ -1083,7 +1085,7 @@
     	if((sip->gun_mounts != NULL) && strlen(sip->gun_mounts))
     	{
     		gr_string(Ship_info_coords[gr_screen.res][SHIP_SELECT_X_COORD], y_start, XSTR("Gun Mounts",746), GR_RESIZE_MENU);
    -		y_start += 10;
    +		y_start += line_height;
     		gr_set_color_fast(text);
     		gr_string(Ship_info_coords[gr_screen.res][SHIP_SELECT_X_COORD]+4, y_start, sip->gun_mounts, GR_RESIZE_MENU);
     	}
    @@ -1091,7 +1093,7 @@
     	{
     		//Calculate the number of gun mounts
     		gr_string(Ship_info_coords[gr_screen.res][SHIP_SELECT_X_COORD], y_start, XSTR("Gun Mounts",746), GR_RESIZE_MENU);
    -		y_start += 10;
    +		y_start += line_height;
     		gr_set_color_fast(text);
     		int i;
     		int sum = 0;
    @@ -1109,7 +1111,7 @@
     	else
     	{
     		gr_string(Ship_info_coords[gr_screen.res][SHIP_SELECT_X_COORD], y_start, XSTR("Gun Banks",1626), GR_RESIZE_MENU);
    -		y_start += 10;
    +		y_start += line_height;
     		gr_set_color_fast(text);
     		if(sip->num_primary_banks)
     		{
    @@ -1121,12 +1123,12 @@
     		}
     		gr_string(Ship_info_coords[gr_screen.res][SHIP_SELECT_X_COORD]+4, y_start, str, GR_RESIZE_MENU);
     	}
    -	y_start += 10;
    +	y_start += line_height;
     
     	// blit the missile banks
     	gr_set_color_fast(header);
     	gr_string(Ship_info_coords[gr_screen.res][SHIP_SELECT_X_COORD], y_start, XSTR("Missile Banks",747), GR_RESIZE_MENU);
    -	y_start += 10;
    +	y_start += line_height;
     	gr_set_color_fast(text);
     	if((sip->missile_banks != NULL) && strlen(sip->missile_banks)){
     		gr_string(Ship_info_coords[gr_screen.res][SHIP_SELECT_X_COORD]+4, y_start, sip->missile_banks, GR_RESIZE_MENU);
    @@ -1143,7 +1145,7 @@
     		}
     		gr_string(Ship_info_coords[gr_screen.res][SHIP_SELECT_X_COORD]+4, y_start, str, GR_RESIZE_MENU);
     	}
    -	y_start += 10;
    +	y_start += line_height;
     
     	if(ShipSelectModelNum >= 0)
     	{
    @@ -1180,11 +1182,11 @@
     		{
     			gr_set_color_fast(header);
     			gr_string(Ship_info_coords[gr_screen.res][SHIP_SELECT_X_COORD], y_start, XSTR("Turrets",1627), GR_RESIZE_MENU);
    -			y_start += 10;
    +			y_start += line_height;
     			gr_set_color_fast(text);
     			sprintf(str, "%d", num_turrets);
     			gr_string(Ship_info_coords[gr_screen.res][SHIP_SELECT_X_COORD]+4, y_start, str, GR_RESIZE_MENU);
    -			y_start += 10;
    +			y_start += line_height;
     		}
     	}
     
    @@ -1191,7 +1193,7 @@
     	// blit the manufacturer
     	gr_set_color_fast(header);
     	gr_string(Ship_info_coords[gr_screen.res][SHIP_SELECT_X_COORD], y_start, XSTR("Manufacturer",748), GR_RESIZE_MENU);
    -	y_start += 10;
    +	y_start += line_height;
     	gr_set_color_fast(text);
     	if((sip->manufacturer_str != NULL) && strlen(sip->manufacturer_str)){
     		gr_string(Ship_info_coords[gr_screen.res][SHIP_SELECT_X_COORD]+4, y_start, sip->manufacturer_str, GR_RESIZE_MENU);
    @@ -1200,7 +1202,7 @@
     	{
     		gr_string(Ship_info_coords[gr_screen.res][SHIP_SELECT_X_COORD]+4, y_start, Species_info[sip->species].species_name, GR_RESIZE_MENU);
     	}
    -	y_start += 10;
    +	y_start += line_height;
     
     	// blit the _short_ text description, if it exists
     	// split the text info up	
    @@ -1210,7 +1212,7 @@
     
     	gr_set_color_fast(header);
     	gr_string(Ship_info_coords[gr_screen.res][SHIP_SELECT_X_COORD], y_start, XSTR("Description",1571), GR_RESIZE_MENU);
    -	y_start += 10;
    +	y_start += line_height;
     
     	Assert(strlen(sip->desc));
     
    @@ -1262,7 +1264,7 @@
     	gr_set_color_fast(text);
     	for(int idx=0;idx<Ship_select_ship_info_line_count;idx++){
     		gr_string(Ship_info_coords[gr_screen.res][SHIP_SELECT_X_COORD]+4, y_start, Ship_select_ship_info_lines[idx], GR_RESIZE_MENU);
    -		y_start += 10;
    +		y_start += line_height;
     	}
     	
     }
    Index: code/missionui/missionweaponchoice.cpp
    ===================================================================
    --- code/missionui/missionweaponchoice.cpp	(revision 11075)
    +++ code/missionui/missionweaponchoice.cpp	(working copy)
    @@ -2258,6 +2258,8 @@
     	int *weapon_desc_coords;
     	int *weapon_title_coords;
     
    +	int line_height = gr_get_font_height() + 1;
    +
     	// retrieve the correct set of text coordinates
     	if (Game_mode & GM_MULTIPLAYER) {
     		weapon_desc_coords = Wl_new_weapon_desc_coords_multi[gr_screen.res];
    @@ -2286,12 +2288,12 @@
     
     				// draw the strings
     				gr_set_color_fast(&Color_white);			
    -				gr_string(weapon_title_coords[0], weapon_title_coords[1]+(10*i), Weapon_desc_lines[i], GR_RESIZE_MENU);
    +				gr_string(weapon_title_coords[0], weapon_title_coords[1]+(line_height*i), Weapon_desc_lines[i], GR_RESIZE_MENU);
     
     				// draw the bright letters
     				gr_set_color_fast(&Color_bright_white);
     				gr_get_string_size(&w, &h, Weapon_desc_lines[i], curr_len);
    -				gr_printf_menu(weapon_title_coords[0]+w, weapon_title_coords[1]+(10*i), "%c", bright_char[i]);
    +				gr_printf_menu(weapon_title_coords[0]+w, weapon_title_coords[1]+(line_height*i), "%c", bright_char[i]);
     
     				// restore the bright char to the string
     				Weapon_desc_lines[i][bright_char_index] = bright_char[i];
    @@ -2299,7 +2301,7 @@
     			} else {
     				// draw the string
     				gr_set_color_fast(&Color_white);
    -				gr_string(weapon_title_coords[0], weapon_title_coords[1]+(10*i), Weapon_desc_lines[i], GR_RESIZE_MENU);
    +				gr_string(weapon_title_coords[0], weapon_title_coords[1]+(line_height*i), Weapon_desc_lines[i], GR_RESIZE_MENU);
     			}
     		}
     
    @@ -2314,12 +2316,12 @@
     
     				// draw the string
     				gr_set_color_fast(&Color_white);
    -				gr_string(weapon_desc_coords[0], weapon_desc_coords[1]+(10*(i-2)), Weapon_desc_lines[i], GR_RESIZE_MENU);
    +				gr_string(weapon_desc_coords[0], weapon_desc_coords[1]+(line_height*(i-2)), Weapon_desc_lines[i], GR_RESIZE_MENU);
     
     				// draw the bright letters
     				gr_set_color_fast(&Color_bright_white);
     				gr_get_string_size(&w, &h, Weapon_desc_lines[i], curr_len);
    -				gr_printf_menu(weapon_desc_coords[0]+w, weapon_desc_coords[1]+(10*(i-2)), "%c", bright_char[i]);
    +				gr_printf_menu(weapon_desc_coords[0]+w, weapon_desc_coords[1]+(line_height*(i-2)), "%c", bright_char[i]);
     
     				// restore the bright char to the string
     				Weapon_desc_lines[i][bright_char_index] = bright_char[i];
    @@ -2327,7 +2329,7 @@
     			} else {
     				// draw the string
     				gr_set_color_fast(&Color_white);
    -				gr_string(weapon_desc_coords[0], weapon_desc_coords[1]+(10*(i-2)), Weapon_desc_lines[i], GR_RESIZE_MENU);
    +				gr_string(weapon_desc_coords[0], weapon_desc_coords[1]+(line_height*(i-2)), Weapon_desc_lines[i], GR_RESIZE_MENU);
     			}
     		}
     
    @@ -2344,11 +2346,11 @@
     		// FIXME - change to use a for loop 
     		gr_set_color_fast(&Color_white);
     		gr_string(weapon_title_coords[0], weapon_title_coords[1], Weapon_desc_lines[0], GR_RESIZE_MENU);
    -		gr_string(weapon_title_coords[0], weapon_title_coords[1] + 10, Weapon_desc_lines[1], GR_RESIZE_MENU);
    +		gr_string(weapon_title_coords[0], weapon_title_coords[1] + line_height, Weapon_desc_lines[1], GR_RESIZE_MENU);
     		gr_string(weapon_desc_coords[0], weapon_desc_coords[1], Weapon_desc_lines[2], GR_RESIZE_MENU);
    -		gr_string(weapon_desc_coords[0], weapon_desc_coords[1] + 10, Weapon_desc_lines[3], GR_RESIZE_MENU);
    -		gr_string(weapon_desc_coords[0], weapon_desc_coords[1] + 20, Weapon_desc_lines[4], GR_RESIZE_MENU);
    -		gr_string(weapon_desc_coords[0], weapon_desc_coords[1] + 30, Weapon_desc_lines[5], GR_RESIZE_MENU);
    +		gr_string(weapon_desc_coords[0], weapon_desc_coords[1] + line_height, Weapon_desc_lines[3], GR_RESIZE_MENU);
    +		gr_string(weapon_desc_coords[0], weapon_desc_coords[1] + line_height * 2, Weapon_desc_lines[4], GR_RESIZE_MENU);
    +		gr_string(weapon_desc_coords[0], weapon_desc_coords[1] + line_height * 3, Weapon_desc_lines[5], GR_RESIZE_MENU);
     	}
     }
     
    Index: code/network/multi.cpp
    ===================================================================
    --- code/network/multi.cpp	(revision 11075)
    +++ code/network/multi.cpp	(working copy)
    @@ -1793,6 +1793,7 @@
     {
     	int sx = gr_screen.max_w - 200;
     	int sy = 20;
    +	int dy = gr_get_font_height() + 1;
     	int idx;
     
     	// not multiplayer
    @@ -1814,30 +1815,30 @@
     
     	// server or client
     	if(MULTIPLAYER_MASTER){
    -		gr_string(sx, sy, "SERVER", GR_RESIZE_NONE); sy += 10;
    +		gr_string(sx, sy, "SERVER", GR_RESIZE_NONE); sy += dy;
     
     		for(idx=0; idx<MAX_PLAYERS; idx++){
     			if(MULTI_CONNECTED(Net_players[idx]) && (Net_player != &Net_players[idx]) && (Net_players[idx].m_player != NULL)){
     				if(Net_players[idx].sv_last_pl < 0){
     					gr_printf_no_resize(sx, sy, "%s: %d, %d pl", Net_players[idx].m_player->callsign, Net_players[idx].sv_bytes_sent, 0);
    -					sy += 10;
    +					sy += dy;
     				} else {
     					gr_printf_no_resize(sx, sy, "%s: %d, %d pl", Net_players[idx].m_player->callsign, Net_players[idx].sv_bytes_sent, Net_players[idx].sv_last_pl);
    -					sy += 10;
    +					sy += dy;
     				}
     			}
     		}
     	} else {
    -		gr_string(sx, sy, "CLIENT", GR_RESIZE_NONE); sy += 10;
    +		gr_string(sx, sy, "CLIENT", GR_RESIZE_NONE); sy += dy;
     
     		// display PL
     		if(Net_player != NULL){
     			if(Net_player->cl_last_pl < 0){
     				gr_printf_no_resize(sx, sy, "PL: %d %d pl\n", Net_player->cl_bytes_recvd, 0);
    -				sy += 10;
    +				sy += dy;
     			} else {
     				gr_printf_no_resize(sx, sy, "PL: %d %d pl\n", Net_player->cl_bytes_recvd, Net_player->cl_last_pl);
    -				sy += 10;
    +				sy += dy;
     			}
     		}
     	}
    Index: code/network/multi_dogfight.cpp
    ===================================================================
    --- code/network/multi_dogfight.cpp	(revision 11075)
    +++ code/network/multi_dogfight.cpp	(working copy)
    @@ -387,6 +387,7 @@
     	int idx, s_idx, str_len;
     	int cx, cy;
     	char squashed_string[CALLSIGN_LEN+1] = "";
    +	int dy = gr_get_font_height() + 1;
     
     	// max width of an individual item, and the text that can be in that item
     	float max_item_width = ((float)Multi_df_display_coords[gr_screen.res][2] - 40.0f) / (float)(Multi_df_score_count + 1);
    @@ -398,7 +399,7 @@
     
     	// start x for the side bar
     	int side_x_start = Multi_df_display_coords[gr_screen.res][0];
    -	int side_y_start = Multi_df_display_coords[gr_screen.res][1] + 10;
    +	int side_y_start = Multi_df_display_coords[gr_screen.res][1] + dy;
     
     	// draw the top bar
     	cx = top_x_start;
    @@ -474,7 +475,7 @@
     		gr_get_string_size(&str_len, NULL, squashed_string);
     		gr_string(Multi_df_display_coords[gr_screen.res][0] + Multi_df_display_coords[gr_screen.res][2] - (MULTI_DF_TOTAL_ADJUST + str_len), cy, squashed_string, GR_RESIZE_MENU);
     
    -		cy += 10;
    +		cy += dy;
     	}
     }
     
    Index: code/network/multi_ingame.cpp
    ===================================================================
    --- code/network/multi_ingame.cpp	(revision 11075)
    +++ code/network/multi_ingame.cpp	(working copy)
    @@ -845,6 +845,8 @@
     	int icon_num,idx;
     	int y_spacing;
     	ship_weapon *wp;
    +
    +	int line_height = gr_get_font_height() + 1;
     	
     	// blit the ship name itself
     	gr_set_color_fast(&Color_normal);
    @@ -861,15 +863,15 @@
     	wp = &Ships[objp->instance].weapons;
     	
     	// blit the ship's primary weapons	
    -	y_spacing = (Mi_spacing[gr_screen.res] - (wp->num_primary_banks * 10)) / 2;
    +	y_spacing = (Mi_spacing[gr_screen.res] - (wp->num_primary_banks * line_height)) / 2;
     	for(idx=0;idx<wp->num_primary_banks;idx++){
    -		gr_string(Mi_primary_field[gr_screen.res][MI_FIELD_X], y_start + y_spacing + (idx * 10), Weapon_info[wp->primary_bank_weapons[idx]].name, GR_RESIZE_MENU);
    +		gr_string(Mi_primary_field[gr_screen.res][MI_FIELD_X], y_start + y_spacing + (idx * line_height), Weapon_info[wp->primary_bank_weapons[idx]].name, GR_RESIZE_MENU);
     	}
     
     	// blit the ship's secondary weapons	
    -	y_spacing = (Mi_spacing[gr_screen.res] - (wp->num_secondary_banks * 10)) / 2;
    +	y_spacing = (Mi_spacing[gr_screen.res] - (wp->num_secondary_banks * line_height)) / 2;
     	for(idx=0;idx<wp->num_secondary_banks;idx++){
    -		gr_string(Mi_secondary_field[gr_screen.res][MI_FIELD_X], y_start + y_spacing + (idx * 10), Weapon_info[wp->secondary_bank_weapons[idx]].name, GR_RESIZE_MENU);
    +		gr_string(Mi_secondary_field[gr_screen.res][MI_FIELD_X], y_start + y_spacing + (idx * line_height), Weapon_info[wp->secondary_bank_weapons[idx]].name, GR_RESIZE_MENU);
     	}	
     
     	// blit the shield/hull integrity
    Index: code/network/multi_pxo.cpp
    ===================================================================
    --- code/network/multi_pxo.cpp	(revision 11075)
    +++ code/network/multi_pxo.cpp	(working copy)
    @@ -2424,7 +2424,7 @@
     		Multi_pxo_channel_button.get_mouse_pos(NULL,&my);
     
     		// index from the top
    -		item_index = my / 10;
    +		item_index = my / (gr_get_font_height() + 1);
     
     		// select the item if possible
     		if((item_index + Multi_pxo_channel_start_index) < Multi_pxo_channel_count){
    @@ -2512,6 +2512,7 @@
     	char chan_servers[15];
     	int user_w,server_w;
     	int disp_count,y_start;
    +	int line_height = gr_get_font_height() + 1;
     
     	// blit as many channels as we can
     	disp_count = 0;
    @@ -2558,7 +2559,7 @@
     
     		// increment the displayed count
     		disp_count++;
    -		y_start += 10;		
    +		y_start += line_height;		
     
     		// next item
     		moveup = moveup->next;
    @@ -2906,7 +2907,7 @@
     		Multi_pxo_player_button.get_mouse_pos(NULL,&my);
     
     		// index from the top
    -		item_index = my / 10;
    +		item_index = my / (gr_get_font_height() + 1);
     
     		// select the item if possible
     		lookup = Multi_pxo_player_start;
    @@ -2940,6 +2941,7 @@
     	player_list *moveup;
     	char player_name[MAX_PXO_TEXT_LEN];
     	int disp_count,y_start;
    +	int line_height = gr_get_font_height() + 1;
     
     	// blit as many channels as we can
     	disp_count = 0;
    @@ -2967,7 +2969,7 @@
     
     		// increment the displayed count
     		disp_count++;
    -		y_start += 10;
    +		y_start += line_height;
     
     		// next item
     		moveup = moveup->next;
    @@ -3246,7 +3248,7 @@
      */
     void multi_pxo_chat_blit()
     {
    -	int y_start;
    +	int y_start, line_height;
     	int disp_count,token_width;
     	char piece[100];
     	char title[MAX_PXO_TEXT_LEN];
    @@ -3273,6 +3275,7 @@
     	moveup = Multi_pxo_chat_start;	
     	disp_count = 0;
     	y_start = Multi_pxo_chat_coords[gr_screen.res][1];
    +	line_height = gr_get_font_height() + 1;
     	while((moveup != NULL) && (moveup != Multi_pxo_chat_add) && (disp_count < (Multi_pxo_max_chat_display[gr_screen.res]))){
     		switch(moveup->mode){
     		// if this is text from the server, display it all "bright"
    @@ -3325,7 +3328,7 @@
     		// next chat line
     		moveup = moveup->next;
     		disp_count++;
    -		y_start += 10;
    +		y_start += line_height;
     	}
     
     	if ((moveup != Multi_pxo_chat_add) && (moveup != NULL)) {
    @@ -4964,11 +4967,12 @@
     {
     	int idx;
     	int start_pos;
    -	int y_start;
    +	int y_start, line_height;
     	help_page *cp = &Multi_pxo_help_pages[Multi_pxo_help_cur];
     	
     	// blit each line
     	y_start = Multi_pxo_help_coords[gr_screen.res][1];
    +	line_height = gr_get_font_height() + 1;
     	for(idx=0;idx<cp->num_lines;idx++){
     		// if the first symbol is "@", highlight the line
     		if(cp->text[idx][0] == '@'){
    @@ -4983,7 +4987,7 @@
     		gr_string(Multi_pxo_help_coords[gr_screen.res][0], y_start, cp->text[idx] + start_pos, GR_RESIZE_MENU);
     
     		// increment the y location
    -		y_start += 10;
    +		y_start += line_height;
     	}
     }
     
    Index: code/network/multi_rate.cpp
    ===================================================================
    --- code/network/multi_rate.cpp	(revision 11075)
    +++ code/network/multi_rate.cpp	(working copy)
    @@ -187,6 +187,7 @@
     {	
     	int idx;
     	mr_info *m;
    +	int line_height = gr_get_font_height() + 1;
     
     	// sanity checks
     	if((np_index < 0) || (np_index >= MAX_RATE_PLAYERS)){
    @@ -205,7 +206,7 @@
     		// display
     		gr_set_color_fast(&Color_red);
     		gr_printf_no_resize(x, y, "%s %d (%d/s) (%f/f)", m->type, m->total_bytes, (int)m->avg_second, m->avg_frame);
    -		y += 10;
    +		y += line_height;
     	}
     }
     
    Index: code/network/multiteamselect.cpp
    ===================================================================
    --- code/network/multiteamselect.cpp	(revision 11075)
    +++ code/network/multiteamselect.cpp	(working copy)
    @@ -1478,7 +1478,7 @@
     // blit any active ship information text
     void multi_ts_blit_ship_info()
     {
    -	int y_start;
    +	int y_start, line_height;
     	ship_info *sip;
     	char str[100];
     
    @@ -1493,6 +1493,8 @@
     	// starting line
     	y_start = Multi_ts_ship_info_coords[gr_screen.res][MULTI_TS_Y_COORD];
     
    +	line_height = gr_get_font_height() + 1;
    +
     	memset(str,0,100);
     
     	// blit the ship class (name)
    @@ -1508,7 +1510,7 @@
     
     		gr_string(Multi_ts_ship_info_coords[gr_screen.res][MULTI_TS_X_COORD] + 150, y_start, temp, GR_RESIZE_MENU);
     	}
    -	y_start += 10;
    +	y_start += line_height;
     
     	// blit the ship type
     	gr_set_color_fast(&Color_normal);
    @@ -1517,7 +1519,7 @@
     		gr_set_color_fast(&Color_bright);
     		gr_string(Multi_ts_ship_info_coords[gr_screen.res][MULTI_TS_X_COORD] + 150, y_start, sip->type_str, GR_RESIZE_MENU);
     	}
    -	y_start += 10;
    +	y_start += line_height;
     
     	// blit the ship length
     	gr_set_color_fast(&Color_normal);
    @@ -1526,7 +1528,7 @@
     		gr_set_color_fast(&Color_bright);
     		gr_string(Multi_ts_ship_info_coords[gr_screen.res][MULTI_TS_X_COORD] + 150, y_start, sip->ship_length, GR_RESIZE_MENU);
     	}
    -	y_start += 10;
    +	y_start += line_height;
     
     	// blit the max velocity
     	gr_set_color_fast(&Color_normal);
    @@ -1534,7 +1536,7 @@
     	sprintf(str, XSTR("%d m/s",743),(int)sip->max_vel.xyz.z);
     	gr_set_color_fast(&Color_bright);
     	gr_string(Multi_ts_ship_info_coords[gr_screen.res][MULTI_TS_X_COORD] + 150, y_start,str,GR_RESIZE_MENU);	
    -	y_start += 10;
    +	y_start += line_height;
     
     	// blit the maneuverability
     	gr_set_color_fast(&Color_normal);
    @@ -1543,7 +1545,7 @@
     		gr_set_color_fast(&Color_bright);
     		gr_string(Multi_ts_ship_info_coords[gr_screen.res][MULTI_TS_X_COORD] + 150, y_start, sip->maneuverability_str, GR_RESIZE_MENU);
     	}
    -	y_start += 10;
    +	y_start += line_height;
     
     	// blit the armor
     	gr_set_color_fast(&Color_normal);
    @@ -1552,7 +1554,7 @@
     		gr_set_color_fast(&Color_bright);
     		gr_string(Multi_ts_ship_info_coords[gr_screen.res][MULTI_TS_X_COORD] + 150, y_start, sip->armor_str, GR_RESIZE_MENU);
     	}
    -	y_start += 10;
    +	y_start += line_height;
     
     	// blit the gun mounts 
     	gr_set_color_fast(&Color_normal);
    @@ -1561,7 +1563,7 @@
     		gr_set_color_fast(&Color_bright);
     		gr_string(Multi_ts_ship_info_coords[gr_screen.res][MULTI_TS_X_COORD] + 150, y_start, sip->gun_mounts, GR_RESIZE_MENU);
     	}
    -	y_start += 10;
    +	y_start += line_height;
     
     	// blit the missile banke
     	gr_set_color_fast(&Color_normal);
    @@ -1570,7 +1572,7 @@
     		gr_set_color_fast(&Color_bright);
     		gr_string(Multi_ts_ship_info_coords[gr_screen.res][MULTI_TS_X_COORD] + 150, y_start, sip->missile_banks, GR_RESIZE_MENU);
     	}
    -	y_start += 10;
    +	y_start += line_height;
     
     	// blit the manufacturer
     	gr_set_color_fast(&Color_normal);
    @@ -1579,7 +1581,7 @@
     		gr_set_color_fast(&Color_bright);
     		gr_string(Multi_ts_ship_info_coords[gr_screen.res][MULTI_TS_X_COORD] + 150, y_start, sip->manufacturer_str, GR_RESIZE_MENU);
     	}
    -	y_start += 10;
    +	y_start += line_height;
     
     	// blit the _short_ text description
     	
    @@ -1587,7 +1589,7 @@
     	gr_set_color_fast(&Color_normal);
     	for(int idx=0;idx<Multi_ts_ship_info_line_count;idx++){
     		gr_string(Multi_ts_ship_info_coords[gr_screen.res][MULTI_TS_X_COORD], y_start, Multi_ts_ship_info_lines[idx], GR_RESIZE_MENU);
    -		y_start += 10;
    +		y_start += line_height;
     	}
     	
     }
    Index: code/network/multiui.cpp
    ===================================================================
    --- code/network/multiui.cpp	(revision 11075)
    +++ code/network/multiui.cpp	(working copy)
    @@ -1302,6 +1302,7 @@
     	int w,h;
     	int con_type;
     	int y_start = Mj_list_y[gr_screen.res];
    +	int line_height = gr_get_font_height() + 1;
     	int count = 0;
     	
     	if(moveup != NULL){
    @@ -1382,7 +1383,7 @@
     			gr_string(Mj_players_coords[gr_screen.res][MJ_X_COORD] + (Mj_players_coords[gr_screen.res][MJ_W_COORD] - w)/2,y_start,str,GR_RESIZE_MENU);			
     
     			count++;
    -			y_start += 10;
    +			y_start += line_height;
     			moveup = moveup->next;
     		} while((moveup != Active_game_head) && (count < Mj_max_game_items[gr_screen.res]));
     	}
    @@ -1603,6 +1604,8 @@
     
     void multi_join_process_select()
     {
    +	int line_height = gr_get_font_height() + 1;
    +
     	// if we don't have anything selected and there are items on the list - select the first one
     	if((Multi_join_list_selected == -1) && (Active_game_count > 0)){
     		Multi_join_list_selected = 0;
    @@ -1622,7 +1625,7 @@
     	else if(Multi_join_select_button.pressed() && (Active_game_count > 0)){		 
     		int y,item;		
     		Multi_join_select_button.get_mouse_pos(NULL,&y);
    -		item = y / 10;
    +		item = y / line_height;
     		if(item + Multi_join_list_start < Active_game_count){		
     			gamesnd_play_iface(SND_IFACE_MOUSE_CLICK);
     
    @@ -1642,7 +1645,7 @@
     	if(Multi_join_select_button.double_clicked()){			
     		int y,item;		
     		Multi_join_select_button.get_mouse_pos(NULL,&y);
    -		item = y / 10;
    +		item = y / line_height;
     		if(item == Multi_join_list_selected){		
     			multi_join_button_pressed(MJ_ACCEPT);
     		}
    @@ -2850,7 +2853,7 @@
     
     void multi_sg_rank_display_stuff()
     {
    -	int y,idx,count;
    +	int y,line_height,idx,count;
     	char rank_name[40];
     
     	// if he doesn't have either of the rank flags set, then ignore this
    @@ -2860,6 +2863,7 @@
     		
     	// display the list of ranks
     	y = Msg_rank_list_coords[gr_screen.res][MSG_Y_COORD];
    +	line_height = gr_get_font_height() + 1;
     	idx = Multi_sg_rank_start;
     	count = 0;
     	while((count < NUM_RANKS) && (count < Multi_sg_rank_max_display[gr_screen.res]) && (idx < NUM_RANKS)){	
    @@ -2875,7 +2879,7 @@
     		gr_string(Msg_rank_list_coords[gr_screen.res][MSG_X_COORD],y,rank_name,GR_RESIZE_MENU);
     
     		// increment stuff
    -		y+=10;
    +		y+=line_height;
     		idx++;
     		count++;
     	}
    @@ -2901,7 +2905,7 @@
     	if(Multi_sg_rank_button.pressed()){		 
     		int y,item;		
     		Multi_sg_rank_button.get_mouse_pos(NULL,&y);
    -		item = y / 10;
    +		item = y / (gr_get_font_height() + 1);
     		
     		if(item + Multi_sg_rank_start < NUM_RANKS){		
     			// evaluate whether this rank is valid for the guy to pick		
    @@ -4236,6 +4240,7 @@
     	int idx;		
     	char str[CALLSIGN_LEN+5];
     	int y_start = Mc_players_coords[gr_screen.res][MC_Y_COORD];	
    +	int line_height = gr_get_font_height() + 1;
     	int total_offset;
     
     	// display all the players	
    @@ -4276,7 +4281,7 @@
     			gr_force_fit_string(str,CALLSIGN_LEN,Mc_players_coords[gr_screen.res][MC_W_COORD] - total_offset);
     			gr_string(Mc_players_coords[gr_screen.res][MC_X_COORD] + total_offset,y_start,str,GR_RESIZE_MENU);
     
    -			y_start += 10;			
    +			y_start += line_height;			
     		}
     	}		
     }
    @@ -4286,6 +4291,7 @@
     	int idx;		
     	char str[CALLSIGN_LEN+1];
     	int y_start = Mc_players_coords[gr_screen.res][MC_Y_COORD];	
    +	int line_height = gr_get_font_height() + 1;
     	int total_offset;
     
     	// display all the red players first
    @@ -4350,7 +4356,7 @@
     
     			// display him in the correct half of the list depending on his team
     			gr_string(Mc_players_coords[gr_screen.res][MC_X_COORD] + total_offset,y_start,str,GR_RESIZE_MENU);
    -			y_start += 10;
    +			y_start += line_height;
     		}
     	}	
     	
    @@ -4416,7 +4422,7 @@
     
     			// display him in the correct half of the list depending on his team
     			gr_string(Mc_players_coords[gr_screen.res][MC_X_COORD] + total_offset,y_start,str,GR_RESIZE_MENU);
    -			y_start += 10;
    +			y_start += line_height;
     		}
     	}			
     }
    @@ -4623,6 +4629,7 @@
     {
     	int idx;
     	int start_index,stop_index;
    +	int line_height = gr_get_font_height() + 1;
     	char selected_name[255];
     
     	// bail early if there aren't any selectable items
    @@ -4634,7 +4641,7 @@
     	if(Multi_create_list_select_button.pressed()){		 
     		int y,item;				
     		Multi_create_list_select_button.get_mouse_pos(NULL,&y);
    -		item = (y / 10);
    +		item = (y / line_height);
     
     		// make sure we are selectedin valid indices
     		if((item < Multi_create_list_max_display[gr_screen.res]) && (item >= 0)){					
    @@ -4704,7 +4711,7 @@
     		gr_force_fit_string(selected_name, 255, Mc_column3_w[gr_screen.res]);
     		gr_string(Mc_mission_fname_x[gr_screen.res], y_start, selected_name, GR_RESIZE_MENU);
     
    -		y_start += 10;
    +		y_start += line_height;
     		count++;
     	}
     }
    @@ -5077,7 +5084,7 @@
     	Multi_create_player_select_button.get_mouse_pos(NULL,&y);
     
     	// select things a little differently if we're in team vs. team or non-team vs. team mode			
    -	nth = (y / 10);			
    +	nth = (y / (gr_get_font_height() + 1));			
     	if(Netgame.type_flags & NG_TYPE_TEAM){
     		int player_index = -1;
     
    @@ -6993,6 +7000,7 @@
     	int idx;		
     	char str[CALLSIGN_LEN+1];
     	int y_start = Mjw_players_coords[gr_screen.res][MJW_Y_COORD];	
    +	int line_height = gr_get_font_height() + 1;
     	int total_offset;
     
     	// display all the players	
    @@ -7033,7 +7041,7 @@
     			gr_force_fit_string(str,CALLSIGN_LEN,Mjw_players_coords[gr_screen.res][MJW_W_COORD] - total_offset);
     			gr_string(Mjw_players_coords[gr_screen.res][MJW_X_COORD] + total_offset,y_start,str,GR_RESIZE_MENU);
     
    -			y_start += 10;			
    +			y_start += line_height;			
     		}
     	}		
     }
    @@ -7043,6 +7051,7 @@
     	int idx;		
     	char str[CALLSIGN_LEN+1];
     	int y_start = Mjw_players_coords[gr_screen.res][MJW_Y_COORD];	
    +	int line_height = gr_get_font_height() + 1;
     	int total_offset;
     
     	// always blit the proper team button based on _my_ team status
    @@ -7105,7 +7114,7 @@
     
     			// display him in the correct half of the list depending on his team
     			gr_string(Mjw_players_coords[gr_screen.res][MJW_X_COORD] + total_offset,y_start,str,GR_RESIZE_MENU);
    -			y_start += 10;
    +			y_start += line_height;
     		}
     	}	
     	
    @@ -7165,7 +7174,7 @@
     
     			// display him in the correct half of the list depending on his team
     			gr_string(Mjw_players_coords[gr_screen.res][MJW_X_COORD] + total_offset,y_start,str,GR_RESIZE_MENU);
    -			y_start += 10;
    +			y_start += line_height;
     		}
     	}			
     }
    @@ -7183,7 +7192,7 @@
     	Multi_jw_plist_select_button.get_mouse_pos(NULL,&y);
     
     	// select things a little differently if we're in team vs. team or non-team vs. team mode			
    -	nth = (y / 10);			
    +	nth = (y / (gr_get_font_height() + 1));			
     	if(Netgame.type_flags & NG_TYPE_TEAM){
     		int player_index = -1;
     
    @@ -8341,6 +8350,7 @@
     void multi_sync_display_name(const char *name,int index,int np_index)
     {
     	char fit[CALLSIGN_LEN];	
    +	int line_height = gr_get_font_height() + 1;
     	
     	// make sure the string actually fits
     	strcpy_s(fit,name);
    @@ -8357,7 +8367,7 @@
     		}
     
     		// blit the string
    -		gr_string(Ms_status_coords[gr_screen.res][0] + Ms_cd_icon_offset[gr_screen.res] + Ms_team_icon_offset[gr_screen.res], Ms_status_coords[gr_screen.res][MS_Y_COORD] + (index * 10),fit,GR_RESIZE_MENU);
    +		gr_string(Ms_status_coords[gr_screen.res][0] + Ms_cd_icon_offset[gr_screen.res] + Ms_team_icon_offset[gr_screen.res], Ms_status_coords[gr_screen.res][MS_Y_COORD] + (index * line_height),fit,GR_RESIZE_MENU);
     
     		// blit his team icon 
     		// team 0		
    @@ -8366,7 +8376,7 @@
     			if(Net_players[np_index].flags & NETINFO_FLAG_TEAM_CAPTAIN){				
     				if(Multi_common_icons[MICON_TEAM0_SELECT] != -1){
     					gr_set_bitmap(Multi_common_icons[MICON_TEAM0_SELECT]);
    -					gr_bitmap(Ms_status_coords[gr_screen.res][MS_X_COORD] + Ms_cd_icon_offset[gr_screen.res], Ms_status_coords[gr_screen.res][MS_Y_COORD] + (index * 10) - 2, GR_RESIZE_MENU);
    +					gr_bitmap(Ms_status_coords[gr_screen.res][MS_X_COORD] + Ms_cd_icon_offset[gr_screen.res], Ms_status_coords[gr_screen.res][MS_Y_COORD] + (index * line_height) - 2, GR_RESIZE_MENU);
     				} 
     			}
     			// normal team member icon
    @@ -8373,7 +8383,7 @@
     			else {
     				if(Multi_common_icons[MICON_TEAM0] != -1){
     					gr_set_bitmap(Multi_common_icons[MICON_TEAM0]);
    -					gr_bitmap(Ms_status_coords[gr_screen.res][MS_X_COORD] + Ms_cd_icon_offset[gr_screen.res], Ms_status_coords[gr_screen.res][MS_Y_COORD] + (index * 10) - 2, GR_RESIZE_MENU);
    +					gr_bitmap(Ms_status_coords[gr_screen.res][MS_X_COORD] + Ms_cd_icon_offset[gr_screen.res], Ms_status_coords[gr_screen.res][MS_Y_COORD] + (index * line_height) - 2, GR_RESIZE_MENU);
     				}
     			}
     		}
    @@ -8383,7 +8393,7 @@
     			if(Net_players[np_index].flags & NETINFO_FLAG_TEAM_CAPTAIN){
     				if(Multi_common_icons[MICON_TEAM1_SELECT] != -1){
     					gr_set_bitmap(Multi_common_icons[MICON_TEAM1_SELECT]);
    -					gr_bitmap(Ms_status_coords[gr_screen.res][MS_X_COORD] + Ms_cd_icon_offset[gr_screen.res], Ms_status_coords[gr_screen.res][MS_Y_COORD] + (index * 10) - 2, GR_RESIZE_MENU);
    +					gr_bitmap(Ms_status_coords[gr_screen.res][MS_X_COORD] + Ms_cd_icon_offset[gr_screen.res], Ms_status_coords[gr_screen.res][MS_Y_COORD] + (index * line_height) - 2, GR_RESIZE_MENU);
     				}
     			}
     			// normal team member icon
    @@ -8390,7 +8400,7 @@
     			else {
     				if(Multi_common_icons[MICON_TEAM1] != -1){
     					gr_set_bitmap(Multi_common_icons[MICON_TEAM1]);
    -					gr_bitmap(Ms_status_coords[gr_screen.res][MS_X_COORD] + Ms_cd_icon_offset[gr_screen.res], Ms_status_coords[gr_screen.res][MS_Y_COORD] + (index * 10) - 2, GR_RESIZE_MENU);
    +					gr_bitmap(Ms_status_coords[gr_screen.res][MS_X_COORD] + Ms_cd_icon_offset[gr_screen.res], Ms_status_coords[gr_screen.res][MS_Y_COORD] + (index * line_height) - 2, GR_RESIZE_MENU);
     				}
     			}
     		}		
    @@ -8405,13 +8415,13 @@
     		}
     
     		// blit the string
    -		gr_string(Ms_status_coords[gr_screen.res][MS_X_COORD] + Ms_cd_icon_offset[gr_screen.res], Ms_status_coords[gr_screen.res][MS_Y_COORD] + (index * 10),fit,GR_RESIZE_MENU);
    +		gr_string(Ms_status_coords[gr_screen.res][MS_X_COORD] + Ms_cd_icon_offset[gr_screen.res], Ms_status_coords[gr_screen.res][MS_Y_COORD] + (index * line_height),fit,GR_RESIZE_MENU);
     	}
     
     	// maybe blit his CD status icon
     	if((Net_players[np_index].flags & NETINFO_FLAG_HAS_CD) && (Multi_common_icons[MICON_CD] != -1)){
     		gr_set_bitmap(Multi_common_icons[MICON_CD]);
    -		gr_bitmap(Ms_status_coords[gr_screen.res][MS_X_COORD], Ms_status_coords[gr_screen.res][MS_Y_COORD] + (index * 10), GR_RESIZE_MENU);
    +		gr_bitmap(Ms_status_coords[gr_screen.res][MS_X_COORD], Ms_status_coords[gr_screen.res][MS_Y_COORD] + (index * line_height), GR_RESIZE_MENU);
     	}
     }
     
    @@ -8423,7 +8433,7 @@
     	strcpy_s(fit, status);
     	gr_force_fit_string(fit, 250, Ms_status2_coords[gr_screen.res][MS_W_COORD] - 20);
     	gr_set_color_fast(&Color_bright);	
    -	gr_string(Ms_status2_coords[gr_screen.res][MS_X_COORD], Ms_status2_coords[gr_screen.res][MS_Y_COORD] + (index * 10), fit, GR_RESIZE_MENU);		
    +	gr_string(Ms_status2_coords[gr_screen.res][MS_X_COORD], Ms_status2_coords[gr_screen.res][MS_Y_COORD] + (index * (gr_get_font_height() + 1)), fit, GR_RESIZE_MENU);		
     }
     
     void multi_sync_force_start_pre()
    @@ -8566,7 +8576,7 @@
     		Multi_sync_plist_button.get_mouse_pos(NULL,&my);
     
     		// get the index of the item selected
    -		select_index = my / 10;
    +		select_index = my / (gr_get_font_height() + 1);
     
     		// if the index is greater than the current # connections, do nothing
     		if(select_index > (multi_num_connections() - 1)){
    Index: code/sound/sound.cpp
    ===================================================================
    --- code/sound/sound.cpp	(revision 11075)
    +++ code/sound/sound.cpp	(working copy)
    @@ -253,11 +253,12 @@
     	}
     
     	// spew info
    +	int line_height = gr_get_font_height() + 1;
     	gr_set_color_fast(&Color_normal);
     	gr_printf_no_resize(30, 100, "Game sounds : %d\n", game_sounds);
    -	gr_printf_no_resize(30, 110, "Interface sounds : %d\n", interface_sounds);
    -	gr_printf_no_resize(30, 120, "Message sounds : %d\n", message_sounds);
    -	gr_printf_no_resize(30, 130, "Total sounds : %d\n", game_sounds + interface_sounds + message_sounds);
    +	gr_printf_no_resize(30, 100 + line_height, "Interface sounds : %d\n", interface_sounds);
    +	gr_printf_no_resize(30, 100 + (line_height * 2), "Message sounds : %d\n", message_sounds);
    +	gr_printf_no_resize(30, 100 + (line_height * 3), "Total sounds : %d\n", game_sounds + interface_sounds + message_sounds);
     }
     
     // ---------------------------------------------------------------------------------------
    
    patch file icon mantis3107.patch (47,825 bytes) 2014-09-13 21:29 +

-Relationships
+Relationships

-Notes

~0016297

Goober5000 (administrator)

Looks good. Patch committed.
+Notes

+Related Changesets

-Issue History
Date Modified Username Field Change
2014-09-13 21:28 Yarn New Issue
2014-09-13 21:28 Yarn Status new => assigned
2014-09-13 21:28 Yarn Assigned To => Yarn
2014-09-13 21:29 Yarn File Added: mantis3107.patch
2014-09-13 21:29 Yarn Status assigned => code review
2014-09-24 22:07 Goober5000 Changeset attached => fs2open trunk r11082
2014-09-24 22:07 Goober5000 Note Added: 0016297
2014-09-24 22:07 Goober5000 Status code review => resolved
2014-09-24 22:07 Goober5000 Resolution open => fixed
2014-09-24 22:07 Goober5000 Fixed in Version => 3.7.2
+Issue History