MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / InitShipHUD

Function InitShipHUD

Descent3/hud.cpp:571–596  ·  view source on GitHub ↗

initializes hud.

Source from the content-addressed store, hash-verified

569
570// initializes hud.
571void InitShipHUD(int ship) {
572 int i;
573
574 // load static hud image resources to be used by HudDisplay.cpp
575 HUD_resources.arrow_bmp = bm_AllocLoadFileBitmap("hudarrow.ogf", 0);
576 HUD_resources.goal_bmp = bm_AllocLoadFileBitmap("hudgoal.ogf", 0);
577 HUD_resources.goal_complete_bmp = bm_AllocLoadFileBitmap("hudgoalon.ogf", 0);
578 HUD_resources.lock_bmp[0] = bm_AllocLoadFileBitmap("hudlockl.ogf", 0);
579 HUD_resources.lock_bmp[1] = bm_AllocLoadFileBitmap("hudlockr.ogf", 0);
580 HUD_resources.wpn_bmp = bm_AllocLoadFileBitmap("hudicon.ogf", 0);
581 HUD_resources.dot_bmp = bm_AllocLoadFileBitmap("huddot.ogf", 0);
582 HUD_resources.antigrav_bmp[0] = bm_AllocLoadFileBitmap("hudantigravl.ogf", 0);
583 HUD_resources.antigrav_bmp[1] = bm_AllocLoadFileBitmap("hudantigravr.ogf", 0);
584
585 for (i = 0; i < NUM_SHIELD_GAUGE_FRAMES; i++)
586 HUD_resources.shield_bmp[i] = -1;
587 HUD_resources.energy_bmp = -1;
588 HUD_resources.afterburn_bmp = -1;
589 HUD_resources.invpulse_bmp = -1;
590
591 // sets current hud mode static global
592 // DAJ Current_pilot.get_hud_data((uint8_t *)&Hud_mode);
593 uint8_t hud_tmp;
594 Current_pilot.get_hud_data(&hud_tmp);
595 Hud_mode = (tHUDMode)hud_tmp;
596}
597
598// closes hud for current ship
599void CloseShipHUD() {

Callers 6

StartLevelFunction · 0.85
ProcessTestKeysFunction · 0.85
LGSPlayersFunction · 0.85
MultiDoBashPlayerShipFunction · 0.85
ChangePlayerShipIndexFunction · 0.85
DemoReadHeaderFunction · 0.85

Calls 2

bm_AllocLoadFileBitmapFunction · 0.85
get_hud_dataMethod · 0.80

Tested by

no test coverage detected