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

Function FreeHUDItem

Descent3/hud.cpp:1035–1046  ·  view source on GitHub ↗

frees hud items based off their type class.

Source from the content-addressed store, hash-verified

1033
1034// frees hud items based off their type class.
1035void FreeHUDItem(int item) {
1036 ASSERT(item < MAX_HUD_ITEMS);
1037
1038 HUD_array[item].stat = 0;
1039 HUD_array[item].flags = 0;
1040 HUD_array[item].id = HUD_INVALID_ID;
1041 if (((HUD_array[item].type == HUD_ITEM_CUSTOMTEXT) || (HUD_array[item].type == HUD_ITEM_CUSTOMTEXT2)) &&
1042 HUD_array[item].data.text) {
1043 mem_free(HUD_array[item].data.text);
1044 HUD_array[item].data.text = NULL;
1045 }
1046}
1047
1048extern void RenderHUDScore(tHUDItem *item);
1049

Callers 5

CloseHUDFunction · 0.85
ResetHUDFunction · 0.85
ResetHUDLevelItemsFunction · 0.85
RenderHUDMessagesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected