This class manages a buffer where all data usually stored in detection
plugin will get copied before unloading the plugin and starting the
game.
This class expects that two functions are present in every
GameDescription: sizeBuffer which calculates how many bytes we will need
to store the entry in RAM and toBuffer which copies the data in the
buffer and fix the pointers in the class.
At the end, it is expected that an ADDynamicGameDescription doesn't
depend anymore on data stored in the detection plugin.
The AD_GAME_DESCRIPTION_HELPERS macro allow to implement these functions
in all GameDescription which don't have any pointer except those in
ADGameDescription.
The messageBox() function assumed 20 cycles per second, but that was
changed to 40 cycles per second years ago. This made the King's Quest
III intro hard to read. There are probably other cases as well, but
that's the one that was asked about on the forum.
- Fixes Black Cauldron witches not disappearing at end of game
- Properly fixes Donald Duck's Playground intro, bug #14170
- Continues to fix KQ1 eagle jump, bug #7046
Big thanks to @AGKorson for providing detailed information on this
interpreter behavior, script analysis, and maintaining excellent
AGI documentation in WinAGI.
See also:
8a595e77715484f0bc58cc7cbfe626
Fixes bugs #4147, #13910
The Apple IIgs version is unaffected and will require a separate fix.
That version only had one speed, so it does not contain the script that
synchronizes clock speed with game speed. We add this feature, and will
also need to implement this synchronization.
The AGIMOUSE protocol is for three mouse variables to be set by the
interpreter in response to opcode 171. This code updated two of the
three variables when processing events, causing the variables to
unexpectedly change in the middle of a game cycle, such as when
displaying a message box.
Fixes phantom clicks in "DG: The AGIMouse Adventure"
This fixes bug #15000 "V Demo does not recognize valid word ammunition"
Our code was actually not parsing correctly many (all?) words starting with "a" in this particular game.
CoCo3 games use V3 volumes, and most use V3 compression, even though
they are V2 games with V2 directory files. Only KQ3 uses V2 volumes.
LSL1 CoCo3 now starts, along with the many CoCo3 fan ports.
Big thanks to @MusicallyInspired, @EpicPotatoFiend, and the
SQHistorian discord for teaching me Tandy!
- Fixes Manhunter 1 Amiga / Atari ST not starting
- Fixes Manhunter 2 Amiga not starting
- Fixes Gold Rush Atari ST
- Fixes King's Quest IV Apple IIGS
- Fixes Black Cauldron Apple IIGS
- Uses original opcode name: get.mse.posn (from GR Amiga)
The correct value for variable 20 on Amiga interpreters is always 5.
Confirmed in the Amiga scripts for SQ1, MH1, and MH2. These games all
expect variable 20 to have a value of 5, just like all Amiga games.
Fixes Amiga menus and help text not appearing, and other details.
Note that this fix exposes another bug which now prevents the Amiga
Manhunter games from starting: the opcode table is wrong for these
versions. This also prevents the Atari ST version of MH1 from starting.
Fixed in next commit.