Debian Codegraph @

prboom2/src/dsda/hud_components/base.h

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 HUD Component Base
16 //
17
18 #ifndef __DSDA_HUD_COMPONENT_BASE__
19 #define __DSDA_HUD_COMPONENT_BASE__
20
21 #include <stdio.h>
22 #include <math.h>
23
24 #include "am_map.h"
25 #include "doomdef.h"
26 #include "doomstat.h"
27 #include "hu_lib.h"
28 #include "hu_stuff.h"
29 #include "m_menu.h"
30 #include "p_mobj.h"
31 #include "p_pspr.h"
32 #include "p_spec.h"
33 #include "p_tick.h"
34 #include "r_data.h"
35 #include "r_main.h"
36 #include "r_state.h"
37 #include "v_video.h"
38 #include "w_wad.h"
39
40 #include "dsda.h"
41 #include "dsda/demo.h"
42 #include "dsda/exhud.h"
43 #include "dsda/font.h"
44 #include "dsda/global.h"
45 #include "dsda/settings.h"
46 #include "dsda/text_color.h"
47 #include "dsda/utility.h"
48
49 #define DSDA_TEXT_SIZE 200
50 #define DSDA_CHAR_HEIGHT 8
51 #define DSDA_CHAR_WIDTH 6
52
53 typedef struct {
54 hu_textline_t text;
55 char msg[DSDA_TEXT_SIZE];
56 } dsda_text_t;
57
58 typedef struct {
59 int x;
60 int y;
61 int vpt;
62 } dsda_patch_component_t;
63
64 int dsda_HudComponentY(int y_offset, int vpt, double ratio);
65 void dsda_InitTextHC(dsda_text_t* component, int x_offset, int y_offset, int vpt);
66 void dsda_InitBlockyHC(dsda_text_t* component, int x_offset, int y_offset, int vpt);
67 void dsda_InitPatchHC(dsda_patch_component_t* component, int x_offset, int y_offset, int vpt);
68 fixed_t dsda_HexenArmor(player_t* player);
69 void dsda_DrawBigNumber(int x, int y, int delta_x, int delta_y, int cm, int vpt, int count, int n);
70 void dsda_DrawBasicText(dsda_text_t* component);
71 void dsda_RefreshHudText(dsda_text_t* component);
72
73 #endif