View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0002391 | FSSCP | HUD | public | 2011-02-01 09:56 | 2011-11-15 23:24 |
| Reporter | FUBAR-BDHR | Assigned To | The_E | ||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | resolved | Resolution | fixed | ||
| Product Version | 3.6.13 | ||||
| Target Version | 3.6.14 | Fixed in Version | 3.6.13 | ||
| Summary | 0002391: Problems when using non-default gauge names | ||||
| Description | Basically 2_lock1.ani is no longer in my hud_gauges.tbl. All ships use a different file name. The effect loads and works in game but a warning about 2_lock1.ani missing is still produced. Tracking this it seems that hud_init_missile_lock() in hudlock.cpp still uses the old hardcoded array to get the filename for that gauge. I assume the same thing will happen if lockspin is renamed as well. Line that passes the data in question: hud_anim_init(&Lock_gauge, 0, 0, Lock_fname[Hud_reticle_style][gr_screen.res]); | ||||
| Tags | No tags attached. | ||||
|
|
Changing this to a list as I've run into the same issue with directives1 2 & 3 in missiontraining.cpp training_mission_init(). Definitions are at line 122 in missiontraining.cpp. Also confirmed the lockspin one. |
|
|
Adding time1 to the list. Hardcoded value used in hud_init_kills_gauge()in hud.cpp and defined at line 194. |
|
|
Same with weapons1 thru weapons5 (but not weapons6). Hardcoded value still used in hud_weapons_init()in hudtarget.cpp and defined at line 405. Looks like the _b versions are as well. |
|
|
Resolved in trunk revision 7102 |
|
|
Re-opening this as there are still a bunch of gauges with the issue. So far I've found: directive1.ani directive2.ani directive3.ani kills1.ani weapons1.ani weapons2.ani weapons3.ani weapons4.ani weapons5.ani weapons1_b.ani weapons2_b.ani weapons3_b.ani weapons4_b.ani weapons5_b.ani Also for some reason the weapons?_b weapons files don't show up as missing unless weapons? is also missing. |
|
2011-11-15 13:30
|
hudcleanup.patch (5,096 bytes)
Index: code/hud/hud.cpp
===================================================================
--- code/hud/hud.cpp (revision 7990)
+++ code/hud/hud.cpp (working copy)
@@ -2466,18 +2466,11 @@
}
/**
- * @brief Load in ::Kills_gauge if required
+ * @brief Obsolete initializer for the kills gauge. Now superseded by the new HUD code.
*/
void hud_init_kills_gauge()
{
- if ( !Kills_gauge_loaded ) {
- Kills_gauge.first_frame = bm_load_animation(Kills_fname[gr_screen.res], &Kills_gauge.num_frames);
- if ( Kills_gauge.first_frame == -1 ) {
- Warning(LOCATION, "Could not load in the kills ani: Kills_fname[gr_screen.res]\n");
- return;
- }
- Kills_gauge_loaded = 1;
- }
+ Kills_gauge_loaded = 1;
}
/**
Index: code/hud/hudtarget.cpp
===================================================================
--- code/hud/hudtarget.cpp (revision 7990)
+++ code/hud/hudtarget.cpp (working copy)
@@ -1002,82 +1002,14 @@
// Init data used for the weapons display on the HUD
void hud_weapons_init()
{
- int i, j, k, hud_index, gauge_index, hud_warned;
-
Weapon_flash_info.is_bright = 0;
- for ( i = 0; i < MAX_WEAPON_FLASH_LINES; i++ ) {
+ for ( int i = 0; i < MAX_WEAPON_FLASH_LINES; i++ ) {
Weapon_flash_info.flash_duration[i] = 1;
Weapon_flash_info.flash_next[i] = 1;
}
- if ( !Weapon_gauges_loaded )
- {
- hud_warned = 0;
- New_weapon.first_frame = bm_load("weapon6");
-
- for (hud_index = 0; hud_index < NUM_HUD_SETTINGS; hud_index++)
- {
- for ( gauge_index = 0; gauge_index < NUM_WEAPON_GAUGES; gauge_index++ )
- {
- Weapon_gauges[hud_index][gauge_index].first_frame = bm_load_animation(Weapon_gauge_fnames[hud_index][gr_screen.res][gauge_index], &Weapon_gauges[hud_index][gauge_index].num_frames);
-
- // file not found?
- if ( Weapon_gauges[hud_index][gauge_index].first_frame < 0 )
- {
- // if this is the ballistic hud setting, load the conventional ani
- if (hud_index)
- {
- // give a single warning
- if (!hud_warned)
- {
- // commented because it gets annoying, and the warning really isn't needed anyway - Goober5000
- //Warning(LOCATION, "Warning: Ballistic HUD graphics not found. Defaulting to original graphics.\n");
- hud_warned = 1;
- }
-
- Weapon_gauges[hud_index][gauge_index].first_frame = bm_load_animation(Weapon_gauge_fnames[0][gr_screen.res][gauge_index], &Weapon_gauges[hud_index][gauge_index].num_frames);
-
- // and test again
- if ( Weapon_gauges[hud_index][gauge_index].first_frame < 0 )
- {
- Warning(LOCATION,"Cannot load hud ani: %s\n",Weapon_gauge_fnames[hud_index][gr_screen.res][gauge_index]);
- }
- }
- // otherwise, display the regular warning
- else
- {
- Warning(LOCATION,"Cannot load hud ani: %s\n",Weapon_gauge_fnames[hud_index][gr_screen.res][gauge_index]);
- }
- }
- }
- }
-
- // reset the old coordinates if hud_warned
- if (hud_warned)
- {
- // don't reset the first one, but reset all others
- for (hud_index = 1; hud_index < NUM_HUD_SETTINGS; hud_index++)
- {
- for (i = 0; i < GR_NUM_RESOLUTIONS; i++)
- {
- for (k = 0; k < 2; k++)
- {
- for (j = 0; j < 3; j++)
- {
- Weapon_gauge_primary_coords[hud_index][i][j][k] = Weapon_gauge_primary_coords[0][i][j][k];
- }
- for (j = 0; j < 5; j++)
- {
- Weapon_gauge_secondary_coords[hud_index][i][j][k] = Weapon_gauge_secondary_coords[0][i][j][k];
- }
- Weapon_title_coords[hud_index][i][k] = Weapon_title_coords[0][i][k];
- }
- }
- }
- }
-
- Weapon_gauges_loaded = 1;
- }
+ // The E: There used to be a number of checks here. They are no longer needed, as the new HUD code handles it on its own.
+ Weapon_gauges_loaded = 1;
}
// init data used to play the homing "proximity warning" sound
Index: code/mission/missiontraining.cpp
===================================================================
--- code/mission/missiontraining.cpp (revision 7990)
+++ code/mission/missiontraining.cpp (working copy)
@@ -372,17 +372,9 @@
for (i = 0; i < TRAINING_MESSAGE_QUEUE_MAX; i++)
Training_message_queue[i].special_message = NULL;
- if ( !Directive_frames_loaded ) {
- for ( i = 0; i < NUM_DIRECTIVE_GAUGES; i++ ) {
- Directive_gauge[i].first_frame = bm_load_animation(Directive_fnames[i], &Directive_gauge[i].num_frames);
- if ( Directive_gauge[i].first_frame < 0 ) {
- Warning(LOCATION,"Cannot load hud ani: %s\n", Directive_fnames[i]);
- }
- }
-
- Directive_frames_loaded = 1;
- }
-
+ // The E: This is now handled by the new HUD code. No need to check here.
+ Directive_frames_loaded = 1;
+
// only clear player flags if this is actually a training mission
if ( The_mission.game_type & MISSION_TYPE_TRAINING ) {
Player->flags &= ~(PLAYER_FLAGS_MATCH_TARGET | PLAYER_FLAGS_MSG_MODE | PLAYER_FLAGS_AUTO_TARGETING | PLAYER_FLAGS_AUTO_MATCH_SPEED | PLAYER_FLAGS_LINK_PRIMARY | PLAYER_FLAGS_LINK_SECONDARY );
|
|
|
Please check the attached patch. |
|
|
Revised patch committed in revision 7997 |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2011-02-01 09:56 | FUBAR-BDHR | New Issue | |
| 2011-02-02 10:13 | FUBAR-BDHR | Note Added: 0012620 | |
| 2011-02-02 10:13 | FUBAR-BDHR | Summary | Problem when using non-default lock (and probably lockspin) indicator name => Problems when using non-default gauge names |
| 2011-02-03 03:43 | FUBAR-BDHR | Note Added: 0012621 | |
| 2011-02-04 01:51 | FUBAR-BDHR | Note Added: 0012622 | |
| 2011-03-31 17:17 | chief1983 | Target Version | => 3.6.14 |
| 2011-04-04 13:02 | The_E | Note Added: 0012647 | |
| 2011-04-04 13:02 | The_E | Status | new => resolved |
| 2011-04-04 13:02 | The_E | Fixed in Version | => 3.6.13 |
| 2011-04-04 13:02 | The_E | Resolution | open => fixed |
| 2011-04-04 13:02 | The_E | Assigned To | => The_E |
| 2011-11-15 10:17 | FUBAR-BDHR | Note Added: 0012964 | |
| 2011-11-15 10:17 | FUBAR-BDHR | Status | resolved => feedback |
| 2011-11-15 10:17 | FUBAR-BDHR | Resolution | fixed => reopened |
| 2011-11-15 13:19 | The_E | File Added: hudcleanup.patch | |
| 2011-11-15 13:30 | The_E | File Deleted: hudcleanup.patch | |
| 2011-11-15 13:30 | The_E | File Added: hudcleanup.patch | |
| 2011-11-15 13:30 | The_E | Note Added: 0012965 | |
| 2011-11-15 23:24 | The_E | Note Added: 0012970 | |
| 2011-11-15 23:24 | The_E | Status | feedback => resolved |
| 2011-11-15 23:24 | The_E | Resolution | reopened => fixed |