AGI: Add heuristic to detect delay loops within scripts
And in that case poll events, delay for a few milliseconds and update screen. This somewhat worked before the graphics rewrite because of a timer hack. This one tries to detect actual inner loops. Happens in at least Police Quest 1 when playing poker.
This commit is contained in:
parent
dcbcbb2120
commit
7b75936f56
5 changed files with 48 additions and 0 deletions
|
@ -2327,6 +2327,9 @@ int AgiEngine::runLogic(int16 logicNr) {
|
|||
}
|
||||
#endif
|
||||
|
||||
// Just a counter for every instruction, that got executed
|
||||
_instructionCounter++;
|
||||
|
||||
_game.execStack.back().curIP = state->_curLogic->cIP;
|
||||
|
||||
char st[101];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue