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

Function InitDefaultHUDItems

Descent3/hud.cpp:1051–1062  ·  view source on GitHub ↗

initializes non configurable hud items.

Source from the content-addressed store, hash-verified

1049
1050// initializes non configurable hud items.
1051void InitDefaultHUDItems() {
1052 tHUDItem huditem;
1053
1054 memset(&huditem, 0, sizeof(huditem));
1055 huditem.type = HUD_ITEM_SCORE; // KEEP THIS
1056 huditem.stat = STAT_SCORE; // This is bound to timer. in release builds, no timer code but just score
1057 huditem.x = 640; // position on HUD in 640,480 coordinates
1058 huditem.y = 5;
1059 huditem.color = HUD_COLOR; // you can ignore this if you dont use this value passed into your render function
1060 huditem.render_fn = RenderHUDScore; // use pointer to function void (*fn)(struct tHUDItem *)
1061 AddHUDItem(&huditem);
1062}
1063
1064// loads in hud configuration file, adds hud items.
1065void LoadHUDConfig(const char *filename, bool (*fn)(const char *, const char *, void *), void *ext_data) {

Callers 1

LoadHUDConfigFunction · 0.85

Calls 1

AddHUDItemFunction · 0.85

Tested by

no test coverage detected