From 8e28a2c0d0fe03bf3ef0f6315ceeb637846f4881 Mon Sep 17 00:00:00 2001 From: uruk Date: Sat, 26 Jul 2014 13:37:59 +0200 Subject: CGE2: Make the debug channel of the opcodes more verbose. --- engines/cge2/snail.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'engines/cge2/snail.cpp') 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: -- cgit v1.2.3