aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/console.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sci/console.cpp')
-rw-r--r--engines/sci/console.cpp54
1 files changed, 53 insertions, 1 deletions
diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp
index 9607a8e66d..5b5301b468 100644
--- a/engines/sci/console.cpp
+++ b/engines/sci/console.cpp
@@ -53,6 +53,7 @@
#include "video/avi_decoder.h"
#include "sci/video/seq_decoder.h"
#ifdef ENABLE_SCI32
+#include "sci/graphics/frameout.h"
#include "video/coktel_decoder.h"
#include "sci/video/robot_decoder.h"
#endif
@@ -131,6 +132,10 @@ Console::Console(SciEngine *engine) : GUI::Debugger(),
DCmd_Register("al", WRAP_METHOD(Console, cmdAnimateList)); // alias
DCmd_Register("window_list", WRAP_METHOD(Console, cmdWindowList));
DCmd_Register("wl", WRAP_METHOD(Console, cmdWindowList)); // alias
+ DCmd_Register("plane_list", WRAP_METHOD(Console, cmdPlaneList));
+ DCmd_Register("pl", WRAP_METHOD(Console, cmdPlaneList)); // alias
+ DCmd_Register("plane_items", WRAP_METHOD(Console, cmdPlaneItemList));
+ DCmd_Register("pi", WRAP_METHOD(Console, cmdPlaneItemList)); // alias
DCmd_Register("saved_bits", WRAP_METHOD(Console, cmdSavedBits));
DCmd_Register("show_saved_bits", WRAP_METHOD(Console, cmdShowSavedBits));
// Segments
@@ -365,7 +370,9 @@ bool Console::cmdHelp(int argc, const char **argv) {
DebugPrintf(" pic_visualize - Enables visualization of the drawing process of EGA pictures\n");
DebugPrintf(" undither - Enable/disable undithering\n");
DebugPrintf(" play_video - Plays a SEQ, AVI, VMD, RBT or DUK video\n");
- DebugPrintf(" animate_object_list / al - Shows the current list of objects in kAnimate's draw list\n");
+ DebugPrintf(" animate_list / al - Shows the current list of objects in kAnimate's draw list (SCI0 - SCI1.1)\n");
+ DebugPrintf(" window_list / wl - Shows a list of all the windows (ports) in the draw list (SCI0 - SCI1.1)\n");
+ DebugPrintf(" plane_list / pl - Shows a list of all the planes in the draw list (SCI2+)\n");
DebugPrintf(" saved_bits - List saved bits on the hunk\n");
DebugPrintf(" show_saved_bits - Display saved bits\n");
DebugPrintf("\n");
@@ -1589,6 +1596,8 @@ bool Console::cmdAnimateList(int argc, const char **argv) {
if (_engine->_gfxAnimate) {
DebugPrintf("Animate list:\n");
_engine->_gfxAnimate->printAnimateList(this);
+ } else {
+ DebugPrintf("This SCI version does not have an animate list\n");
}
return true;
}
@@ -1597,9 +1606,52 @@ bool Console::cmdWindowList(int argc, const char **argv) {
if (_engine->_gfxPorts) {
DebugPrintf("Window list:\n");
_engine->_gfxPorts->printWindowList(this);
+ } else {
+ DebugPrintf("This SCI version does not have a list of ports\n");
}
return true;
+}
+bool Console::cmdPlaneList(int argc, const char **argv) {
+#ifdef ENABLE_SCI32
+ if (_engine->_gfxFrameout) {
+ DebugPrintf("Plane list:\n");
+ _engine->_gfxFrameout->printPlaneList(this);
+ } else {
+ DebugPrintf("This SCI version does not have a list of planes\n");
+ }
+#else
+ DebugPrintf("SCI32 isn't included in this compiled executable\n");
+#endif
+ return true;
+}
+
+bool Console::cmdPlaneItemList(int argc, const char **argv) {
+ if (argc != 2) {
+ DebugPrintf("Shows the list of items for a plane\n");
+ DebugPrintf("Usage: %s <plane address>\n", argv[0]);
+ return true;
+ }
+
+ reg_t planeObject = NULL_REG;
+
+ if (parse_reg_t(_engine->_gamestate, argv[1], &planeObject, false)) {
+ DebugPrintf("Invalid address passed.\n");
+ DebugPrintf("Check the \"addresses\" command on how to use addresses\n");
+ return true;
+ }
+
+#ifdef ENABLE_SCI32
+ if (_engine->_gfxFrameout) {
+ DebugPrintf("Plane item list:\n");
+ _engine->_gfxFrameout->printPlaneItemList(this, planeObject);
+ } else {
+ DebugPrintf("This SCI version does not have a list of plane items\n");
+ }
+#else
+ DebugPrintf("SCI32 isn't included in this compiled executable\n");
+#endif
+ return true;
}
bool Console::cmdSavedBits(int argc, const char **argv) {