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.
Removed pollTimer()
Renamed pause() to wait()
Doing 10 msec delays instead of at least 50 msec per EventProcess
Seems to fix weird Gold Rush ingame timer issue?! bug #4147
processEvents() renamed to processScummVMEvents()
mainCycle() renamed to processAGIEvents()
have.key now sets up an inner loop and calls processAGIEvents()
to avoid any further cycle work processing
This mostly enforces tabs for indentation and spaces for formatting. But also
fixes spaces on empty lines, some extra/missing spaces.
astyle + manual fixup
It seems the current code causes issues on at least AmigaOS.
Changed current code to the way SCI handled it.
Needs to get investigated in detail.
Added FIXME. Also see engines/sci/event.cpp
Original code did assume that AGI volume level is 0-15
(0 for silence, 15 for maximum volume). It actually is the
other way. 0 is maximum, 15 is silence.
Fixed that. Also implemented sync with ScummVM settings dialog.
In case "mute" is enabled by the user, any volume changes done by
scripts are ignored.
Fixes Manhunter 1 Apple IIgs not getting sound anymore since the
VM Var cleanup (the script volume change by the scripts didn't
reach us before)
in game timer is now updated, when scripts read in game timer
VM variables and during main loop. ScummVM total play time feature
is used for it. Game cycle syncing is done at the same time.
renamed getflag() to getFlag()
renamed setflag() to setFlag()
renamed flipflag() to flipFlag()
preagi: renamed setFlag for this engine to setWinnieFlag
Don't access variables directly, but through method
Shouldn't include any functional differences
Also changed several hardcoded values to the corresponding enums.
Caused issues with mouse support (that AGI on DOS never had).
e.g. KQ1/KQ2 on end of mouse click move Graham automatically falls
into water.
The check was added in AGI3 only, but maybe non-DOS interpreters
had it before. Or maybe mouse support was actually implemented
differently. Needs more investigating.