Commit Graph

92 Commits

Author SHA1 Message Date
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
Filippos Karapetis
0e4b35a8e8 AGI: Switched to Common::String in the save/load code 2011-09-25 21:25:25 +03:00
Filippos Karapetis
c8777b774f AGI: Rewrite getSavegameFilename() so that it doesn't try to return a pointer to a local variable 2011-09-25 19:33:01 +03:00
Eugene Sandulenko
273e37f726 AGI: Renamed some #defines to our code conventions and moved them to enums 2011-08-14 18:48:59 +01:00
strangerke
69b1485a22 GIT: Clean up: Suppress SVN tags, now useless 2011-05-12 01:16:22 +02:00
Max Horn
7c2323bdc3 AGI: Replace report() macro by debug() / warning()
This makes AGI quite a bit less noisy by default.

svn-id: r53868
2010-10-26 22:33:49 +00:00
Eugene Sandulenko
349b89adce AGI: Fix bug #3034370
Bug #3034370: "Manhunter: New York keyboard unresponsive". Actually
the keyboard was made responsive after June implementation of set.key,
still the game speed was increasing. Fixed that too.

svn-id: r52369
2010-08-25 07:39:50 +00:00
Eugene Sandulenko
30d8dda867 AGI: Reset controllers on game restart
svn-id: r52368
2010-08-25 07:39:31 +00:00
Johannes Schickel
e75eee21e3 Use "true" instead of "1" in if statements to make clang a bit more happier with -Werror.
svn-id: r50943
2010-07-16 21:50:12 +00:00
Torbjörn Andersson
41990883bf Don't go into "menu input mode" unless the game currently allows the menus to
be displayed. I hope this is the correct fix to keep Police Quest 1 from
hanging if you press Escape while reading the newspaper in the briefing room.

svn-id: r50072
2010-06-20 09:51:11 +00:00
Max Horn
da28fde4c6 AGI: Change some #defines to enums
svn-id: r50033
2010-06-18 22:07:32 +00:00
Eugene Sandulenko
c7e9b620ee AGI: properly setup Sound var.
svn-id: r49752
2010-06-15 10:35:10 +00:00
Eugene Sandulenko
71917dc52d AGI: Implement FR #1881179.
FR #1881179: "AGI detecting agi mouse". Always run ScummVM in
AGIMOUSE compatibility mode, thus no detection for it is
needed.

svn-id: r49748
2010-06-15 10:33:26 +00:00
Max Horn
50435d6bae AGI: Turn g_tickTimer & g_mouse into members of class AgiEngine resp. AgiBase
svn-id: r45259
2009-10-20 11:13:00 +00:00
Kari Salminen
2bd1f51d92 Possible fix for #2828330 (AGI: KQ1: Fast text box). If doesn't break anything else then should go to the branch-1-0-0 too, but haven't had the time to do much testing yet - thus committing to the trunk first.
svn-id: r43523
2009-08-18 21:37:31 +00:00
Eugene Sandulenko
0932497cca Fix bug #2798797: "AGI: larry 1 doesn't restart after dying"
svn-id: r42663
2009-07-22 16:26:53 +00:00
Eugene Sandulenko
8bcdd8d7f6 Run AGIMOUSE hack as a side effect always
svn-id: r41536
2009-06-15 07:06:52 +00:00
Filippos Karapetis
e572af84aa Removed unused variable
svn-id: r41279
2009-06-06 18:02:16 +00:00
Eugene Sandulenko
ea3373708c Correct implementation for set.key opcode. Fixes #2605104: "AGI: Manhunter, F3 hotkey dosent work", removed number of hacks
svn-id: r41259
2009-06-06 17:48:09 +00:00
Eugene Sandulenko
1a321a2064 Cleanup
svn-id: r41254
2009-06-06 17:45:52 +00:00
Eugene Sandulenko
2eb7e914e8 Fix bug #2026605: "SQ2: Have to wait after dying to do anything."
svn-id: r41250
2009-06-06 17:43:51 +00:00