Commit Graph

112 Commits

Author SHA1 Message Date
sluicebox
93eeffc84d JANITORIAL: Update old bug tracker numbers 2021-03-03 02:15:05 +02:00
Zvika Haramaty
61cd56009d AGI: Apple2GS: Make Speed menu configurable 2020-07-25 00:36:43 +02:00
Zvika Haramaty
1c36be4d8a AGI: Apple2GS: Add Speed menu and commands 2020-07-25 00:36:43 +02:00
Paul Gilbert
128bd50051 AGI: Remove autosave code 2020-02-16 15:44:28 -08:00
Filippos Karapetis
5b7f11ded7 AGI: Cleanup game flags 2020-01-12 23:12:15 +02:00
D G Turner
95c0afa2c3 AGI: Fix Missing Default Switch Cases
These are flagged by GCC if -Wswitch-default is enabled.
2019-10-14 03:54:10 +01:00
Martin Kiewitz
eeaddfb20a AGI: Make MH1 nightclub arcade sequence slower for AppleIIgs
Thanks waltervn for pointing this issue out
AppleIIgs adjustment tables had to be extended, because the first
3 arcade sequences were running way too fast, while the last one
ran fine and all of those are part of one single room.
2017-02-10 19:43:16 +01:00
Martin Kiewitz
32ca051485 AGI: Make TIME_DELAY 0 to set the game to 40 fps
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
2016-10-12 21:48:35 +02:00
Eugene Sandulenko
dead4aa014 JANITORIAL: Remove trailing spaces 2016-10-09 14:59:58 +02:00
Martin Kiewitz
0caef5d8d0 AGI: Set monitor VM var to EGA for Hercules rendering
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.
2016-02-28 14:06:22 +01:00
Martin Kiewitz
4ad1bbf108 AGI: Add detection for fan games with broken volume bug #7035
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.
2016-02-20 14:53:17 +01:00
Martin Kiewitz
29456da421 AGI: Added comments about Black Cauldron+KQ2, removed warning
Also removed old comments about testing needed for IIgs
Also removed warning when game speed is overwritten for IIgs,
b/c all games were tested and should run properly now.
2016-02-20 13:17:16 +01:00
Martin Kiewitz
4d85aa193c AGI: Apple IIgs time delay override KQ4 completed 2016-02-18 02:01:51 +01:00
Martin Kiewitz
7b75936f56 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.
2016-02-14 22:43:52 +01:00
Martin Kiewitz
82c3bdc142 AGI: Apple IIgs time delay override SQ2 data added 2016-02-13 04:07:17 +01:00
Martin Kiewitz
af90283552 AGI: Add time delay overwrite for AppleIIgs
Should somewhat fix bug #7026
Needs testing (although AGI games need to get tested for 1.8.0 anyway)
2016-02-13 00:10:43 +01:00
Martin Kiewitz
dbea55b36b AGI: Rename nonBlockingText -> artificialDelay
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
2016-02-11 17:26:25 +01:00
Martin Kiewitz
78905e0ab6 AGI: Only set VAR_KEY,when no controller/direction
Fixes Mixed Up Mother Goose Apple IIgs save/restore prompt
2016-02-09 19:41:59 +01:00
Martin Kiewitz
d836a52557 AGI: Do not set TIME_DELAY at all on restart
Original AGI did not do it and it would ruin the game speed of
at least Larry on Apple IIgs after dying.
2016-02-07 01:10:38 +01:00
Martin Kiewitz
e019323f07 AGI: Add Apple IIgs system UI buttons
For Restart/Quit/Pause dialog
2016-02-04 12:51:35 +01:00
Martin Kiewitz
3eebf2eb41 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.
2016-02-03 03:49:37 +01:00
Martin Kiewitz
cc55cb13d3 AGI: Remove _game.state, not needed anymore 2016-02-03 03:07:50 +01:00
Martin Kiewitz
34117170f2 AGI: Change cycle delay handling, seems to fix GR
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
2016-02-03 02:40:01 +01:00
Martin Kiewitz
778c1ddb69 AGI: Cycle event processing changed
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
2016-02-03 02:21:07 +01:00
Martin Kiewitz
702b66a49d AGI: Make inner loop handlers consistent 2016-02-03 01:41:32 +01:00
Martin Kiewitz
8271058a45 AGI: Implement messageBox() as inner loop
Also remove _game.keypress, _game.msgBoxTicks
2016-02-03 01:32:57 +01:00
Martin Kiewitz
563d890991 AGI: Fix regression of have.key changes
original commit 8269a94bcd
Now hopefully properly implemented.
Adjusted a few more inaccuracies
(we set v19 to 0, where we shouldn't have)
2016-02-03 00:26:35 +01:00
Martin Kiewitz
5f41a09701 AGI: Remove inputMode, not needed anyore 2016-02-02 23:02:50 +01:00
Martin Kiewitz
8269a94bcd AGI: Use inner loop functionality for have.key
Also do it like the original interpreter did it
2016-02-02 22:26:39 +01:00
Johannes Schickel
6778175f6d AGI: Fix formatting.
This mostly enforces tabs for indentation and spaces for formatting. But also
fixes spaces on empty lines, some extra/missing spaces.

astyle + manual fixup
2016-02-02 20:15:18 +01:00
Martin Kiewitz
05a5fc1b65 AGI: mouse support for menu 2016-02-02 17:28:58 +01:00
Martin Kiewitz
2a4a290d31 AGI: change how menus are triggered on Non-PC 2016-02-01 19:08:22 +01:00
Martin Kiewitz
6749f22981 AGI: Remove _game.hasPrompt, no longer needed 2016-02-01 16:13:19 +01:00
Martin Kiewitz
f86d68d214 AGI: Remove old clockEnabled boolean
No longer needed
We use ScummVM system total play time functionality instead
2016-02-01 15:54:32 +01:00
Martin Kiewitz
c28e101cdb AGI: implement predictive dialog 2016-02-01 01:34:36 +01:00
Martin Kiewitz
fd9c46831d AGI: remove timer hack, implement in game timer
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.
2016-01-31 20:53:36 +01:00
Martin Kiewitz
9acbe6f3f4 AGI: adjust getFlag(), setVar() and getVar() 2016-01-31 19:00:32 +01:00
Martin Kiewitz
4bc01ab7d5 AGI: getflag/setflag/etc. cleanup
renamed getflag() to getFlag()
renamed setflag() to setFlag()
renamed flipflag() to flipFlag()
preagi: renamed setFlag for this engine to setWinnieFlag
2016-01-31 17:56:53 +01:00
Martin Kiewitz
82b958f274 AGI: VM Var code cleanup
Don't access variables directly, but through method
Shouldn't include any functional differences
Also changed several hardcoded values to the corresponding enums.
2016-01-31 17:35:13 +01:00
Martin Kiewitz
428df3e6cb AGI: copying between var + ego screen obj fixed
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
2016-01-31 01:04:53 +01:00
Martin Kiewitz
26cb39beee AGI: Ego motion type change on newroom only agi3
Ego motion type change on newRoom() was only done for AGI3
2016-01-30 23:54:41 +01:00
Martin Kiewitz
0f15ec2ce8 AGI: use Common::RenderMode instead of its own
AppleIIgs + Atari ST weren't available back then in the enum.
They now are, so I can use the Common one.
2016-01-29 15:43:45 +01:00
Martin Kiewitz
8a595e7771 AGI: graphics rewrite + cleanup
- 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
2016-01-29 13:22:22 +01:00
Eugene Sandulenko
e215a75e7b AGI: stub for AGI1 newRoom() 2015-12-05 08:03:36 +01:00
Johannes Schickel
6aac905dfd AGI: Make GPL headers consistent in themselves. 2014-02-18 02:39:32 +01:00
Filippos Karapetis
5fadff59f9 AGI: Fix bug #3600733 - "AGI FANMADE: function slowing down game"
We now only test for events in testKeypressed() without updating the
game cycle at all (NAGI doesn't update the game cycle either). This
fixes the slowdowns in some animations where have.key() is issued,
like Manannan's lightnings in the intro of KQ3 and the bullets in the
intro of PQ1
2013-05-11 17:09:59 +03:00
Matthew Hoops
0031c41db8 COMMON: Change kPlatformPC to kPlatformDOS
"PC" was very ambiguous and now it matches what we show in the GUI.

This also corrects sword2's platform to Windows.
2013-05-02 18:43:10 -04:00
D G Turner
f722542cee AGI: Replace usage of 'goto'. 2011-12-10 20:12:35 +00:00
Filippos Karapetis
056c3992eb AGI: Commented out if statements that always evaluate to true 2011-11-03 22:36:34 +02:00
Filippos Karapetis
81fdf2c103 AGI: Fixed bug #3074570 - "AGI LSL1: TAB stops working after restart"
Applied eriktorbjorn's patch from that bug tracker item (slightly
modified), which is what NAGI does, and which fixes restarting in LSL1
and PQ1 (bug #2823762), and other AGI games that do not reset the
controller keys when restarting.
2011-09-26 00:56:10 +03:00