[Scummvm-cvs-logs] scummvm master -> 1e68000def927dcb7312dc641caabb01cf241744
bluegr
md5 at scummvm.org
Sun Mar 20 03:12:08 CET 2011
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
1e68000def SCI: Added a new console command, "animate_list" or "al"
Commit: 1e68000def927dcb7312dc641caabb01cf241744
https://github.com/scummvm/scummvm/commit/1e68000def927dcb7312dc641caabb01cf241744
Author: md5 (md5 at scummvm.org)
Date: 2011-03-19T19:10:29-07:00
Commit Message:
SCI: Added a new console command, "animate_list" or "al"
This shows the current animation list, along with object properties,
positions and the scripts they belong to
Changed paths:
engines/sci/console.cpp
engines/sci/console.h
engines/sci/graphics/animate.cpp
engines/sci/graphics/animate.h
diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp
index fddae53..1174bf8 100644
--- a/engines/sci/console.cpp
+++ b/engines/sci/console.cpp
@@ -40,6 +40,7 @@
#include "sci/sound/music.h"
#include "sci/sound/drivers/mididriver.h"
#include "sci/sound/drivers/map-mt32-to-gm.h"
+#include "sci/graphics/animate.h"
#include "sci/graphics/cache.h"
#include "sci/graphics/cursor.h"
#include "sci/graphics/screen.h"
@@ -125,6 +126,8 @@ Console::Console(SciEngine *engine) : GUI::Debugger(),
DCmd_Register("undither", WRAP_METHOD(Console, cmdUndither));
DCmd_Register("pic_visualize", WRAP_METHOD(Console, cmdPicVisualize));
DCmd_Register("play_video", WRAP_METHOD(Console, cmdPlayVideo));
+ DCmd_Register("animate_list", WRAP_METHOD(Console, cmdAnimateList));
+ DCmd_Register("al", WRAP_METHOD(Console, cmdAnimateList)); // alias
// Segments
DCmd_Register("segment_table", WRAP_METHOD(Console, cmdPrintSegmentTable));
DCmd_Register("segtable", WRAP_METHOD(Console, cmdPrintSegmentTable)); // alias
@@ -356,6 +359,8 @@ bool Console::cmdHelp(int argc, const char **argv) {
DebugPrintf(" draw_cel - Draws a cel from a view resource\n");
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("\n");
DebugPrintf("Segments:\n");
DebugPrintf(" segment_table / segtable - Lists all segments\n");
@@ -1576,6 +1581,12 @@ bool Console::cmdPlayVideo(int argc, const char **argv) {
}
}
+bool Console::cmdAnimateList(int argc, const char **argv) {
+ DebugPrintf("Animate list:\n");
+ _engine->_gfxAnimate->printAnimateList(this);
+ return true;
+}
+
bool Console::cmdParseGrammar(int argc, const char **argv) {
DebugPrintf("Parse grammar, in strict GNF:\n");
diff --git a/engines/sci/console.h b/engines/sci/console.h
index d454543..9247339 100644
--- a/engines/sci/console.h
+++ b/engines/sci/console.h
@@ -95,6 +95,7 @@ private:
bool cmdUndither(int argc, const char **argv);
bool cmdPicVisualize(int argc, const char **argv);
bool cmdPlayVideo(int argc, const char **argv);
+ bool cmdAnimateList(int argc, const char **argv);
// Segments
bool cmdPrintSegmentTable(int argc, const char **argv);
bool cmdSegmentInfo(int argc, const char **argv);
diff --git a/engines/sci/graphics/animate.cpp b/engines/sci/graphics/animate.cpp
index e02b27c..d8f3fa0 100644
--- a/engines/sci/graphics/animate.cpp
+++ b/engines/sci/graphics/animate.cpp
@@ -27,6 +27,7 @@
#include "common/stack.h"
#include "graphics/primitives.h"
+#include "sci/console.h"
#include "sci/sci.h"
#include "sci/event.h"
#include "sci/engine/kernel.h"
@@ -728,4 +729,21 @@ void GfxAnimate::kernelAddToPicView(GuiResourceId viewId, int16 loopNo, int16 ce
addToPicSetPicNotValid();
}
+void GfxAnimate::printAnimateList(Console *con) {
+ AnimateList::iterator it;
+ const AnimateList::iterator end = _list.end();
+
+ for (it = _list.begin(); it != end; ++it) {
+ Script *scr = _s->_segMan->getScriptIfLoaded(it->object.segment);
+ int16 scriptNo = scr ? scr->getScriptNumber() : -1;
+
+ con->DebugPrintf("%04x:%04x (%s), script %d, view %d (%d, %d), pal %d, "
+ "at %d, %d, scale %d, %d / %d (z: %d, prio: %d, shown: %d, signal: %d)\n",
+ PRINT_REG(it->object), _s->_segMan->getObjectName(it->object),
+ scriptNo, it->viewId, it->loopNo, it->celNo, it->paletteNo,
+ it->x, it->y, it->scaleX, it->scaleY, it->scaleSignal,
+ it->z, it->priority, it->showBitsFlag, it->signal);
+ }
+}
+
} // End of namespace Sci
diff --git a/engines/sci/graphics/animate.h b/engines/sci/graphics/animate.h
index 87072b7..b2aadcb 100644
--- a/engines/sci/graphics/animate.h
+++ b/engines/sci/graphics/animate.h
@@ -77,6 +77,7 @@ struct AnimateEntry {
typedef Common::List<AnimateEntry> AnimateList;
typedef Common::Array<AnimateEntry> AnimateArray;
+class Console;
class GfxCache;
class GfxCursor;
class GfxPorts;
@@ -105,6 +106,7 @@ public:
void reAnimate(Common::Rect rect);
void addToPicDrawCels();
void addToPicDrawView(GuiResourceId viewId, int16 loopNo, int16 celNo, int16 leftPos, int16 topPos, int16 priority, int16 control);
+ void printAnimateList(Console *con);
virtual void kernelAnimate(reg_t listReference, bool cycle, int argc, reg_t *argv);
virtual void kernelAddToPicList(reg_t listReference, int argc, reg_t *argv);
More information about the Scummvm-git-logs
mailing list