223 Commits

Author SHA1 Message Date
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
e019323f07 AGI: Add Apple IIgs system UI buttons
For Restart/Quit/Pause dialog
2016-02-04 12:51:35 +01:00
Martin Kiewitz
d23871fdd8 AGI: Rename WINDOWRESET to WINDOW_AUTO_CLOSE_TIMER 2016-02-03 04:17:15 +01:00
Martin Kiewitz
9a3454393b AGI: Remove unused initialized variable 2016-02-03 03:13:25 +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
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 8269a94bcd55200f7ae8aba00c7b6fd0d37b9a37
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
9fff1686fc AGI: Pass vm pointer directly to commands
No functional change
2016-02-01 16:37:28 +01:00
Martin Kiewitz
839ac0a6a4 AGI: Rename _game.lognum to _game.curLogicNr
Also a bit of cleanup
2016-02-01 16:21:13 +01:00
Martin Kiewitz
264222ec29 AGI: Change _game.exitAllLogics to boolean 2016-02-01 16:15:07 +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
Willem Jan Palenstijn
38f5988390 AGI: Fix warning 2016-01-31 22:42:09 +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
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
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
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
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
e339cd66c1 AGI: implement engine option to disable mouse
engine option gets disabled for all Amiga games
also disabled for certain fanmade games, which
require a mouse.
defaults to enabled mouse

Engine options are not shown for previously
detected games until those games get redetected
If there is a way to handle those cases, please
fix.
2015-05-15 04:09:55 +02: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
Filippos Karapetis
85ca13db4b AGI: Use the ScummVM dialogs for saving/loading
An option has been added to use the original ones, if needed
2012-03-27 00:21:50 +03:00
D G Turner
bbe686c507 AGI: Fix compilation on NDS, broken due to predictive text changes. 2012-03-26 01:09:15 +01:00
Oleksiy Kurochko
ec32ccb6d6 GUI: Move predictive dialog to common gui 2012-03-25 12:21:38 +03:00
Max Horn
215b41b244 COMMON: Move RenderMode and GUIOptions functionality into separate files 2012-02-26 15:19:31 +01:00
Tarek Soliman
921f602ab8 JANITORIAL: Fix whitespace in pointer template arg 2012-02-15 10:07:08 -06:00
Willem Jan Palenstijn
8c7cd344c7 AGI: Clean up predictive matching
Specifically:
* Don't enable the 'next' button in predictive mode when we don't have a
  full match. Doing this didn't make sense since you'd iterate over a
  seemingly arbitrary set of completions instead of all possible ones.
* Do only a single binary search.
* Fix the width of the mode button for mouse press detections.
2012-01-06 23:28:45 +01:00
Willem Jan Palenstijn
43e2fde7a9 AGI: Fix ignoring some exact matches in predictive input
The matcher now always tries an exact match before trying an inexact one.
Together with 41ba2433f, this fixes bug #3470080.
2012-01-06 11:22:06 +01:00
Max Horn
6310cce74e AGI: Remove two unused pure virtual methods
This avoid warnings, as these methods were being hidden by methods in subclasses
with differing signatures.
2011-12-12 17:17:49 +01:00
Willem Jan Palenstijn
bff2e73dc1 AGI: Fix style 2011-09-26 14:31:04 +02:00
Willem Jan Palenstijn
c442295b9f AGI: Clean up save/load String usage 2011-09-26 09:27:15 +02:00
Filippos Karapetis
2be8db90ee AGI: Fixed bug #3196882 - "KQ3: PCSpeaker affects render mode" 2011-09-26 05:23:42 +03:00
Filippos Karapetis
62c8d82560 AGI: Fixed the actual cause of bug #3295652, and partially fixed bug #3080415 2011-09-26 03:50:58 +03: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
Filippos Karapetis
bd6a05bdd4 AGI: Fix bug #3080041 - "AGI Mother Goose: White bar in intro" 2011-09-26 00:11:45 +03:00
Filippos Karapetis
0e4b35a8e8 AGI: Switched to Common::String in the save/load code 2011-09-25 21:25:25 +03:00