blob: 2de6c837011037569429f4f5138737e6ea36dbf6 (
plain)
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
|
/* ScummVM - Scumm Interpreter
* Copyright (C) 2004 Ivan Dubrov
* Copyright (C) 2004-2005 The ScummVM project
*
* 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.
*
* $Header$
*
*/
#ifndef GOB_DRAW_H
#define GOB_DRAW_H
#include "gob/video.h"
namespace Gob {
#define RENDERFLAG_NOINVALIDATE 1
#define RENDERFLAG_CAPTUREPUSH 2
#define RENDERFLAG_CAPTUREPOP 8
#define RENDERFLAG_USEDELTAS 0x10
typedef struct Draw_FontToSprite {
char sprite;
char base;
char width;
char height;
} Draw_FontToSprite;
extern int16 draw_fontIndex;
extern int16 draw_spriteLeft;
extern int16 draw_spriteTop;
extern int16 draw_spriteRight;
extern int16 draw_spriteBottom;
extern int16 draw_destSpriteX;
extern int16 draw_destSpriteY;
extern int16 draw_backColor;
extern int16 draw_frontColor;
extern char draw_letterToPrint;
extern Draw_FontToSprite draw_fontToSprite[4];
extern int16 draw_destSurface;
extern int16 draw_sourceSurface;
extern int16 draw_renderFlags;
extern int16 draw_backDeltaX;
extern int16 draw_backDeltaY;
extern FontDesc *draw_fonts[4];
extern char *draw_textToPrint;
extern int16 draw_transparency;
extern SurfaceDesc *draw_spritesArray[50];
extern int16 draw_invalidatedCount;
extern int16 draw_invalidatedTops[30];
extern int16 draw_invalidatedLefts[30];
extern int16 draw_invalidatedRights[30];
extern int16 draw_invalidatedBottoms[30];
extern char draw_noInvalidated;
extern char draw_doFullFlip;
extern char draw_paletteCleared;
extern int16 draw_cursorIndex;
extern int16 draw_transparentCursor;
extern SurfaceDesc *draw_backSurface;
extern SurfaceDesc *draw_frontSurface;
extern int16 draw_unusedPalette1[18];
extern int16 draw_unusedPalette2[16];
extern Color draw_vgaPalette[256];
extern Color draw_vgaSmallPalette[16];
extern int16 draw_cursorX;
extern int16 draw_cursorY;
extern int16 draw_cursorWidth;
extern int16 draw_cursorHeight;
extern int16 draw_cursorXDeltaVar;
extern int16 draw_cursorYDeltaVar;
extern SurfaceDesc *draw_cursorSprites;
extern SurfaceDesc *draw_cursorBack;
extern int16 draw_cursorAnim;
extern char draw_cursorAnimLow[40];
extern char draw_cursorAnimHigh[40];
extern char draw_cursorAnimDelays[40];
extern char draw_applyPal;
void draw_invalidateRect(int16 left, int16 top, int16 right, int16 bottom);
void draw_blitInvalidated(void);
void draw_setPalette(void);
void draw_clearPalette(void);
void draw_blitCursor(void);
void draw_spriteOperation(int16 operation);
void draw_animateCursor(int16 cursor);
void draw_interPalLoad(void);
void draw_printText(void);
// Draw operations
#define DRAW_BLITSURF 0
#define DRAW_PUTPIXEL 1
#define DRAW_FILLRECT 2
#define DRAW_DRAWLINE 3
#define DRAW_INVALIDATE 4
#define DRAW_LOADSPRITE 5
#define DRAW_PRINTTEXT 6
#define DRAW_DRAWBAR 7
#define DRAW_CLEARRECT 8
#define DRAW_FILLRECTABS 9
#define DRAW_DRAWLETTER 10
} // End of namespace Gob
#endif /* __DRAW_H */
|