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

Method set_hud_data

Descent3/pilot_class.cpp:851–884  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

849}
850
851void pilot::set_hud_data(uint8_t *hmode, uint16_t *hstat, uint16_t *hgraphicalstat, int *gw_w, int *gw_h) {
852 if (hmode) {
853 // should do checking here
854 switch (*hmode) {
855 case HUD_COCKPIT:
856 case HUD_FULLSCREEN:
857 hud_mode = *hmode;
858 write_pending = true;
859 break;
860 default:
861 mprintf(0, "PILOT: Trying to set hode mode to invalid mode (%d)\n", *hmode);
862 }
863 }
864
865 if (hstat) {
866 hud_stat = *hstat;
867 write_pending = true;
868 }
869
870 if (hgraphicalstat) {
871 hud_graphical_stat = *hgraphicalstat;
872 write_pending = true;
873 }
874
875 if (gw_w) {
876 game_window_w = *gw_w;
877 write_pending = true;
878 }
879
880 if (gw_h) {
881 game_window_h = *gw_h;
882 write_pending = true;
883 }
884}
885void pilot::get_hud_data(uint8_t *hmode, uint16_t *hstat, uint16_t *hgraphicalstat, int *gw_w, int *gw_h) {
886 if (hmode) {
887 *hmode = hud_mode;

Callers 7

GrowWindowFunction · 0.80
ShrinkWindowFunction · 0.80
_ReadOldPilotFileFunction · 0.80
SetHUDModeFunction · 0.80
SetScreenModeFunction · 0.80
finishMethod · 0.80
finishMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected