aboutsummaryrefslogtreecommitdiff
path: root/engines/cge2/snail.cpp
diff options
context:
space:
mode:
authoruruk2014-07-26 13:37:59 +0200
committeruruk2014-07-26 13:37:59 +0200
commit8e28a2c0d0fe03bf3ef0f6315ceeb637846f4881 (patch)
treea7ad2761dd40dc67eaf88fc4f7204e886653185d /engines/cge2/snail.cpp
parent0bfde974cde8eea024d66d35b5444ad4c1469701 (diff)
downloadscummvm-rg350-8e28a2c0d0fe03bf3ef0f6315ceeb637846f4881.tar.gz
scummvm-rg350-8e28a2c0d0fe03bf3ef0f6315ceeb637846f4881.tar.bz2
scummvm-rg350-8e28a2c0d0fe03bf3ef0f6315ceeb637846f4881.zip
CGE2: Make the debug channel of the opcodes more verbose.
Diffstat (limited to 'engines/cge2/snail.cpp')
-rw-r--r--engines/cge2/snail.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/engines/cge2/snail.cpp b/engines/cge2/snail.cpp
index ba33dd04eb..b4a78f0aaf 100644
--- a/engines/cge2/snail.cpp
+++ b/engines/cge2/snail.cpp
@@ -102,7 +102,15 @@ void CommandHandler::runCommand() {
if (tailCmd._commandType > kCmdSpr)
spr = (tailCmd._ref < 0) ? ((Sprite *)tailCmd._spritePtr) : _vm->locate(tailCmd._ref);
- debugC(1, kCGE2DebugOpcode, getComStr(tailCmd._commandType));
+ Common::String sprStr;
+ if (spr && spr->_file && tailCmd._commandType != kCmdGhost)
+ // In case of kCmdGhost _spritePtr stores a pointer to a Bitmap, not to a Sprite...
+ sprStr = Common::String(spr->_file);
+ else
+ sprStr = "None";
+ if (sprStr.empty())
+ sprStr = "None";
+ debugC(1, kCGE2DebugOpcode, "Command: %s; Ref: %d; Val: %d; Sprite: %s;", getComStr(tailCmd._commandType), tailCmd._ref, tailCmd._val, sprStr.c_str());
switch (tailCmd._commandType) {
case kCmdUse: