forked from SpiritQuaddicted/reQuiem
-
Notifications
You must be signed in to change notification settings - Fork 0
/
draw.h
104 lines (88 loc) · 3.71 KB
/
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
94
95
96
97
98
99
100
101
102
103
104
/*
Copyright (C) 1996-1997 Id Software, Inc.
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, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// draw.h -- these are the only functions outside the refresh allowed
// to touch the vid buffer
#ifdef GLQUAKE
typedef struct
{
int width, height;
int texnum;
float sl, tl, sh, th;
} mpic_t;
#else
typedef struct
{
int width;
short height;
byte alpha;
byte pad;
byte data[4]; // variable sized
} mpic_t;
#endif
// indices of special chars from the conchars2 lmp
//typedef enum {CHAR2_SCRUP, CHAR2_SCRDN, CHAR2_ARROWLT, CHAR2_ARROWRT, CHAR2_ARROWUP, CHAR2_ARROWDN};
#define DRAW_CHARWIDTH 8
#define DRAW_CHARHEIGHT 8
#define DRAW_BIGCHARWIDTH 24
#define DRAW_BIGCHARHEIGHT 24
#ifdef HEXEN2_SUPPORT
# define DRAW_BIGCHARWIDTH_H2 12
# define DRAW_BIGCHARHEIGHT_H2 16
#endif
// flags for Draw_BigNumString:
#define DRAWNUM_ALIGNRIGHT 0x0001
#define DRAWNUM_TIGHT 0x0002
#define DRAWNUM_ALTCOLOR 0x0080
extern mpic_t *draw_disc; // also used on sbar
#define Draw_Character(x, y, num) Draw_Character_Scaled((x), (y), (num), 1.0)
#define Draw_String(x, y, str) Draw_String_Scaled((x), (y), (str), 1.0)
#define Draw_Alt_String(x, y, str) Draw_Alt_String_Scaled((x), (y), (str), 1.0)
#define Draw_Pic(x, y, pic) Draw_Pic_Scaled((x), (y), (pic), 1.0)
#define Draw_TransPic(x, y, pic) Draw_Pic((x), (y), (pic))
#define Draw_TransPic_Scaled(x, y, pic, scale) Draw_Pic_Scaled((x), (y), (pic), (scale))
void Draw_Init (void);
void Draw_ReloadWadFile (void);
void Draw_Character_Scaled (int x, int y, int num, float scale);
//void Draw_Character2 (int x, int y, int num);
void Draw_DebugChar (char num);
void Draw_SubPic (int x, int y, const mpic_t *pic, int s, int t, int width, int height);
void Draw_Pic_Scaled (int x, int y, const mpic_t *pic, float scale);
//void Draw_TransPic (int x, int y, const mpic_t *pic);
void Draw_TransPicTranslate (int x, int y, mpic_t *pic, const byte *translation, int playertype);
void Draw_ConsoleBackground (int lines);
void Draw_ConbackSolid (void);
void Draw_BeginDisc (void);
void Draw_EndDisc (void);
void Draw_TileClear (int x, int y, int w, int h);
void Draw_Fill (int x, int y, int w, int h, int c);
void Draw_FillRGB (int x, int y, int w, int h, const byte rgb[3]);
void Draw_DimScreen (void);
void Draw_String_Scaled (int x, int y, const char *str, float scale);
void Draw_Alt_String_Scaled (int x, int y, const char *str, float scale);
void Draw_BigString (int x, int y, const char *str);
void Draw_BigNumString (int x, int y, const char *str, int flags);
mpic_t *Draw_PicFromWad (const char *name);
mpic_t *Draw_GetCachePic (const char *path, qboolean crash);
mpic_t * Draw_FindCachePic (const char *filepath);
qpic_t * Draw_LoadCachePic (const char *filepath);
mpic_t * Draw_AddCachePic (const char *filepath, byte *data, int width, int height);
void Draw_CopyPicToPic (const qpic_t *pic_src, qpic_t *pic_dest, int x, int y);
void Draw_Crosshair (void);
void Draw_TextBox (int x, int y, int width, int height);
void GL_SetFontFilter (float filter);
#ifdef HEXEN2_SUPPORT
void Draw_SmallString(int x, int y, const char *str);
// void Draw_PicCropped(int x, int y, mpic_t *pic);
#endif