22 #ifndef QUEEN_DISPLAY_H 23 #define QUEEN_DISPLAY_H 25 #include "common/str.h" 26 #include "common/util.h" 27 #include "common/random.h" 28 #include "queen/defs.h" 47 void dynalumInit(
const char *roomName, uint16 roomNum);
50 void dynalumUpdate(int16 x, int16 y);
53 void palSet(
const uint8 *pal,
int start,
int end,
bool updateScreen =
false);
56 void palSetJoeDress();
59 void palSetJoeNormal();
65 void palFadeIn(uint16 roomNum,
bool dynalum =
false, int16 dynaX = 0, int16 dynaY = 0);
68 void palFadeOut(uint16 roomNum);
74 void palScroll(
int start,
int end);
76 void palSetAmigaColor(uint8 color, uint16 rgb);
79 void palCustomColors(uint16 roomNum);
82 void palCustomScroll(uint16 roomNum);
85 void palCustomFlash();
87 void palCustomLightsOff(uint16 roomNum);
88 void palCustomLightsOn(uint16 roomNum);
94 int getNumColorsForRoom(uint16 room)
const;
97 bool isPalFadingDisabled(uint16 room)
const;
100 void screenMode(
int comPanel,
bool inCutaway);
102 void prepareUpdate();
103 void update(
bool dynalum =
false, int16 dynaX = 0, int16 dynaY = 0);
106 void setupNewRoom(
const char *name, uint16 room);
108 void drawBobSprite(
const uint8 *data, uint16 x, uint16 y, uint16 w, uint16 h, uint16 pitch,
bool xflip);
109 void drawBobPasteDown(
const uint8 *data, uint16 x, uint16 y, uint16 w, uint16 h);
110 void drawInventoryItem(
const uint8 *data, uint16 x, uint16 y, uint16 w, uint16 h);
112 void blit(uint8 *dstBuf, uint16 dstPitch, uint16 x, uint16 y,
const uint8 *srcBuf, uint16 srcPitch, uint16 w, uint16 h,
bool xflip,
bool masked);
113 void fill(uint8 *dstBuf, uint16 dstPitch, uint16 x, uint16 y, uint16 w, uint16 h, uint8 color);
116 void decodePCX(
const uint8 *src, uint32 srcSize, uint8 *dst, uint16 dstPitch, uint16 *w, uint16 *h, uint8 *pal, uint16 palStart, uint16 palEnd);
119 void decodeIFF(
const uint8 *src, uint32 srcSize, uint8 *dst, uint16 dstPitch, uint16 *w, uint16 *h, uint8 *pal, uint16 palStart, uint16 palEnd, uint8 colorBase = 0);
121 void horizontalScrollUpdate(int16 xCamera);
122 void horizontalScroll(int16 scroll);
123 int16 horizontalScroll()
const {
return _horizontalScroll; }
125 void fullscreen(
bool fs) { _fullRefresh = 2; _fullscreen = fs; }
126 bool fullscreen()
const {
return _fullscreen; }
129 void setDirtyBlock(uint16 x, uint16 y, uint16 w, uint16 h);
135 void setMouseCursor(uint8 *buf, uint16 w, uint16 h);
138 void showMouseCursor(
bool show);
144 void setText(uint16 x, uint16 y,
const char *text,
bool outlined =
true);
147 void setTextCentered(uint16 y,
const char *text,
bool outlined =
true);
153 void clearTexts(uint16 y1, uint16 y2);
155 void setupInkColors();
157 uint8 getInkColor(InkColor color)
const {
return _inkColors[color]; }
163 void textColor(uint16 y, uint8 color) { _texts[y].color = color; }
168 int textCenterX(
const char *text)
const;
169 uint16 textWidth(
const char *text)
const;
170 uint16 textWidth(
const char *text, uint16 len)
const;
171 void drawChar(uint16 x, uint16 y, uint8 color,
const uint8 *chr);
172 void drawText(uint16 x, uint16 y, uint8 color,
const char *text,
bool outlined =
true);
173 void drawBox(int16 x1, int16 y1, int16 x2, int16 y2, uint8 col);
175 void shake(
bool reset);
178 void blankScreenEffect1();
179 void blankScreenEffect2();
180 void blankScreenEffect3();
190 enum BufferDimension {
203 int dirtyMin, dirtyMax;
245 uint16 _dirtyBlocksWidth, _dirtyBlocksHeight;
249 uint16 _horizontalScroll;
250 uint16 _bdWidth, _bdHeight;
252 const char *_imageExt;
255 TextSlot _texts[GAME_SCREEN_HEIGHT];
261 uint8 _charWidth[256];
263 uint8 _inkColors[INK_COUNT];
272 static const uint8 _fontRegular[];
273 static const uint8 _fontHebrew[];
274 static const uint8 _fontHebrewAdvBrew[];
275 static const uint8 _fontRussian[];
276 static const uint8 _fontGreek[];
277 static const uint8 _palJoeClothes[];
278 static const uint8 _palJoeDress[];
void textCurrentColor(uint8 color)
change the current text color
Definition: display.h:160
void textColor(uint16 y, uint8 color)
change the text color for the specified texts list entry
Definition: display.h:163
Definition: algorithm.h:29
void palSetAllDirty()
mark all palette entries as dirty
Definition: display.h:91
signed char * fill(signed char *first, signed char *last, Value val)
Definition: algorithm.h:168
void forceFullRefresh()
force a full refresh (bypassing the dirtyblocks rendering), on next screen update ...
Definition: display.h:132