231 Commits

Author SHA1 Message Date
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
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
Filippos Karapetis
b3e45ccc68 AGI: Disable/remove unused code
This is code that isn't used currently. Thanks to fingolfin for
pointing out these parts of the code
2014-12-07 15:33:11 +02:00
Filippos Karapetis
6ec077e1b9 AGI: Set the correct palette to use for each Amiga game
The Amiga palettes were added in 16529e58e6, but were never used.
A new game-specific option has been added for the old Amiga palette
2014-12-07 14:40:53 +02:00
Johannes Schickel
6aac905dfd AGI: Make GPL headers consistent in themselves. 2014-02-18 02:39:32 +01:00
Sven Hesse
989ea7cb56 JANITORIAL: Remove trailing whitespace 2013-07-14 19:01:47 +02:00
Eugene Sandulenko
eddf8cba93 AGI: Fix unitialized variables. CID 1002922 2013-05-02 14:17:46 +03:00
Eugene Sandulenko
4a17b91db2 AGI: Fix sound deinit. CID 1004128
We really left sound gen leaked with preagi games.
2013-04-21 14:12:13 +03:00
Johannes Schickel
89abab97e3 JANITORIAL: Remove trailing whitespaces.
Powered by:
git ls-files "*.cpp" "*.h" "*.m" "*.mm" | xargs sed -i -e 's/[ \t]*$//'
2012-09-26 04:17:55 +02:00
Filippos Karapetis
5e10737015 AGI: Add played time information to saved games 2012-03-27 00:50:29 +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
4f8665fc83 COMMON: Move isFoo functions to namespace Common, add doxygen comments 2012-02-20 16:18:27 +01:00
Max Horn
658080deed ALL: Avoid using is* macros from ctype.h
On some systems, passing signed chars to macros like isspace() etc. lead
to a runtime error. Hence, mark these macros as forbidden by default,
and introduce otherwise equivalent alternatives for them.
2012-02-15 16:51:37 +01:00