- 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
This commit is contained in:
Benjamin Haisch 2008-10-04 21:40:14 +00:00
parent b41cd58cee
commit 99f8add65c
2 changed files with 28 additions and 13 deletions

View file

@ -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) {