Commit Graph
245 Commits
Author SHA1 Message Date
sluicebox 93eeffc84d JANITORIAL: Update old bug tracker numbers 2021-03-03 02:15:05 +02:00
Cameron Cawley 438c2d8714 DS: Rewrite event handling 2021-02-04 01:59:14 +01: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
Paul Gilbert f603a695af AGI: Refactor to use Engine debugger 2020-02-16 13:07:19 +02: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
D G Turner 50c5177eb0 AGI: Fix Remaining GCC Compiler Warnings
These were the remaining memset on non-trivial structure warnings.
2019-08-25 07:27:21 +01:00
D G Turner 482f835ad6 AGI: Fix GCC Compiler Warnings from memset of Game State Structures
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.
2019-08-25 05:55:54 +01:00
D G Turner 1a9fa34dc1 AGI: Fix some GCC Compilation Warnings
These were associated with memset() of Mouse structure which now has
a constructor method to do this instead.
2019-08-24 10:25:20 +01:00
D G Turner b3968ca39d AGI: Fix Several GCC Compiler Warnings 2019-05-08 00:42:03 +01:00
Colin Snover 0851a30769 AGI: Replace use of strdup with Common::String
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.
2018-08-18 16:30:05 +02:00
Martin Kiewitz 9dd0cd51d5 AGI: Clean up VM opcode handling
so that invalid opcodes won't crash ScummVM anymore
2017-02-23 23:54:45 +01:00
Martin Kiewitz e64e388816 AGI: Hold-key-mode fix
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.
2017-02-11 10:35:10 +01:00
Eugene Sandulenko afdbfe4d2f AGI: Reset all timers on startup 2016-05-07 10:25:09 +02:00
Ori Avtalion 3564032330 JANITORIAL: Reduce audio header dependencies 2016-04-14 16:10:21 +03:00
Martin Kiewitz 7a169c90f6 AGI: Hercules rendering for game screen 2016-02-28 11:23:31 +01:00
Martin Kiewitz e1c36a52b5 AGI: Add support for upscaling and Hercules hires font
- 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.
2016-02-27 21:44:21 +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 327ba19d4a AGI: Comment about another artificial delay situation
Gold Rush, Stagecoach path, after solving steep hill
2016-02-19 16:24:58 +01:00
Martin Kiewitz 453a8ac11d AGI: Add artificial delay for GR stagecoach path 2016-02-19 15:28:34 +01:00
Martin Kiewitz 22522196f4 AGI: Slightly change artificial delay to detect GR mule
Now also detects the text, that is shown when following your
mule in Gold Rush!
2016-02-19 12:52:19 +01:00
Martin Kiewitz ed92ccde23 AGI: Apple IIgs time delay override MH1 completed
+ Disable hide.mouse for MH1 Apple IIgs
2016-02-18 16:55:49 +01:00
Martin Kiewitz a8ede10863 AGI: Added comment about artificial delay sq2 scene 2016-02-16 19:27:37 +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 627e6393d6 AGI: Add another situation that needs artificial delay
Comment only
SQ1, right at the end of the asteroids
2016-02-13 15:48:55 +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 b443ac7b95 AGI: Init video before font + text init 2016-02-10 18:48:53 +01:00
Martin Kiewitz eaf0aeb604 AGI: Make it possible to also force CGA/EGA/VGA
...rendering
2016-02-05 22:09:11 +01:00
Martin Kiewitz f09a15f276 AGI: Render mode Macintosh added
Palette + mouse cursor + box frame color only atm
Thanks to wjp for gamma correction
Not sure, if our current color adjustment is correct
Should be checked by using actual hardware
2016-02-05 16:41:02 +01:00
Martin Kiewitz 4b7d49dcff AGI: Fix Hold-Key-Mode implementation
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
2016-02-04 22:53:15 +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 5f41a09701 AGI: Remove inputMode, not needed anyore 2016-02-02 23:02:50 +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 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 f2fb921f84 AGI: vol system setting gets sent to scripts
Volume changes in ScummVM system menu now gets sent to scripts
as well.
2016-01-31 22:25:35 +01:00
Martin Kiewitz a9b25b53d7 AGI: properly implement volume control + sync
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)
2016-01-31 22:14:35 +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 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 0c2de08155 AGI: new font class created
moved font stuff into GfxFont class
removed Mickey Mouse font data (is loaded from mickey.exe)
2016-01-29 16:18:31 +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 1a5bef2302 AGI: remove initGraphics comment 2016-01-29 14:23:33 +01:00
Martin Kiewitz df845be116 AGI: added/changed font warnings 2016-01-29 14:07:48 +01:00
Martin Kiewitz ccfd870c81 AGI: adjust mouse pos using render start Y
instead of having it hardcoded.
2016-01-29 14:03:47 +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
Johannes Schickel c1cfcea39a AGI: Remove superflous default value registration for extra GUI options. 2015-12-28 00:14:11 +01:00
Martin Kiewitz a709596b48 AGI: implement original sierra font, fix bug #6405
custom font is still used for fanmade games
i cannot test preAGI games, because I don't own
those.
2015-05-19 12:39:39 +02:00
Martin Kiewitz b39b15485b AGI: mouse support cleanup 2015-05-15 05:10:08 +02:00