Debian Codegraph @

prboom2/src/dsda/hud_components/player_tracker.c

raw
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 Player Tracker HUD Component
16 //
17
18 #include "base.h"
19
20 #include "player_tracker.h"
21
22 void dsda_PlayerTrackerHC(char* str, size_t max_size) {
23 extern int player_damage_last_tic;
24
25 snprintf(
26 str,
27 max_size,
28 "%sp: %d",
29 player_damage_last_tic > 0 ? dsda_TextColor(dsda_tc_exhud_player_damage)
30 : dsda_TextColor(dsda_tc_exhud_player_neutral),
31 player_damage_last_tic
32 );
33 }