diff options
author | md5 | 2011-03-20 04:10:29 +0200 |
---|---|---|
committer | md5 | 2011-03-20 04:10:29 +0200 |
commit | 1e68000def927dcb7312dc641caabb01cf241744 (patch) | |
tree | ace12e8e0b5cff34562d3a7c0e91713ce7e14fc9 /engines/sci/graphics | |
parent | 4b371a9e7a73b08454be053134a5751b5f5152b3 (diff) | |
download | scummvm-rg350-1e68000def927dcb7312dc641caabb01cf241744.tar.gz scummvm-rg350-1e68000def927dcb7312dc641caabb01cf241744.tar.bz2 scummvm-rg350-1e68000def927dcb7312dc641caabb01cf241744.zip |
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
Diffstat (limited to 'engines/sci/graphics')
-rw-r--r-- | engines/sci/graphics/animate.cpp | 18 | ||||
-rw-r--r-- | engines/sci/graphics/animate.h | 2 |
2 files changed, 20 insertions, 0 deletions
diff --git a/engines/sci/graphics/animate.cpp b/engines/sci/graphics/animate.cpp index e02b27c788..d8f3fa09b0 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 87072b7a8d..b2aadcbead 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); |