From 99f8add65cb61d1e8da23f734da249687d24919e Mon Sep 17 00:00:00 2001 From: Benjamin Haisch Date: Sat, 4 Oct 2008 21:40:14 +0000 Subject: - Declared all stack functions as inline - Sleep some ms after 500 opcodes to reduce CPU load - Fixed odd bug in LGoP2 where text disappeared quickly without waiting for user input by returning 0x38 in sfShowPage svn-id: r34746 --- engines/made/scriptfuncs.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'engines/made/scriptfuncs.cpp') diff --git a/engines/made/scriptfuncs.cpp b/engines/made/scriptfuncs.cpp index 0051b80dae..835d846108 100644 --- a/engines/made/scriptfuncs.cpp +++ b/engines/made/scriptfuncs.cpp @@ -195,7 +195,10 @@ int16 ScriptFunctions::sfClearScreen(int16 argc, int16 *argv) { int16 ScriptFunctions::sfShowPage(int16 argc, int16 *argv) { _vm->_screen->show(); - return 0; + // NOTE: We need to return something != 0 here or some game scripts won't + // work correctly. The actual meaning of this value is unknown to me. + // 0x38 was found out by analyzing debug output of the original engine. + return 0x38; } int16 ScriptFunctions::sfPollEvent(int16 argc, int16 *argv) { -- cgit v1.2.3