31 #include "common/stack.h" 32 #include "gob/video.h" 40 #define RENDERFLAG_NOINVALIDATE 0x0001 41 #define RENDERFLAG_CAPTUREPUSH 0x0002 42 #define RENDERFLAG_COLLISIONS 0x0004 43 #define RENDERFLAG_CAPTUREPOP 0x0008 44 #define RENDERFLAG_USEDELTAS 0x0010 45 #define RENDERFLAG_BORDERHOTSPOTS 0x0040 46 #define RENDERFLAG_HASWINDOWS 0x0080 47 #define RENDERFLAG_NOBLITINVALIDATED 0x0200 48 #define RENDERFLAG_NOSUBTITLES 0x0400 49 #define RENDERFLAG_FROMSPLIT 0x0800 50 #define RENDERFLAG_DOUBLECOORDS 0x1000 51 #define RENDERFLAG_DOUBLEVIDEO 0x2000 55 static const int kSpriteCount = 100;
56 static const int kFontCount = 16;
57 static const int kFrontSurface = 20;
58 static const int kBackSurface = 21;
59 static const int kAnimSurface = 22;
60 static const int kCursorSurface = 23;
61 static const int kCaptureSurface = 30;
68 FontToSprite() : sprite(0), base(0), width(0), height(0) {}
98 const char *_textToPrint;
105 int16 _subtitleColor;
108 Font *_fonts[kFontCount];
112 int16 _invalidatedCount;
113 int16 _invalidatedLefts[30];
114 int16 _invalidatedTops[30];
115 int16 _invalidatedRights[30];
116 int16 _invalidatedBottoms[30];
120 bool _noInvalidated57;
121 bool _paletteCleared;
127 int16 _unusedPalette1[18];
128 int16 _unusedPalette2[16];
139 int16 _transparentCursor;
140 uint32 _cursorTimeKey;
147 int32 _cursorHotspotXVar;
148 int32 _cursorHotspotYVar;
150 int32 _cursorHotspotX;
151 int32 _cursorHotspotY;
158 int8 _cursorAnimLow[40];
159 int8 _cursorAnimHigh[40];
160 int8 _cursorAnimDelays[40];
163 bool _cursorDrawnFromScripts;
167 int16 _palLoadData1[4];
168 int16 _palLoadData2[4];
176 int16 _scrollOffsetY;
177 int16 _scrollOffsetX;
185 int16 _winVarArrayLeft;
186 int16 _winVarArrayTop;
187 int16 _winVarArrayWidth;
188 int16 _winVarArrayHeight;
189 int16 _winVarArrayStatus;
190 int16 _winVarArrayLimitsX;
191 int16 _winVarArrayLimitsY;
194 void invalidateRect(int16 left, int16 top, int16 right, int16 bottom);
195 void blitInvalidated();
199 void dirtiedRect(int16 surface, int16 left, int16 top, int16 right, int16 bottom);
200 void dirtiedRect(
SurfacePtr surface, int16 left, int16 top, int16 right, int16 bottom);
202 void initSpriteSurf(int16 index, int16 width, int16 height, int16 flags, byte bpp = 0);
203 void freeSprite(int16 index);
204 void adjustCoords(
char adjust, int16 *coord1, int16 *coord2);
205 void adjustCoords(
char adjust, uint16 *coord1, uint16 *coord2) {
206 adjustCoords(adjust, (int16 *)coord1, (int16 *)coord2);
208 void resizeCursors(int16 width, int16 height, int16 count,
bool transparency);
209 int stringLength(
const char *str, uint16 fontIndex);
210 void printTextCentered(int16
id, int16 left, int16 top, int16 right,
211 int16 bottom,
const char *str, int16 fontIndex, int16 color);
212 void drawButton( uint16
id, int16 left, int16 top, int16 right, int16 bottom,
char *paramStr, int16 var3, int16 var4, int16 shortId);
214 int32 getSpriteRectSize(int16 index);
215 void forceBlit(
bool backwards =
false);
217 static const int16 _wobbleTable[360];
218 void wobble(
Surface &surfDesc);
220 Font *loadFont(
const char *path)
const;
221 bool loadFont(uint16 fontIndex,
const char *path);
223 virtual void initScreen() = 0;
224 virtual void closeScreen() = 0;
225 virtual void blitCursor() = 0;
227 virtual void animateCursor(int16 cursor) = 0;
228 virtual void printTotText(int16
id) = 0;
229 virtual void spriteOperation(int16 operation,
bool ttsAddHotspotText =
true) = 0;
231 virtual int16 openWin(int16
id) {
return 0; }
232 virtual void closeWin(int16
id) {}
233 virtual int16 handleCurWin() {
return 0; }
234 virtual int16 getWinFromCoord(int16 &dx, int16 &dy) {
return -1; }
235 virtual void moveWin(int16
id) {}
236 virtual bool overlapWin(int16 idWin1, int16 idWin2) {
return false; }
237 virtual void closeAllWin() {}
238 virtual void activeWin(int16
id) {}
252 void initScreen()
override;
253 void closeScreen()
override;
254 void blitCursor()
override;
255 void animateCursor(int16 cursor)
override;
256 void printTotText(int16
id)
override;
257 void spriteOperation(int16 operation,
bool ttsAddHotspotText =
true)
override;
265 void initScreen()
override;
266 void closeScreen()
override;
267 void blitCursor()
override;
268 void animateCursor(int16 cursor)
override;
269 void printTotText(int16
id)
override;
270 void spriteOperation(int16 operation,
bool ttsAddHotspotText =
true)
override;
276 uint8 _mayorWorkaroundStatus;
278 void fixLittleRedStrings();
283 void initScreen()
override;
293 void spriteOperation(int16 operation,
bool ttsAddHotspotText =
true)
override;
295 void decompWin(int16 x, int16 y,
SurfacePtr destPtr);
296 void drawWin(int16 fct);
297 void saveWin(int16
id);
298 void restoreWin(int16
id);
299 void handleWinBorder(int16
id);
300 void drawWinTrace(int16 left, int16 top, int16 width, int16 height);
302 int16 openWin(int16
id)
override;
303 void closeWin(int16
id)
override;
304 int16 getWinFromCoord(int16 &dx, int16 &dy)
override;
305 int16 handleCurWin()
override;
306 void activeWin(int16
id)
override;
307 void moveWin(int16
id)
override;
308 bool overlapWin(int16 idWin1, int16 idWin2)
override;
309 void closeAllWin()
override;
320 int16 rectBottom = 0;
329 void printTotText(int16
id)
override;
330 void spriteOperation(int16 operation,
bool ttsAddHotspotText =
true)
override;
339 void initScreen()
override;
340 void animateCursor(int16 cursor)
override;
346 bool loadCursorFile();
352 #define DRAW_BLITSURF 0 353 #define DRAW_PUTPIXEL 1 354 #define DRAW_FILLRECT 2 355 #define DRAW_DRAWLINE 3 356 #define DRAW_INVALIDATE 4 357 #define DRAW_LOADSPRITE 5 358 #define DRAW_PRINTTEXT 6 359 #define DRAW_DRAWBAR 7 360 #define DRAW_CLEARRECT 8 361 #define DRAW_FILLRECTABS 9 362 #define DRAW_DRAWLETTER 10
Definition: algorithm.h:29
Definition: surface.h:106