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

Function AddHUDItem

Descent3/hud.cpp:615–630  ·  view source on GitHub ↗

places an item on the hud

Source from the content-addressed store, hash-verified

613
614// places an item on the hud
615void AddHUDItem(tHUDItem *item) {
616 // find free hud slot.
617 int i;
618
619 for (i = 0; i < MAX_HUD_ITEMS; i++) {
620 if (!HUD_array[i].stat) {
621 // we will initialize the hud item.
622 InitHUDItem(i, item);
623 break;
624 }
625 }
626
627 if (i == MAX_HUD_ITEMS) {
628 mprintf(0, "Unable to add hud item (type=%d).\n", item->type);
629 }
630}
631
632// resets hud
633void ResetHUD() {

Callers 5

msafe_CallFunctionFunction · 0.85
LGSHudStateFunction · 0.85
InitDefaultHUDItemsFunction · 0.85
LoadHUDConfigFunction · 0.85

Calls 1

InitHUDItemFunction · 0.85

Tested by

no test coverage detected