aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/gui32
diff options
context:
space:
mode:
authorMartin Kiewitz2009-10-07 15:53:34 +0000
committerMartin Kiewitz2009-10-07 15:53:34 +0000
commitcb31d302b9600123e0748ddb655090899095a23b (patch)
treeec8e2b538a7606f1234e47489cd4d0f0654863d1 /engines/sci/gui32
parent1dfe7578cba4894630bd6fa093cfa1607fbdad6e (diff)
downloadscummvm-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/gui32')
-rw-r--r--engines/sci/gui32/gui32.cpp24
-rw-r--r--engines/sci/gui32/gui32.h2
2 files changed, 26 insertions, 0 deletions
diff --git a/engines/sci/gui32/gui32.cpp b/engines/sci/gui32/gui32.cpp
index 4fdffe3267..af0ddebd2c 100644
--- a/engines/sci/gui32/gui32.cpp
+++ b/engines/sci/gui32/gui32.cpp
@@ -2048,4 +2048,28 @@ void SciGui32::moveCursor(Common::Point pos) {
gfxop_get_event(s->gfx_state, SCI_EVT_PEEK);
}
+bool SciGui32::debugShowMap(int mapNo) {
+ gfxop_set_clip_zone(s->gfx_state, gfx_rect_fullscreen);
+
+ switch (mapNo) {
+ case 0:
+ s->visual->add_dirty_abs((GfxContainer *)s->visual, gfx_rect(0, 0, 320, 200), 0);
+ s->visual->draw(Common::Point(0, 0));
+ break;
+
+ case 1:
+ gfx_xlate_pixmap(s->gfx_state->pic->priority_map, s->gfx_state->driver->getMode());
+ gfxop_draw_pixmap(s->gfx_state, s->gfx_state->pic->priority_map, gfx_rect(0, 0, 320, 200), Common::Point(0, 0));
+ break;
+
+ case 2:
+ gfx_xlate_pixmap(s->gfx_state->control_map, s->gfx_state->driver->getMode());
+ gfxop_draw_pixmap(s->gfx_state, s->gfx_state->control_map, gfx_rect(0, 0, 320, 200), Common::Point(0, 0));
+ break;
+ }
+
+ gfxop_update(s->gfx_state);
+ return false;
+}
+
} // End of namespace Sci
diff --git a/engines/sci/gui32/gui32.h b/engines/sci/gui32/gui32.h
index d9d5909b98..c2fa45da8a 100644
--- a/engines/sci/gui32/gui32.h
+++ b/engines/sci/gui32/gui32.h
@@ -83,6 +83,8 @@ public:
void setCursorPos(Common::Point pos);
void moveCursor(Common::Point pos);
+ bool debugShowMap(int mapNo);
+
private:
EngineState *s;
bool _usesOldGfxFunctions;