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

Function RenderAuxHUDFrame

Descent3/hud.cpp:1289–1338  ·  view source on GitHub ↗

render auxillary hud

Source from the content-addressed store, hash-verified

1287
1288// render auxillary hud
1289void RenderAuxHUDFrame() {
1290 // take care of any 'small hud' stuff
1291 // render hud array list for items drawn differently on a smaller hud.
1292 if (Small_hud_flag) {
1293 int cur_game_win_w = Game_window_w;
1294 int cur_game_win_h = Game_window_h;
1295 int cur_game_win_x = Game_window_x;
1296 int cur_game_win_y = Game_window_y;
1297 int i;
1298 uint16_t stat_mask = Hud_stat_mask;
1299
1300 // emulating hud that takes up entire screen
1301 Game_window_w = Max_window_w;
1302 Game_window_h = Max_window_h;
1303 Game_window_x = 0;
1304 Game_window_y = 0;
1305
1306 // determine hud rendering properties.
1307 Hud_aspect_x = (float)Game_window_w / DEFAULT_HUD_WIDTH;
1308 Hud_aspect_y = (float)Game_window_h / DEFAULT_HUD_HEIGHT;
1309
1310 for (i = 0; i < MAX_HUD_ITEMS; i++) {
1311 if ((stat_mask & HUD_array[i].stat) && (HUD_array[i].flags & HUD_FLAG_SMALL)) {
1312 if (!HUD_array[i].render_fn) {
1313 HudDisplayRouter(&HUD_array[i]);
1314 } else {
1315 (*HUD_array[i].render_fn)(&HUD_array[i]);
1316 }
1317 }
1318 }
1319
1320 // messages.
1321 if ((stat_mask & STAT_MESSAGES)) {
1322 RenderHUDMessages();
1323 }
1324
1325 grtext_Flush();
1326
1327 Game_window_w = cur_game_win_w;
1328 Game_window_h = cur_game_win_h;
1329 Game_window_x = cur_game_win_x;
1330 Game_window_y = cur_game_win_y;
1331 }
1332
1333 // render game and hud message consoles.
1334 Game_msg_con.DoInput();
1335 Game_msg_con.Draw();
1336 HUD_msg_con.DoInput();
1337 HUD_msg_con.Draw();
1338}
1339
1340char *GetControllerBindingText(int fidcont) {
1341 static char *cont_bind_txt;

Callers 1

GameDrawHudFunction · 0.85

Calls 5

HudDisplayRouterFunction · 0.85
RenderHUDMessagesFunction · 0.85
grtext_FlushFunction · 0.85
DoInputMethod · 0.80
DrawMethod · 0.45

Tested by

no test coverage detected