forked from haithun/CoD4X17a_testing
-
Notifications
You must be signed in to change notification settings - Fork 0
/
g_hud.h
141 lines (113 loc) · 3.22 KB
/
g_hud.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
/*
===========================================================================
Copyright (C) 2010-2013 Ninja and TheKelm of the IceOps-Team
This file is part of CoD4X17a-Server source code.
CoD4X17a-Server source code is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
CoD4X17a-Server source code is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>
===========================================================================
*/
#ifndef __G_HUD_H__
#define __G_HUD_H__
#include "q_shared.h"
#include "entity.h"
#define HUDELEM_ADDR 0x8335620
#define MAX_HUDELEMS 1024
typedef struct
{
byte red;
byte green;
byte blue;
byte alpha;
}ucolor_t;
typedef enum{
HUDFONT_DEFAULT,
HUDFONT_BIGFIXED,
HUDFONT_SMALLFIXED,
HUDFONT_OBJECTIVE
}fonttype_t;
typedef enum{
HUDALIGN_TOP = 0,
HUDALIGN_LEFT = 0,
HUDALIGN_MIDDLE = 1,
HUDALIGN_BOTTOM = 2,
HUDALIGN_CENTER = 4,
HUDALIGN_RIGHT = 8
}hudalign_t;
typedef enum{
HUDSCRNALIGN_TOP = 0,
HUDSCRNALIGN_MIDDLE = 1,
HUDSCRNALIGN_BOTTOM = 2,
HUDSCRNALIGN_LEFT = 9,
HUDSCRNALIGN_CENTER = 17,
HUDSCRNALIGN_RIGHT = 25
}hudscrnalign_t;
typedef enum{
HUDDISPLAY_FOREGROUND = 1,
HUDDISPLAY_HIDEINMENU = 4
}huddisplayoptions_t;
typedef struct
{
qboolean inuse;
float x;
float y;
int var_03;
int var_04;
float fontscale;
fonttype_t fonttype;
hudalign_t align;
hudscrnalign_t screenalign;
ucolor_t color;
ucolor_t fadecolor;
int fadestarttime;
int fadetime;
int var_13;
int var_14;
int var_15;
int var_16;
int var_17;
int var_18;
int var_19;
int var_20;
int var_21;
float movex;
float movey;
int movealign;
int movescralign;
int movestarttime;
int movingtime;
int var_28;
int var_29;
int var_30;
int hudTextConfigStringIndex;
float sort;
ucolor_t glowcolor;
int var_34;
int var_35;
int var_36;
int var_37;
int var_38;
huddisplayoptions_t displayoption;
unsigned int entitynum;
unsigned int teamnum;
qboolean archived;
}game_hudelem_t; //Size: 0xac
extern game_hudelem_t* g_hudelems;
qboolean OnSameTeam( gentity_t *ent1, gentity_t *ent2 );
qboolean Cmd_FollowClient_f(gentity_t *ent, int clientnum);
game_hudelem_t* G_GetNewHudElem(unsigned int clnum);
void G_HudSetText(game_hudelem_t*, const char*);
void G_HudSetPosition(game_hudelem_t*, float x, float y, hudscrnalign_t, hudscrnalign_t, hudalign_t alignx, hudalign_t aligny);
void G_HudSetColor(game_hudelem_t*, ucolor_t, ucolor_t);
void G_HudSetMovingOverTime(game_hudelem_t*, int, float newx, float newy);
void G_HudSetFont(game_hudelem_t*, float fontscale, fonttype_t ft);
void G_HudSetFadingOverTime(game_hudelem_t* element ,int time, ucolor_t newcolor);
void G_HudDestroy(game_hudelem_t* element);
#endif