| 1 |
// |
| 2 |
// Copyright(C) 2022 by Ryan Krafnick |
| 3 |
// |
| 4 |
// This program is free software; you can redistribute it and/or |
| 5 |
// modify it under the terms of the GNU General Public License |
| 6 |
// as published by the Free Software Foundation; either version 2 |
| 7 |
// of the License, or (at your option) any later version. |
| 8 |
// |
| 9 |
// This program is distributed in the hope that it will be useful, |
| 10 |
// but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 |
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 |
// GNU General Public License for more details. |
| 13 |
// |
| 14 |
// DESCRIPTION: |
| 15 |
// DSDA Sector Tracker HUD Component |
| 16 |
// |
| 17 |
|
| 18 |
#include "base.h" |
| 19 |
|
| 20 |
#include "sector_tracker.h" |
| 21 |
|
| 22 |
void dsda_SectorTrackerHC(char* str, size_t max_size, int id) { |
| 23 |
dboolean active; |
| 24 |
int special; |
| 25 |
|
| 26 |
active = P_PlaneActive(§ors[id]); |
| 27 |
special = sectors[id].special; |
| 28 |
|
| 29 |
snprintf( |
| 30 |
str, |
| 31 |
max_size, |
| 32 |
"%ss %d: %d %d %d", |
| 33 |
active ? dsda_TextColor(dsda_tc_exhud_sector_active) |
| 34 |
: special ? dsda_TextColor(dsda_tc_exhud_sector_special) |
| 35 |
: dsda_TextColor(dsda_tc_exhud_sector_normal), |
| 36 |
id, special, active, |
| 37 |
sectors[id].floorheight >> FRACBITS |
| 38 |
); |
| 39 |
} |