-
Notifications
You must be signed in to change notification settings - Fork 14
/
st_main.h
165 lines (137 loc) · 3.01 KB
/
st_main.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
/* the status bar consists of two 8 bit color objects: */
/* the static background pic and a transparent foreground object that */
/* all the stats are drawn onto when they change */
/* coordinates are status bar relative (0 is first line of sbar) */
#define FLASHDELAY 2 /* # of tics delay (1/30 sec) */
#define FLASHTIMES 6 /* # of times to flash new frag amount (EVEN!) */
#define AMMOX 52
#define AMMOY 14
#define HEALTHX 104
#define HEALTHY AMMOY
#define KEYX 124
#define REDKEYY 3
#define BLUKEYY 15
#define YELKEYY 27
#define KEYW 16
#define KEYH 12
#define FACEX 144
#define FACEY 5
#define FACEW 32
#define FACEH 32
#define ARMORX 226
#define ARMORY HEALTHY
#define MAPX 316
#define MAPY HEALTHY
#define YOURFRAGX (MAPX - 28)
#define YOURFRAGY 8
#define HISFRAGX (MAPX - 28)
#define HISFRAGY (HEALTHY+12)
typedef enum
{
f_none,
f_faceleft, /* turn face left */
f_faceright, /* turn face right */
f_hurtbad, /* surprised look when slammed hard */
f_gotgat, /* picked up a weapon smile */
f_mowdown, /* grimace while continuous firing */
NUMSPCLFACES
} spclface_e;
#define NUMFACES 48
typedef enum
{
sbf_lookfwd,
sbf_lookrgt,
sbf_looklft,
sbf_facelft,
sbf_facergt,
sbf_ouch,
sbf_gotgat,
sbf_mowdown
} faces_e;
#define GODFACE 40
#define DEADFACE 41
#define FIRSTSPLAT 42
#define GIBTIME 2
#define NUMSPLATS 6
#define NUMMICROS 6 /* amount of micro-sized #'s (weapon armed) */
typedef enum
{
sb_minus,
sb_0,
sb_percent = 11,
sb_card_b,
sb_card_y,
sb_card_r,
sb_skul_b,
sb_skul_y,
sb_skul_r,
NUMSBOBJ
} sbobj_e;
typedef struct
{
char active;
char doDraw;
short delay;
short times;
short x;
short w;
uint8_t y;
uint8_t h;
} sbflash_t;
typedef struct {
short id;
short ind;
short value;
} stbarcmd_t;
typedef enum
{
stc_drawammo,
stc_drawhealth,
stc_drawarmor,
stc_drawcard,
stc_drawmap,
stc_drawmicro,
stc_drawyourfrags,
stc_drawhisfrags,
stc_flashinitial,
stc_drawflashcard,
stc_drawgibhead,
stc_drawhead,
STC_NUMCMDTYPES
} stbarcmdtype_t;
typedef struct
{
VINT ammo, health, armor;
VINT godmode;
VINT face;
char cards[NUMCARDS];
sbflash_t flashCards[NUMCARDS]; /* INFO FOR FLASHING CARDS & SKULLS */
VINT yourFragsCount;
VINT hisFragsCount;
VINT currentMap;
VINT drawface;
char weaponowned[NUMMICROS];
VINT facetics;
VINT newface;
VINT gibframe;
VINT gibdelay;
char gibdraw;
char doSpclFace;
VINT spclFaceType;
short numstbarcmds;
stbarcmd_t stbarcmds[STC_NUMCMDTYPES + NUMMICROS + NUMCARDS * 2];
sbflash_t yourFrags; /* INFO FOR YOUR FRAG FLASHING */
sbflash_t hisFrags;
char flashInitialDraw; /* INITIALLY DRAW FRAG AMOUNTS (flag) */
/* Messaging */
char specialFace; /* Which type of special face to make */
char gotgibbed; /* Got gibbed */
char tryopen[NUMCARDS]; /* Tried to open a card or skull door */
char forcedraw;
} stbar_t;
extern stbar_t *stbar;
extern int stbar_tics;
extern void valtostr(char *string,int val);
void ST_DrawValue(int x,int y,int value);
void ST_Num (int x, int y, int num);
void ST_InitEveryLevel(void);