From 5a62f79bd0c47347082007540cff7aacbd4875dc Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Sun, 27 Nov 2005 05:49:35 +0000 Subject: More string fixes for CD version, due to stack order differences. svn-id: r19715 --- kyra/script_v1.cpp | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'kyra') diff --git a/kyra/script_v1.cpp b/kyra/script_v1.cpp index 865daa3ea3..5b26cc5e1e 100644 --- a/kyra/script_v1.cpp +++ b/kyra/script_v1.cpp @@ -771,8 +771,14 @@ int KyraEngine::cmd_loadPageFromDisk(ScriptState *script) { } int KyraEngine::cmd_customPrintTalkString(ScriptState *script) { - debug(3, "cmd_customPrintTalkString(0x%X) ('%s', %d, %d, %d)", script, stackPosString(0), stackPos(1), stackPos(2), stackPos(3) & 0xFF); - printTalkTextMessage(stackPosString(0), stackPos(1), stackPos(2), stackPos(3) & 0xFF, 0, 2); + if (_features & GF_TALKIE) { + debug(3, "cmd_customPrintTalkString(0x%X) ('%s', %d, %d, %d)", script, stackPosString(1), stackPos(2), stackPos(3), stackPos(4) & 0xFF); + printTalkTextMessage(stackPosString(1), stackPos(2), stackPos(3), stackPos(4) & 0xFF, 0, 2); + } else { + debug(3, "cmd_customPrintTalkString(0x%X) ('%s', %d, %d, %d)", script, stackPosString(0), stackPos(1), stackPos(2), stackPos(3) & 0xFF); + printTalkTextMessage(stackPosString(0), stackPos(1), stackPos(2), stackPos(3) & 0xFF, 0, 2); + } + return 0; } @@ -1421,8 +1427,14 @@ int KyraEngine::cmd_setScaleDepthTableValue(ScriptState *script) { } int KyraEngine::cmd_message(ScriptState *script) { - debug(9, "cmd_message(0x%X)", script); - drawSentenceCommand(stackPosString(0), stackPos(1)); + if (_features & GF_TALKIE) { + debug(9, "cmd_message(0x%X)", script); + drawSentenceCommand(stackPosString(1), stackPos(2)); + } else { + debug(9, "cmd_message(0x%X)", script); + drawSentenceCommand(stackPosString(0), stackPos(1)); + } + return 0; } -- cgit v1.2.3