View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003087 | FSSCP | HUD | public | 2014-08-08 07:15 | 2014-08-08 08:45 |
Reporter | Yarn | Assigned To | Yarn | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Platform | x64 | OS | Windows 7 | ||
Product Version | 3.7.2 RC3 | ||||
Summary | 0003087: Escort list header translation no longer supported | ||||
Description | Most of the retail HUD gauges support header text translation using certain entries in strings.tbl, and they have supported it since retail. The escort list used to be one of those gauges (using entry 285), but now it isn't; that gauge's header can now only be changed in hud_gauges.tbl. This means that, in non-English versions of the game, that gauge's header text is still "monitoring" instead of the appropriate translation (for example, "Geleitschutzliste" in the German version). | ||||
Additional Information | I think I can fix this without dropping support for Header Text:. If I manage to do so, I will upload a patch. | ||||
Tags | No tags attached. | ||||
|
mantis3087.patch (856 bytes)
Index: code/hud/hudparse.cpp =================================================================== --- code/hud/hudparse.cpp (revision 10974) +++ code/hud/hudparse.cpp (working copy) @@ -1657,7 +1657,7 @@ int ship_name_max_w = 100; int ship_integrity_offsets[2]; int ship_status_offsets[2]; - char header_text[MAX_FILENAME_LEN] = "monitoring"; + char header_text[MAX_FILENAME_LEN] = ""; char fname_top[MAX_FILENAME_LEN] = "escort1"; char fname_middle[MAX_FILENAME_LEN] = "escort2"; char fname_bottom[MAX_FILENAME_LEN] = "escort3"; @@ -1739,6 +1739,10 @@ stuff_int(&ship_name_max_w); } + if (strlen(header_text) == 0) { + strcpy_s(header_text, XSTR("monitoring", 285)); + } + hud_gauge->initBitmaps(fname_top, fname_middle, fname_bottom); hud_gauge->initEntryHeight(entry_h); hud_gauge->initEntryStaggerWidth(entry_stagger_w); |
|
The attached patch should fix this issue properly. |
|
Looks good to me and tests fine as well. I'll commit shortly with one minor change - I removed the strlen() empty string check and replaced it with testing if the 1st char is '\0' or not (which is more efficient and more widely used in FSO code) |
|
Fix committed to trunk@10976. |
Date Modified | Username | Field | Change |
---|---|---|---|
2014-08-08 07:15 | Yarn | New Issue | |
2014-08-08 08:04 | Yarn | File Added: mantis3087.patch | |
2014-08-08 08:04 | Yarn | Note Added: 0016183 | |
2014-08-08 08:04 | Yarn | Assigned To | => Yarn |
2014-08-08 08:04 | Yarn | Status | new => code review |
2014-08-08 08:43 | niffiwan | Note Added: 0016184 | |
2014-08-08 08:45 | niffiwan | Changeset attached | => fs2open trunk r10976 |
2014-08-08 08:45 | niffiwan | Note Added: 0016185 | |
2014-08-08 08:45 | niffiwan | Status | code review => resolved |
2014-08-08 08:45 | niffiwan | Resolution | open => fixed |