-
Notifications
You must be signed in to change notification settings - Fork 1
/
common_draw.h
93 lines (74 loc) · 2.76 KB
/
common_draw.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
/*
Copyright (C) 2011 ezQuake team
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __COMMON_DRAW__H__
#define __COMMON_DRAW__H__
#define TIMETYPE_CLOCK 0
#define TIMETYPE_GAMECLOCK 1
#define TIMETYPE_GAMECLOCKINV 2
#define TIMETYPE_DEMOCLOCK 3
void CommonDraw_Init(void);
typedef struct cachepic_s
{
char name[MAX_QPATH];
mpic_t *pic;
} cachepic_t;
typedef struct cachepic_node_s
{
cachepic_t data;
struct cachepic_node_s *next;
} cachepic_node_t;
#define CACHED_PICS_HDSIZE 64
mpic_t *CachePic_Find(const char *path);
mpic_t* CachePic_Add(const char *path, mpic_t *pic);
void CachePics_DeInit(void);
int SCR_GetClockStringWidth(const char *s, qbool big, float scale);
int SCR_GetClockStringHeight(qbool big, float scale);
const char* SCR_GetTimeString(int timetype, const char *format);
void SCR_DrawBigClock(int x, int y, int style, int blink, float scale, const char *t);
void SCR_DrawSmallClock(int x, int y, int style, int blink, float scale, const char *t);
void SCR_NetStats(int x, int y, float period);
void SCR_DrawHUDSpeed (int x, int y, int width, int height,
int type,
float tick_spacing,
float opacity,
int vertical,
int vertical_text,
int text_align,
byte color_stopped,
byte color_normal,
byte color_fast,
byte color_fastest,
byte color_insane,
int style);
void Draw_FitAlphaSubPic (int x, int y, int target_width, int target_height,
mpic_t *gl, int srcx, int srcy, int src_width, int src_height, float alpha);
void Draw_SubPicTiled(int x, int y,
int target_width, int target_height,
mpic_t *pic, int src_x, int src_y,
int src_width, int src_height,
float alpha);
void SCR_DrawWordWrapString(int x, int y,
int y_spacing,
int width, int height,
int wordwrap,
int scroll,
double scroll_delay,
char *txt);
void HUD_BeforeDraw();
void HUD_AfterDraw();
qbool Draw_BigFontAvailable(void);
int *gameclockoffset; // hud_gameclock time offset in seconds
void SCR_DrawWadString(int x, int y, float scale, const char *t);
void SCR_HUD_DrawBar(int direction, int value, float max_value, byte *color, int x, int y, int width, int height);
#endif // __COMMON_DRAW__H__