initializes non configurable hud items.
| 1049 | |
| 1050 | // initializes non configurable hud items. |
| 1051 | void 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. |
| 1065 | void LoadHUDConfig(const char *filename, bool (*fn)(const char *, const char *, void *), void *ext_data) { |
no test coverage detected