diff options
author | Martin Kiewitz | 2009-10-07 15:53:34 +0000 |
---|---|---|
committer | Martin Kiewitz | 2009-10-07 15:53:34 +0000 |
commit | cb31d302b9600123e0748ddb655090899095a23b (patch) | |
tree | ec8e2b538a7606f1234e47489cd4d0f0654863d1 /engines/sci/gui | |
parent | 1dfe7578cba4894630bd6fa093cfa1607fbdad6e (diff) | |
download | scummvm-rg350-cb31d302b9600123e0748ddb655090899095a23b.tar.gz scummvm-rg350-cb31d302b9600123e0748ddb655090899095a23b.tar.bz2 scummvm-rg350-cb31d302b9600123e0748ddb655090899095a23b.zip |
SCI/newgui: implemented debug command show_map
svn-id: r44735
Diffstat (limited to 'engines/sci/gui')
-rw-r--r-- | engines/sci/gui/gui.cpp | 5 | ||||
-rw-r--r-- | engines/sci/gui/gui.h | 2 | ||||
-rw-r--r-- | engines/sci/gui/gui_screen.cpp | 22 | ||||
-rw-r--r-- | engines/sci/gui/gui_screen.h | 5 |
4 files changed, 33 insertions, 1 deletions
diff --git a/engines/sci/gui/gui.cpp b/engines/sci/gui/gui.cpp index 25c61ae7fb..f04956cb48 100644 --- a/engines/sci/gui/gui.cpp +++ b/engines/sci/gui/gui.cpp @@ -497,4 +497,9 @@ void SciGui::moveCursor(Common::Point pos) { // FIXME! } +bool SciGui::debugShowMap(int mapNo) { + _screen->debugShowMap(mapNo); + return false; +} + } // End of namespace Sci diff --git a/engines/sci/gui/gui.h b/engines/sci/gui/gui.h index fafc6a8a10..ba3f1fd9f4 100644 --- a/engines/sci/gui/gui.h +++ b/engines/sci/gui/gui.h @@ -90,6 +90,8 @@ public: virtual void setCursorPos(Common::Point pos); virtual void moveCursor(Common::Point pos); + virtual bool debugShowMap(int mapNo); + private: EngineState *_s; SciGuiScreen *_screen; diff --git a/engines/sci/gui/gui_screen.cpp b/engines/sci/gui/gui_screen.cpp index 1079b4c3f9..6f1b278739 100644 --- a/engines/sci/gui/gui_screen.cpp +++ b/engines/sci/gui/gui_screen.cpp @@ -51,6 +51,9 @@ SciGuiScreen::SciGuiScreen(int16 width, int16 height, int16 scaleFactor) : _controlScreen = initScreen(_pixels); _displayScreen = initScreen(_displayPixels); + // Sets display screen to be actually displayed + _activeScreen = _displayScreen; + for (i = 0; i < _height; i++) { _baseTable[i] = base; _baseDisplayTable[i] = base; base += _width; @@ -73,7 +76,7 @@ byte *SciGuiScreen::initScreen(uint16 pixelCount) { } void SciGuiScreen::copyToScreen() { - g_system->copyRectToScreen(_displayScreen, _displayWidth, 0, 0, _displayWidth, _displayHeight); + g_system->copyRectToScreen(_activeScreen, _displayWidth, 0, 0, _displayWidth, _displayHeight); } byte SciGuiScreen::getDrawingMask(byte color, byte prio, byte control) { @@ -237,4 +240,21 @@ void SciGuiScreen::dither() { } } +void SciGuiScreen::debugShowMap(int mapNo) { + switch (mapNo) { + case 0: + _activeScreen = _visualScreen; + break; + case 1: + _activeScreen = _priorityScreen; + break; + case 2: + _activeScreen = _controlScreen; + break; + case 3: + _activeScreen = _displayScreen; + break; + } +} + } // End of namespace Sci diff --git a/engines/sci/gui/gui_screen.h b/engines/sci/gui/gui_screen.h index c3f2be95b8..0ce0f0f13c 100644 --- a/engines/sci/gui/gui_screen.h +++ b/engines/sci/gui/gui_screen.h @@ -63,6 +63,8 @@ public: void dither(); + void debugShowMap(int mapNo); + uint16 _width; uint16 _height; uint _pixels; @@ -89,6 +91,9 @@ public: // HACK. TODO: make private // this screen is the one that is actually displayed to the user. It may be 640x480 for japanese SCI1 games // SCI0 games may be undithered in here. Only read from this buffer for Save/ShowBits usage. byte *_displayScreen; + + // this is a pointer to the currently active screen (changing it only required for debug purposes) + byte *_activeScreen; }; } // End of namespace Sci |