Age | Commit message (Collapse) | Author |
|
These were the remaining memset on non-trivial structure warnings.
|
|
This fixes these, but adding constructors causes further memset usage
warnings on the structures which are now "non-trivial" due to the addition
of constructors. Should be able to fix by repeating this process to remove
further memset usage.
|
|
These were associated with memset() of Mouse structure which now has
a constructor method to do this instead.
|
|
It was also necessary to make sure that the Common::String objects
were initialised correctly by switching to use a C++ container
for engine objects instead of calloc, since they were no longer
C-compatible PODs.
|
|
Thanks waltervn for finding this one.
Was a regression caused by the timer heuristic for detecting
bad script code. When the heuristic identified being in an
inner timer loop, it told ScummVM to sleep + process events.
During that time a restore can get triggered by the user via GMM.
When that happens, the restore is executed immediately.
When still being inside testIfCode(), it may happen that execution
goes beyond the end of the current logic incl. error/crash.
TODO: maybe better change GMM as a whole for AGI, that restores are
always processed in a delayed way after main loop got processed
once?
|
|
so that invalid opcodes won't crash ScummVM anymore
|
|
Original AGI only created a stationary event, when the last
pressed direction key was released. We do that now as well.
Makes cursor in MH1 behave properly.
Thanks to waltervn for pointing this out.
|
|
Original AGI TIME_DELAY 0 made the game run as fast
as possible. We didn't go that far, but it still seems to run
too fast. This should hopefully fix that.
See bug #9607
|
|
Recently we started to use this as new semantics, although in the past
we used simly <engine>_H. Now these guard defines are consistent with
rest of the files which are used in the engines.
|
|
|
|
Original AGI Hercules rendering was restricted by the Hercules
resolution, which is why they had to remove the AGI prompt and
replace it with a prompt window like the one used in SCI.
We are not and even when we support that prompt window, we
will still support the original AGI prompt even for Hercules
rendering.
Maybe some games had special graphic code, when Hercules rendering
is active. This needs to get checked.
We are now telling the scripts that we are running on EGA,
so that they don't put text at different coordinates.
Hercules rendering also used a different grid for putting text
for example Space Quest 2 right at the start.
This change avoids problems with such placement. We don't really
want to restrict ourselves by implementing that different
text grid resolution.
Also added comments on game feature flags.
|
|
- User option to force Hercules hires font for any rendering mode
- Also change mouse cursor hotspots from 1,1 to 0,0
- Fix inaccuracy in mouse controlled game menu
- Change render_Block(), drawBox(), drawDisplayRect() to use
upper Y instead of lower Y. Original AGI uses lower Y, but
upper Y makes upscaling way easier.
|
|
Plenty of fan games set volume to mute, because they thought 15
would be loudest. It's in fact "mute" in AGI. Those games were
made primarily for PC AGI, which did not use the volume setting.
We do, so such games would get muted audio. We try to detect
such games. Hopefully fully fixes bug #7035.
Too many games to try them all out.
|
|
Detects when end.of.loop + motions are used on the same screen
object at the same time, which would have resulted in flag
corruption in the original interpreter. We detect this
situation now, show a warning and disable the cycler in case
cycler was activated first.
This solves a new issue in kq1, when grabbing the eagle in room
22, that was previously hidden just like in the original AGI.
Fixes bug #7046
|
|
Instead of directly converting play time to VM timer vars,
we only adjust VM timer vars according to play time seconds delta.
This is needed for at least Mixed Up Mother Goose. The game
sets the VM "second" variable to 0 and then uses it for syncing
the text to the songs. We even adjust second calculation, so
that the timing should always be the same and not depend on
basically luck (seconds may wrap right after setting it, because
internal cycles counter is not changed).
|
|
- small fix (forgot to reset the hit counter)
- rename methods
- added more information about PQ1 in comment
|
|
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.
|
|
Useful to properly detect the most recent saved game
(that's done by the original save/restore dialogs)
|
|
Also add a table for Apple IIgs games for music issues like in PQ1
intro, where the developers thought that loading a new room would
take X amount of time and they started loading before the music was
done. In our AGI music may get cut off because of this.
It of course also happens, when using the original interpreter,
as soon as you emulate a faster processor. Which means this
is also a workaround.
See bug #7026
|
|
Hold-Key-Mode got introduced v2.425, it was simply not possible
to disable it until 3.098.
Now creating a AGI_KEY_STATIONARY event, so that it works properly
Fixes Mixed Up Mother Goose
|
|
For Restart/Quit/Pause dialog
|
|
|
|
|
|
|
|
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
|
|
Also remove _game.keypress, _game.msgBoxTicks
|
|
original commit 8269a94bcd55200f7ae8aba00c7b6fd0d37b9a37
Now hopefully properly implemented.
Adjusted a few more inaccuracies
(we set v19 to 0, where we shouldn't have)
|
|
|
|
Also do it like the original interpreter did it
|
|
This mostly enforces tabs for indentation and spaces for formatting. But also
fixes spaces on empty lines, some extra/missing spaces.
astyle + manual fixup
|
|
|
|
|
|
No functional change
|
|
Also a bit of cleanup
|
|
|
|
|
|
No longer needed
We use ScummVM system total play time functionality instead
|
|
|
|
|
|
Volume changes in ScummVM system menu now gets sent to scripts
as well.
|
|
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.
|
|
We copied the wrong way see cycle.cpp
This fixes the fan game 13th disciple. bug #3563
Also cleanup
playercontrol variable is now a boolean
|
|
moved font stuff into GfxFont class
removed Mickey Mouse font data (is loaded from mickey.exe)
|
|
AppleIIgs + Atari ST weren't available back then in the enum.
They now are, so I can use the Common one.
|
|
- graphics code fully rewritten
- Apple IIgs font support
- Amiga Topaz support
- Word parser rewritten
- menu code rewritten
- removed forced 2 second delay on all room changes
replaced with heuristic to detect situations, where it's required
- lots of naming cleanup
- new console commands show_map, screenobj, vmvars and vmflags
- all sorts of hacks/workarounds removed
- added SCI wait mouse cursor
- added Apple IIgs mouse cursor
- added Atari ST mouse cursor
- added Amiga/Apple IIgs transition
- added Atari ST transition
- user can select another render mode and
use Apple IIgs palette + transition for PC versions
- inventory screen rewritten
- SetSimple command now properly implemented
- PreAGI Mickey: Sierra logo now shown
- saved games: now saving controller key mapping
also saving automatic save data (SetSimple command)
- fixed invalid memory access when saving games (31 bytes were saved
using Common::String c_ptr()
Special Thanks to:
- fuzzie for helping out with the Apple IIgs font + valgrind
- eriktorbjorn for helping out with valgrind
- LordHoto for figuring out the code, that caused invalid memory
access in the original code, when saving a game
- sev for help out with reversing the Amiga transition
currently missing:
- mouse support for menu
- mouse support for system dialogs
- predictive dialog support
|