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"
53 void palSet(
const uint8 *pal,
int start,
int end,
bool updateScreen =
false);
65 void palFadeIn(uint16 roomNum,
bool dynalum =
false, int16 dynaX = 0, int16 dynaY = 0);
76 void palSetAmigaColor(uint8 color, uint16 rgb);
87 void palCustomLightsOff(uint16 roomNum);
88 void palCustomLightsOn(uint16 roomNum);
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; }
144 void setText(uint16 x, uint16 y,
const char *text,
bool outlined =
true);
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 forceFullRefresh()
force a full refresh (bypassing the dirtyblocks rendering), on next screen update
Definition: display.h:132
void textCurrentColor(uint8 color)
change the current text color
Definition: display.h:160
int getNumColorsForRoom(uint16 room) const
returns the number of colors used by the room
void screenMode(int comPanel, bool inCutaway)
change fullscreen/panel mode
bool isPalFadingDisabled(uint16 room) const
returns true if we shouldn't fade the palette in the specified room
void palSetJoeNormal()
setup palette for Joe's normal clothes
void decodePCX(const uint8 *src, uint32 srcSize, uint8 *dst, uint16 dstPitch, uint16 *w, uint16 *h, uint8 *pal, uint16 palStart, uint16 palEnd)
decode PCX picture data
void palSetJoeDress()
setup palette for Joe's dress
void palGreyPanel()
grey the panel area (used when panel is disabled)
void setFocusRect(const Common::Rect &rect)
Set the focus rectangle to the speaking character.
void palSetAllDirty()
mark all palette entries as dirty
Definition: display.h:91
void palScroll(int start, int end)
scroll some palette colors
void initFont()
initialize font, compute justification sizes
void palFadeOut(uint16 roomNum)
fade the current palette out
void palCustomColors(uint16 roomNum)
custom palette effect for the specified room
void textColor(uint16 y, uint8 color)
change the text color for the specified texts list entry
Definition: display.h:163
void palFadeIn(uint16 roomNum, bool dynalum=false, int16 dynaX=0, int16 dynaY=0)
fade the current palette in
void showMouseCursor(bool show)
show/hide mouse cursor
void drawTexts()
draw the text lists
void setText(uint16 x, uint16 y, const char *text, bool outlined=true)
add the specified text to the texts list
void dynalumUpdate(int16 x, int16 y)
update dynalum for the current room
void palSetPanel()
setup palette for panel and inventory objects
void palCustomFlash()
process a 'palette flash' effect
void palCustomScroll(uint16 roomNum)
custom palette scroll for the specified room
void setDirtyBlock(uint16 x, uint16 y, uint16 w, uint16 h)
mark the specified block as dirty
void palSet(const uint8 *pal, int start, int end, bool updateScreen=false)
update the palette
void setMouseCursor(uint8 *buf, uint16 w, uint16 h)
change mouse cursor bitmap
void decodeIFF(const uint8 *src, uint32 srcSize, uint8 *dst, uint16 dstPitch, uint16 *w, uint16 *h, uint8 *pal, uint16 palStart, uint16 palEnd, uint8 colorBase=0)
decode IFF picture data
void dynalumInit(const char *roomName, uint16 roomNum)
initialize dynalum for the specified room
void setTextCentered(uint16 y, const char *text, bool outlined=true)
add the specified text to the texts list
void clearTexts(uint16 y1, uint16 y2)
remove entries from the texts list
Definition: algorithm.h:29