diff options
author | Gregory Montoir | 2004-12-31 00:25:18 +0000 |
---|---|---|
committer | Gregory Montoir | 2004-12-31 00:25:18 +0000 |
commit | a44e8248159fc836f9d534872b0d55741f0c803c (patch) | |
tree | 47df2cacddf071f0ff1c8a761b3038acc0d8c7d1 /queen/display.h | |
parent | f06348440fd2040cb8bf57849c7e6670db91caf0 (diff) | |
download | scummvm-rg350-a44e8248159fc836f9d534872b0d55741f0c803c.tar.gz scummvm-rg350-a44e8248159fc836f9d534872b0d55741f0c803c.tar.bz2 scummvm-rg350-a44e8248159fc836f9d534872b0d55741f0c803c.zip |
added some comments and re-indented some parts of code
svn-id: r16394
Diffstat (limited to 'queen/display.h')
-rw-r--r-- | queen/display.h | 59 |
1 files changed, 57 insertions, 2 deletions
diff --git a/queen/display.h b/queen/display.h index 4c5857018f..e3d0e5b754 100644 --- a/queen/display.h +++ b/queen/display.h @@ -38,28 +38,61 @@ public: Display(QueenEngine *vm, OSystem *system); ~Display(); + //! initialise dynalum for the specified room void dynalumInit(const char *roomName, uint16 roomNum); + + //! update dynalum for the current room void dynalumUpdate(int16 x, int16 y); + //! convert palette from RGB to RGBA (used before uploading to the backend) void palConvert(uint8 *outPal, const uint8 *inPal, int start, int end); + + //! update the palette void palSet(const uint8 *pal, int start, int end, bool updateScreen = false); + + //! setup palette for Joe's dress void palSetJoeDress(); + + //! setup palette for Joe's normal clothes void palSetJoeNormal(); + + //! setup palette for panel and inventory objects void palSetPanel(); + + //! fade the current palette in void palFadeIn(uint16 roomNum, bool dynalum = false, int16 dynaX = 0, int16 dynaY = 0); + + //! fade the current palette out void palFadeOut(uint16 roomNum); + + //! grey the panel area (used when panel is disabled) void palGreyPanel(); + + //! scroll some palette colors void palScroll(int start, int end); + + //! custom palette effect for the specified room void palCustomColors(uint16 roomNum); + + //! custom palette scroll for the specified room void palCustomScroll(uint16 roomNum); + + //! process a 'palette flash' effect void palCustomFlash(); + void palCustomLightsOff(uint16 roomNum); void palCustomLightsOn(uint16 roomNum); + + //! mark all palette entries as dirty void palSetAllDirty() { _pal.dirtyMin = 0; _pal.dirtyMax = 255; } + //! returns the number of colors used by the room int getNumColorsForRoom(uint16 room) const; + + //! returns true if we shouldn't fade the palette in the specified room bool isPalFadingDisabled(uint16 room) const; + //! change fullscreen/panel mode void screenMode(int comPanel, bool inCutaway); void prepareUpdate(); @@ -75,6 +108,7 @@ public: void blit(uint8 *dstBuf, uint16 dstPitch, uint16 x, uint16 y, const uint8 *srcBuf, uint16 srcPitch, uint16 w, uint16 h, bool xflip, bool masked); void fill(uint8 *dstBuf, uint16 dstPitch, uint16 x, uint16 y, uint16 w, uint16 h, uint8 color); + //! decode a PCX stream void readPCX(uint8 *dst, uint16 dstPitch, const uint8 *src, uint16 w, uint16 h); void horizontalScrollUpdate(int16 xCamera); @@ -84,20 +118,39 @@ public: void fullscreen(bool fs) { _fullRefresh = 2; _fullscreen = fs; } bool fullscreen() const { return _fullscreen; } + //! mark the specified block as dirty void setDirtyBlock(uint16 x, uint16 y, uint16 w, uint16 h); + + //! force a full refresh (bypassing the dirtyblocks rendering), on next screen update void forceFullRefresh() { _fullRefresh = 2; } + //! change mouse cursor bitmap void setMouseCursor(uint8 *buf, uint16 w, uint16 h); + + //! show/hide mouse cursor void showMouseCursor(bool show); + //! initialise font, compute justification sizes void initFont(); + //! add the specified text to the texts list void setText(uint16 x, uint16 y, const char *text, bool outlined = true); + + //! add the specified text to the texts list void setTextCentered(uint16 y, const char *text, bool outlined = true); + + //! draw the text lists void drawTexts(); + + //! remove entries from the texts list void clearTexts(uint16 y1, uint16 y2); + + //! change the current text color void textCurrentColor(uint8 color) { _curTextColor = color; } + + //! change the text color for the specified texts list entry void textColor(uint16 y, uint8 color) { _texts[y].color = color; } + int textCenterX(const char *text) const; uint16 textWidth(const char *text) const; uint16 textWidth(const char *text, uint16 len) const; @@ -166,13 +219,15 @@ private: uint16 _horizontalScroll; uint16 _bdWidth, _bdHeight; + //! texts list TextSlot _texts[GAME_SCREEN_HEIGHT]; + + //! current text color to use for display uint8 _curTextColor; + //! font justification sizes uint8 _charWidth[256]; - bool _gotTick; - Common::RandomSource _rnd; Dynalum _dynalum; OSystem *_system; |