places an item on the hud
| 613 | |
| 614 | // places an item on the hud |
| 615 | void 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 |
| 633 | void ResetHUD() { |
no test coverage detected