aboutsummaryrefslogtreecommitdiff
path: root/engines/cge2/snail.cpp
diff options
context:
space:
mode:
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: