31 #include "gob/video.h" 39 #define RENDERFLAG_NOINVALIDATE 0x0001 40 #define RENDERFLAG_CAPTUREPUSH 0x0002 41 #define RENDERFLAG_COLLISIONS 0x0004 42 #define RENDERFLAG_CAPTUREPOP 0x0008 43 #define RENDERFLAG_USEDELTAS 0x0010 44 #define RENDERFLAG_BORDERHOTSPOTS 0x0040 45 #define RENDERFLAG_HASWINDOWS 0x0080 46 #define RENDERFLAG_NOBLITINVALIDATED 0x0200 47 #define RENDERFLAG_NOSUBTITLES 0x0400 48 #define RENDERFLAG_FROMSPLIT 0x0800 49 #define RENDERFLAG_DOUBLECOORDS 0x1000 50 #define RENDERFLAG_DOUBLEVIDEO 0x2000 54 static const int kSpriteCount = 100;
55 static const int kFontCount = 16;
56 static const int kFrontSurface = 20;
57 static const int kBackSurface = 21;
58 static const int kAnimSurface = 22;
59 static const int kCursorSurface = 23;
60 static const int kCaptureSurface = 30;
67 FontToSprite() : sprite(0), base(0), width(0), height(0) {}
96 const char *_textToPrint;
103 int16 _subtitleColor;
106 Font *_fonts[kFontCount];
110 int16 _invalidatedCount;
111 int16 _invalidatedLefts[30];
112 int16 _invalidatedTops[30];
113 int16 _invalidatedRights[30];
114 int16 _invalidatedBottoms[30];
118 bool _noInvalidated57;
119 bool _paletteCleared;
125 int16 _unusedPalette1[18];
126 int16 _unusedPalette2[16];
135 int16 _transparentCursor;
136 uint32 _cursorTimeKey;
143 int32 _cursorHotspotXVar;
144 int32 _cursorHotspotYVar;
146 int32 _cursorHotspotX;
147 int32 _cursorHotspotY;
154 int8 _cursorAnimLow[40];
155 int8 _cursorAnimHigh[40];
156 int8 _cursorAnimDelays[40];
159 bool _cursorDrawnFromScripts;
163 int16 _palLoadData1[4];
164 int16 _palLoadData2[4];
172 int16 _scrollOffsetY;
173 int16 _scrollOffsetX;
181 int16 _winVarArrayLeft;
182 int16 _winVarArrayTop;
183 int16 _winVarArrayWidth;
184 int16 _winVarArrayHeight;
185 int16 _winVarArrayStatus;
186 int16 _winVarArrayLimitsX;
187 int16 _winVarArrayLimitsY;
190 void invalidateRect(int16 left, int16 top, int16 right, int16 bottom);
191 void blitInvalidated();
195 uint32 getColor(uint8 index)
const;
197 void dirtiedRect(int16 surface, int16 left, int16 top, int16 right, int16 bottom);
198 void dirtiedRect(
SurfacePtr surface, int16 left, int16 top, int16 right, int16 bottom);
200 void initSpriteSurf(int16 index, int16 width, int16 height, int16 flags);
201 void freeSprite(int16 index);
202 void adjustCoords(
char adjust, int16 *coord1, int16 *coord2);
203 void adjustCoords(
char adjust, uint16 *coord1, uint16 *coord2) {
204 adjustCoords(adjust, (int16 *)coord1, (int16 *)coord2);
206 void resizeCursors(int16 width, int16 height, int16 count,
bool transparency);
207 int stringLength(
const char *str, uint16 fontIndex);
208 void printTextCentered(int16
id, int16 left, int16 top, int16 right,
209 int16 bottom,
const char *str, int16 fontIndex, int16 color);
210 void oPlaytoons_sub_F_1B( uint16
id, int16 left, int16 top, int16 right, int16 bottom,
char *paramStr, int16 var3, int16 var4, int16 shortId);
212 int32 getSpriteRectSize(int16 index);
213 void forceBlit(
bool backwards =
false);
215 static const int16 _wobbleTable[360];
216 void wobble(
Surface &surfDesc);
218 Font *loadFont(
const char *path)
const;
219 bool loadFont(uint16 fontIndex,
const char *path);
221 virtual void initScreen() = 0;
222 virtual void closeScreen() = 0;
223 virtual void blitCursor() = 0;
225 virtual void animateCursor(int16 cursor) = 0;
226 virtual void printTotText(int16
id) = 0;
227 virtual void spriteOperation(int16 operation) = 0;
229 virtual int16 openWin(int16
id) {
return 0; }
230 virtual void closeWin(int16
id) {}
231 virtual int16 handleCurWin() {
return 0; }
232 virtual int16 getWinFromCoord(int16 &dx, int16 &dy) {
return -1; }
233 virtual void moveWin(int16
id) {}
234 virtual bool overlapWin(int16 idWin1, int16 idWin2) {
return false; }
235 virtual void closeAllWin() {}
236 virtual void activeWin(int16
id) {}
247 void initScreen()
override;
248 void closeScreen()
override;
249 void blitCursor()
override;
250 void animateCursor(int16 cursor)
override;
251 void printTotText(int16
id)
override;
252 void spriteOperation(int16 operation)
override;
260 void initScreen()
override;
261 void closeScreen()
override;
262 void blitCursor()
override;
263 void animateCursor(int16 cursor)
override;
264 void printTotText(int16
id)
override;
265 void spriteOperation(int16 operation)
override;
271 uint8 _mayorWorkaroundStatus;
273 void fixLittleRedStrings();
278 void initScreen()
override;
288 void spriteOperation(int16 operation)
override;
290 void decompWin(int16 x, int16 y,
SurfacePtr destPtr);
291 void drawWin(int16 fct);
292 void saveWin(int16
id);
293 void restoreWin(int16
id);
294 void handleWinBorder(int16
id);
295 void drawWinTrace(int16 left, int16 top, int16 width, int16 height);
297 int16 openWin(int16
id)
override;
298 void closeWin(int16
id)
override;
299 int16 getWinFromCoord(int16 &dx, int16 &dy)
override;
300 int16 handleCurWin()
override;
301 void activeWin(int16
id)
override;
302 void moveWin(int16
id)
override;
303 bool overlapWin(int16 idWin1, int16 idWin2)
override;
304 void closeAllWin()
override;
312 void spriteOperation(int16 operation)
override;
321 void initScreen()
override;
322 void animateCursor(int16 cursor)
override;
328 bool loadCursorFile();
334 #define DRAW_BLITSURF 0 335 #define DRAW_PUTPIXEL 1 336 #define DRAW_FILLRECT 2 337 #define DRAW_DRAWLINE 3 338 #define DRAW_INVALIDATE 4 339 #define DRAW_LOADSPRITE 5 340 #define DRAW_PRINTTEXT 6 341 #define DRAW_DRAWBAR 7 342 #define DRAW_CLEARRECT 8 343 #define DRAW_FILLRECTABS 9 344 #define DRAW_DRAWLETTER 10
Definition: algorithm.h:29
Definition: surface.h:100