From 3eebf2eb411ff83f87447bc4478778e1d7bc84d1 Mon Sep 17 00:00:00 2001 From: Martin Kiewitz Date: Wed, 3 Feb 2016 03:49:37 +0100 Subject: AGI: Increase time delay for Apple IIgs It seems that either Apple IIgs ran very slowly or that its AGI interpreter didn't do the delays as on all the other platforms. Further investigation needed Fixes all sorts of games running now way too fast. --- engines/agi/cycle.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/engines/agi/cycle.cpp b/engines/agi/cycle.cpp index 2758e5208b..bf4848563a 100644 --- a/engines/agi/cycle.cpp +++ b/engines/agi/cycle.cpp @@ -338,7 +338,19 @@ int AgiEngine::playGame() { inGameTimerUpdate(); - if (_passedPlayTimeCycles >= getVar(VM_VAR_TIME_DELAY)) { + uint16 timeDelay = getVar(VM_VAR_TIME_DELAY); + + if (getPlatform() == Common::kPlatformApple2GS) { + timeDelay++; + // It seems that either Apple IIgs ran very slowly or that the delay in its interpreter was not working as everywhere else + // Most games on that platform set the delay to 0, which means no delay in DOS + // Gold Rush! even "optimizes" itself when larger sprites are on the screen it sets TIME_DELAY to 0. + // Normally that game runs at TIME_DELAY 1. + // Maybe a script patch for this game would make sense. + // TODO: needs further investigation + } + + if (_passedPlayTimeCycles >= timeDelay) { inGameTimerResetPassedCycles(); interpretCycle(); -- cgit v1.2.3