View Issue Details

IDProjectCategoryView StatusLast Update
0002839FSSCPHUDpublic2013-12-02 00:57
ReporterYarn Assigned ToYarn  
PrioritynormalSeveritytweakReproducibilityN/A
Status resolvedResolutionfixed 
Platformx64OSWindows 7 
Product Version3.6.19 
Fixed in Version3.6.19 
Summary0002839: HUD element position fix [patch]
DescriptionThe current built-in HUD positions certain elements differently from retail. In some cases, this causes elements to overlap, especially in the 640x480 HUD.

Two patches are attached. The first patch (hudfix.patch) fixes many of these changes, including all of those that cause overlapping. The second patch (hudfix2.patch) has all the changes of the first patch, but it also adjusts the positions of the escort and weapons gauges so that no overlapping occurs if the player's ship has three primary and four secondary weapons.
TagsNo tags attached.

Activities

Yarn

2013-04-07 20:31

developer  

hudfix.patch (3,601 bytes)   
Index: code/hud/hudparse.cpp
===================================================================
--- code/hud/hudparse.cpp	(revision 9624)
+++ code/hud/hudparse.cpp	(working copy)
@@ -1836,12 +1836,12 @@
 		header_text_offsets[0] = 3;
 		header_text_offsets[1] = 2;
 		list_start_offsets[0] = 0;
-		list_start_offsets[1] = 12;
+		list_start_offsets[1] = 13;
 		entry_h = 11;
 		entry_stagger_w = 0;
 		ship_name_offsets[0] = 3;
 		ship_name_offsets[1] = 0;
-		ship_integrity_offsets[0] = 128;
+		ship_integrity_offsets[0] = 118;
 		ship_integrity_offsets[1] = 0;
 		ship_status_offsets[0] = -12;
 		ship_status_offsets[1] = 0;
@@ -2601,10 +2601,10 @@
 			throttle_h = 50;
 			throttle_w = 49;
 			throttle_aburn_h = 17;
-			max_speed_offset[0] = 19;
-			max_speed_offset[1] = 10;
-			zero_speed_offset[0] = 35;
-			zero_speed_offset[1] = 59;
+			max_speed_offset[0] = 14;
+			max_speed_offset[1] = 14;
+			zero_speed_offset[0] = 33;
+			zero_speed_offset[1] = 63;
 			orbit_center_offset[0] = 103;
 			orbit_center_offset[1] = -1;
 			orbit_radius = 104;
@@ -2620,10 +2620,10 @@
 			throttle_h = 80;
 			throttle_w = 78;
 			throttle_aburn_h = 27;
-			max_speed_offset[0] = 30;
-			max_speed_offset[1] = 16;
-			zero_speed_offset[0] = 56;
-			zero_speed_offset[1] = 95;
+			max_speed_offset[0] = 22;
+			max_speed_offset[1] = 22;
+			zero_speed_offset[0] = 53;
+			zero_speed_offset[1] = 101;
 			orbit_center_offset[0] = 165;
 			orbit_center_offset[1] = -1;
 			orbit_radius = 166;
@@ -2853,12 +2853,16 @@
 
 		base_res[0] = 640;
 		base_res[1] = 480;
+
+		gauge_offset = 17;
 	} else {
 		coords[0] = 880;
 		coords[1] = 648;
 
 		base_res[0] = 1024;
 		base_res[1] = 768;
+
+		gauge_offset = 18;
 	}
 	bar_h = 41;
 	letter_offsets[0] = 2;
@@ -2867,7 +2871,6 @@
 	top_offsets[1] = 0;
 	bottom_offsets[0] = 0;
 	bottom_offsets[1] = 50;
-	gauge_offset = 20;
 
 	// parse data from .tbl
 	if(check_base_res(base_w, base_h)) {
@@ -3434,7 +3437,7 @@
 		base_res[0] = 640;
 		base_res[1] = 480;
 
-		dock_offsets[0] = 7;
+		dock_offsets[0] = 8;
 		dock_offsets[1] = 19;
 
 		time_offsets[0] = 8;
@@ -3446,7 +3449,7 @@
 		base_res[0] = 1024;
 		base_res[1] = 768;
 
-		dock_offsets[0] = 7;
+		dock_offsets[0] = 8;
 		dock_offsets[1] = 18;
 
 		time_offsets[0] = 8;
@@ -3456,7 +3459,7 @@
 	bracket_offsets[0] = 0;
 	bracket_offsets[1] = 3;
 
-	order_offsets[0] = 7;
+	order_offsets[0] = 8;
 	order_offsets[1] = 0; 
 
 	if(check_base_res(base_w, base_h)) {
@@ -3592,7 +3595,7 @@
 		Radar_dist_offsets[1][0] = 107;
 		Radar_dist_offsets[1][1] = 92;
 
-		Radar_dist_offsets[2][0] = 112;
+		Radar_dist_offsets[2][0] = 111;
 		Radar_dist_offsets[2][1] = 92;
 
 		strcpy_s(fname, "radar1");
@@ -4571,7 +4574,7 @@
 		base_res[1] = 480;
 
 		Objective_text_offset_y = 2;
-		Objective_text_val_offset_y = 10;
+		Objective_text_val_offset_y = 11;
 		Subspace_text_offset_y = 2;
 		Subspace_text_val_offset_y = 10;
 		Red_text_offset_y = 2;
@@ -4999,7 +5002,7 @@
 	header_offsets[1] = 2;
 	middle_frame_offset_y = 12;
 	text_start_offsets[0] = 3;
-	text_start_offsets[1] = 13;
+	text_start_offsets[1] = 14;
 	text_h = 9;
 
 	if(check_base_res(base_w, base_h)) {
@@ -5632,7 +5635,7 @@
 
 	if(gr_screen.res == GR_640) {
 		coords[0] = 550;
-		coords[1] = 114;
+		coords[1] = 144;
 
 		base_res[0] = 640;
 		base_res[1] = 480;
@@ -6195,10 +6198,10 @@
 	int scroll_time = 30;
 	int step_size = 3;
 	int total_life = 14000;
-	int line_height = 12;
+	int line_height = 9;
 	bool hidden_by_comms_menu = true;
 
-	coords[0] = 5;
+	coords[0] = 8;
 	coords[1] = 5;
 	int font_num = FONT1;
 	bool slew = false;
hudfix.patch (3,601 bytes)   

Yarn

2013-04-07 20:31

developer  

hudfix2.patch (4,047 bytes)   
Index: code/hud/hudparse.cpp
===================================================================
--- code/hud/hudparse.cpp	(revision 9624)
+++ code/hud/hudparse.cpp	(working copy)
@@ -1828,7 +1828,7 @@
 
 	if(gr_screen.res == GR_640) {
 		coords[0] = 486;
-		coords[1] = 206;
+		coords[1] = 200;
 
 		base_res[0] = 640;
 		base_res[1] = 480;
@@ -1836,12 +1836,12 @@
 		header_text_offsets[0] = 3;
 		header_text_offsets[1] = 2;
 		list_start_offsets[0] = 0;
-		list_start_offsets[1] = 12;
+		list_start_offsets[1] = 13;
 		entry_h = 11;
 		entry_stagger_w = 0;
 		ship_name_offsets[0] = 3;
 		ship_name_offsets[1] = 0;
-		ship_integrity_offsets[0] = 128;
+		ship_integrity_offsets[0] = 118;
 		ship_integrity_offsets[1] = 0;
 		ship_status_offsets[0] = -12;
 		ship_status_offsets[1] = 0;
@@ -2601,10 +2601,10 @@
 			throttle_h = 50;
 			throttle_w = 49;
 			throttle_aburn_h = 17;
-			max_speed_offset[0] = 19;
-			max_speed_offset[1] = 10;
-			zero_speed_offset[0] = 35;
-			zero_speed_offset[1] = 59;
+			max_speed_offset[0] = 14;
+			max_speed_offset[1] = 14;
+			zero_speed_offset[0] = 33;
+			zero_speed_offset[1] = 63;
 			orbit_center_offset[0] = 103;
 			orbit_center_offset[1] = -1;
 			orbit_radius = 104;
@@ -2620,10 +2620,10 @@
 			throttle_h = 80;
 			throttle_w = 78;
 			throttle_aburn_h = 27;
-			max_speed_offset[0] = 30;
-			max_speed_offset[1] = 16;
-			zero_speed_offset[0] = 56;
-			zero_speed_offset[1] = 95;
+			max_speed_offset[0] = 22;
+			max_speed_offset[1] = 22;
+			zero_speed_offset[0] = 53;
+			zero_speed_offset[1] = 101;
 			orbit_center_offset[0] = 165;
 			orbit_center_offset[1] = -1;
 			orbit_radius = 166;
@@ -2853,12 +2853,16 @@
 
 		base_res[0] = 640;
 		base_res[1] = 480;
+
+		gauge_offset = 17;
 	} else {
 		coords[0] = 880;
 		coords[1] = 648;
 
 		base_res[0] = 1024;
 		base_res[1] = 768;
+
+		gauge_offset = 18;
 	}
 	bar_h = 41;
 	letter_offsets[0] = 2;
@@ -2867,7 +2871,6 @@
 	top_offsets[1] = 0;
 	bottom_offsets[0] = 0;
 	bottom_offsets[1] = 50;
-	gauge_offset = 20;
 
 	// parse data from .tbl
 	if(check_base_res(base_w, base_h)) {
@@ -3434,7 +3437,7 @@
 		base_res[0] = 640;
 		base_res[1] = 480;
 
-		dock_offsets[0] = 7;
+		dock_offsets[0] = 8;
 		dock_offsets[1] = 19;
 
 		time_offsets[0] = 8;
@@ -3446,7 +3449,7 @@
 		base_res[0] = 1024;
 		base_res[1] = 768;
 
-		dock_offsets[0] = 7;
+		dock_offsets[0] = 8;
 		dock_offsets[1] = 18;
 
 		time_offsets[0] = 8;
@@ -3456,7 +3459,7 @@
 	bracket_offsets[0] = 0;
 	bracket_offsets[1] = 3;
 
-	order_offsets[0] = 7;
+	order_offsets[0] = 8;
 	order_offsets[1] = 0; 
 
 	if(check_base_res(base_w, base_h)) {
@@ -3592,7 +3595,7 @@
 		Radar_dist_offsets[1][0] = 107;
 		Radar_dist_offsets[1][1] = 92;
 
-		Radar_dist_offsets[2][0] = 112;
+		Radar_dist_offsets[2][0] = 111;
 		Radar_dist_offsets[2][1] = 92;
 
 		strcpy_s(fname, "radar1");
@@ -4571,7 +4574,7 @@
 		base_res[1] = 480;
 
 		Objective_text_offset_y = 2;
-		Objective_text_val_offset_y = 10;
+		Objective_text_val_offset_y = 11;
 		Subspace_text_offset_y = 2;
 		Subspace_text_val_offset_y = 10;
 		Red_text_offset_y = 2;
@@ -4738,13 +4741,13 @@
 
 	if(gr_screen.res == GR_640) {
 		coords[0] = 497;
-		coords[1] = 273;
+		coords[1] = 252;
 
 		base_res[0] = 640;
 		base_res[1] = 480;
 	} else {
 		coords[0] = 880;
-		coords[1] = 525;
+		coords[1] = 511;
 
 		base_res[0] = 1024;
 		base_res[1] = 768;
@@ -4999,7 +5002,7 @@
 	header_offsets[1] = 2;
 	middle_frame_offset_y = 12;
 	text_start_offsets[0] = 3;
-	text_start_offsets[1] = 13;
+	text_start_offsets[1] = 14;
 	text_h = 9;
 
 	if(check_base_res(base_w, base_h)) {
@@ -5632,7 +5635,7 @@
 
 	if(gr_screen.res == GR_640) {
 		coords[0] = 550;
-		coords[1] = 114;
+		coords[1] = 144;
 
 		base_res[0] = 640;
 		base_res[1] = 480;
@@ -6195,10 +6198,10 @@
 	int scroll_time = 30;
 	int step_size = 3;
 	int total_life = 14000;
-	int line_height = 12;
+	int line_height = 9;
 	bool hidden_by_comms_menu = true;
 
-	coords[0] = 5;
+	coords[0] = 8;
 	coords[1] = 5;
 	int font_num = FONT1;
 	bool slew = false;
hudfix2.patch (4,047 bytes)   

niffiwan

2013-04-07 20:43

developer   ~0014911

awesome, I'll check this out then commit when I next have a chance (this week I'm sure)

niffiwan

2013-04-08 08:38

developer   ~0014912

Fix committed to trunk@9625.

niffiwan

2013-12-02 00:57

developer   ~0015484

Crediting Yarn

Related Changesets

fs2open: trunk r9625

2013-04-08 05:27

niffiwan


Ported: N/A

Details Diff
From Yarn - Fix mantis 2839: remove overlap in default 640x480 res HUD gauges Affected Issues
0002839
mod - /trunk/fs2_open/code/hud/hudparse.cpp Diff File

Issue History

Date Modified Username Field Change
2013-04-07 20:31 Yarn New Issue
2013-04-07 20:31 Yarn File Added: hudfix.patch
2013-04-07 20:31 Yarn File Added: hudfix2.patch
2013-04-07 20:43 niffiwan Note Added: 0014911
2013-04-07 20:43 niffiwan Status new => code review
2013-04-08 08:38 niffiwan Changeset attached => fs2open trunk r9625
2013-04-08 08:38 niffiwan Note Added: 0014912
2013-04-08 08:38 niffiwan Status code review => resolved
2013-04-08 08:38 niffiwan Resolution open => fixed
2013-12-02 00:57 niffiwan Assigned To => Yarn
2013-12-02 00:57 niffiwan Note Added: 0015484
2013-12-02 00:57 niffiwan Status resolved => feedback
2013-12-02 00:57 niffiwan Resolution fixed => reopened
2013-12-02 00:57 niffiwan Status feedback => resolved
2013-12-02 00:57 niffiwan Fixed in Version => 3.6.19
2013-12-02 00:57 niffiwan Resolution reopened => fixed