Commit Graph
74 Commits
Author SHA1 Message Date
Martin Kiewitz bd94bbc3e3 SCI: Add QfG4 script patch to fix sliding down slope bug #9801
It's quite difficult to patch. I hope this finally solved it.
2017-10-09 01:58:16 +02:00
Colin Snover cd6130cdd6 SCI32: Add audio volume sync support for RAMA 2017-09-28 14:58:17 -05:00
Colin Snover 9c28c25b67 SCI32: Add guest additions save/restore support for RAMA 2017-09-23 20:57:01 -05:00
Colin Snover b038432952 SCI32: Support RAMA's custom save games through kFileIO 2017-09-23 20:56:48 -05:00
Colin Snover 029eeeb803 SCI32: Fix Phant2 "auto-save"
The game has a feature where it will automatically create a save
game when you quit the game through the in-game control panel (or
when you die, for some reason).

Unfortunately, due to bad programming, this automatic save would
just overwrite whatever was in save slot 1 (slot 0 in the original
interpreter). Find this attempt to auto-save the game and redirect
it to the auto-save slot. This might not be totally correct, but
it is at least better than destroying a save game.

Fixes Trac#10201.
2017-09-14 20:45:02 -05:00
Colin Snover 5c3a2cf16a SCI32: Add load from launcher support for Phant2
Adding a hook into kPlayDuck to skip the intro video feels kind of
crappy, but it seemed simpler, consistent with the other hooks for
launch loading, and therefore preferable versus hot-patching the
script or messing with PC in the VM or something.
2017-07-30 19:21:55 -05:00
Colin Snover 49e8f05714 SCI32: Implement Phant2 save/load integration 2017-07-30 19:10:50 -05:00
Colin Snover b13777da8c SCI32: Implement guest additions volume sync for Phant2 2017-07-30 19:10:50 -05:00
Colin Snover 97f7308da3 SCI32: Add music volume UI sync for MGDX 2017-07-24 19:36:38 -05:00
Colin Snover afe344cc1f SCI32: Add guest additions support for LSL7 2017-07-17 22:42:18 -05:00
Colin Snover 3d4fb4ccb4 SCI32: Fix mustSetViewVisible for SCI3
In SCI2/2.1, variable indexes are used along with a range encoded
in the interpreter executable to determine whether an object
variable is a view-related variable. Operands to aTop, sTop, ipToa,
dpToa, ipTos, and dpTos are byte offsets into an object, which
are divided by two to get the varindex to check against the
interpreter range.

In SCI3, objects in game scripts contain groups of 32 selectors,
and each group has a flag that says whether or not the selectors
in that group are view-related. Operands to aTop, sTop, ipToa,
dpToa, ipTos, and dpTos are selectors.
2017-04-23 13:07:25 -05:00
Colin Snover 8299460917 SCI32: Hook up mustSetViewVisible for SCI3 2017-04-23 13:07:25 -05:00
Colin Snover 1ed185bbbb SCI: Implement delayed restore for SCI32 and move implementations to GuestAdditions 2017-04-22 13:01:35 -05:00
Colin Snover 3303a88139 SCI: Improve audio volume & settings sync code
This patch includes enhancements to the ScummVM integration with
SCI engine, with particular focus on SCI32 support.

1. Fixes audio volumes syncing erroneously to ScummVM in games
   that modify the audio volume without user action (e.g. SCI1.1
   talkies that reduce music volume during speech playback). Now,
   volumes will only be synchronised when the user interacts with
   the game's audio settings. This mechanism works by looking for
   a known volume control object in the stack, and only syncing
   when the control object is present. (Ports and planes were
   researched and found unreliable.)

2. Fixes audio syncing in SCI32 games that do not set game
   volumes through kDoSoundMasterVolume/kDoAudioVolume, like GK1,
   GK2, Phant1, and Torin.

3. Fixes speech/subtitles syncing in SCI32 games that do not use
   global 90, like LSL6hires.

4. Fixes in-game volume controls in SCI32 games reflecting
   outdated audio volumes when a change is made during the game
   from the ScummVM launcher.

5. Fixes SCI32 games that would restore volumes from save games
   or reset volumes on startup, which caused game volumes to be
   out-of-sync with ScummVM when started.

6. ScummVM integration code for audio sync has been abstracted
   into a new GuestAdditions class. This keeps the ScummVM-
   specific code all in one place, with only small hooks into the
   engine code. ScummVM integrated save/load code should probably
   also go here in the future.

Fixes Trac#9700.
2017-04-21 19:00:27 -05:00
Colin Snover 4cff1e400f SCI32: Add support for alternate graphics selectors
Used by at least Phantasmagoria 2.
2016-12-19 14:46:59 -06:00
Colin Snover c9ad2062db SCI32: Fix wrong value passed to updateInfoFlagViewVisible
updateInfoFlagViewVisible accepts a property index, not a selector
ID.

Fixes Trac#9583.
2016-10-20 11:33:30 -05:00
Colin Snover 8fd19f84c8 SCI: Deduplicate call origin formatting 2016-09-29 19:39:16 -05:00
Colin Snover 1de74fa514 SCI: Improve debugging output for selector failures 2016-09-29 19:39:16 -05:00
Colin Snover 1337cd3dec SCI32: Implement kEditText 2016-03-06 21:34:43 -06:00
Willem Jan Palenstijn 0012390f2a SCI32: Fix index/offset mixup in updateInfoFlagViewVisible 2016-03-01 20:18:29 +01:00
Willem Jan Palenstijn d803847ca1 SCI32: Update InfoFlagViewVisible in VM opcodes 2016-02-27 14:21:14 +01:00
Martin Kiewitz 3e4efdbd27 SCI32: Implement syncing planes+screen items from VM for restore
Fixes restoring saved games, when ScummVM dialogs are patched in
Removing clearing planes+screen items as well, because the scripts
actually did that, but did not clear everything.
Fixes "Invalid screen item" message when entering options menu,
after restoring in SQ6.
2016-02-21 17:21:48 +01:00
Colin Snover 20ccad80bf SCI: WIP GfxText32 code
This at least prevents SQ6 from crashing when going into the
introduction
2016-02-18 13:18:02 -06:00
Colin Snover 75ccabc325 SCI: Implement accurate renderer architecture for SCI32 2016-02-18 13:18:02 -06:00
Johannes Schickel 8fc7d60feb SCI: Make GPL headers consistent in themselves. 2014-02-18 02:39:37 +01:00
Filippos Karapetis 398d0ffcef SCI: Check for object visibility, if an object defines it
Fixes the inventory in GK1
2012-05-14 02:30:15 +03:00
Filippos Karapetis f61ea4c9cf SCI: Fixed text background color and text transparency for SCI32 games 2011-10-28 22:20:31 +03:00
Filippos Karapetis 96ce226967 SCI: Proper implementation of text drawing for SCI2+ 2011-10-11 01:25:08 +03:00
Max Horn 88913c0139 ALL: Remove trailing whitespaces
This tries to make our code a bit more compliant with our code formatting
conventions. For future use, this is the command I used:
  git ls-files "*.cpp" "*.h" | xargs sed -i -e 's/[ \t]*$//'
2011-06-20 00:59:48 +02:00
strangerke 69b1485a22 GIT: Clean up: Suppress SVN tags, now useless 2011-05-12 01:16:22 +02:00
Walter van Niftrik 952d1a084c SCI: Implement Mac iconbar event handling. 2011-03-09 21:05:19 +01:00
Max Horn ba3e826872 SCI: Remove any use of printf
svn-id: r54037
2010-11-02 09:49:47 +00:00
Martin Kiewitz 87b78b1673 SCI: kClone/kDisposeClone behaviour more accurate
now also checking -info- selector, if object is supposed to get freed. Fixes kq4 early hanging (in intro, when opening door, etc.)

svn-id: r52508
2010-09-03 18:14:59 +00:00
Martin Kiewitz ff7476d9f1 SCI: adding virtual lists for qfg-import rooms
now lists import files of all possible games, adds game title before that, removes game prefixes for all files

svn-id: r52441
2010-08-29 15:13:25 +00:00
Filippos Karapetis d1e45fd5d9 SCI: Removed a now unused selector from the selector cache
svn-id: r52349
2010-08-24 17:12:31 +00:00
Martin Kiewitz 1b69257654 SCI: changing hoyle 4 workaround
fixing hoyle 4 detection entry (not a demo)
adding direct selector fix, maybe we should replace this later with a script patch
adding detailed comment about the issue

svn-id: r51753
2010-08-05 07:49:19 +00:00
Martin Kiewitz 353b0d2993 SCI: support useInsetRect in kFrameout
svn-id: r51251
2010-07-24 17:43:56 +00:00
Martin Kiewitz 15ef4b23a0 SCI: some work on priority in sci32
svn-id: r51134
2010-07-22 10:24:08 +00:00
Filippos Karapetis d53e5fbfb7 SCI: Removed the restoring parameter of the run_vm() function
svn-id: r51076
2010-07-20 23:15:07 +00:00
Martin Kiewitz 90763f6e24 SCI: kDoBresen - save last position of client inside mover - fixes lsl6 tram still shaking while gotten stopped due ego
svn-id: r50931
2010-07-16 05:46:07 +00:00
Filippos Karapetis 58732b9df1 SCI: More changes to the code for loading from the launcher
- Added support for the LSL2 menu bar object
- We no longer need a reference to the init() selector - it's always the first method of the menu bar object

svn-id: r50462
2010-06-28 22:01:26 +00:00
Filippos Karapetis 048ceb73d3 SCI: Removed the hack for loading games from the launcher from run_vm(). This is now done on startup. This should fix loading from the launcher for LSL6
svn-id: r50406
2010-06-27 23:20:08 +00:00
Filippos Karapetis 0a102981f0 Moved the SelectorCache struct inside selector.h, where it belongs, and fixed some header dependencies in the process
svn-id: r50183
2010-06-23 15:23:37 +00:00
Martin Kiewitz eeba2812c1 SCI: adding some more global scaling code, adding vanishingY and vanishingX as selectors
svn-id: r50180
2010-06-23 13:42:09 +00:00
Martin Kiewitz 3bc011357b SCI: some initial work on global scaling
svn-id: r50179
2010-06-23 12:58:14 +00:00
Filippos Karapetis db70d66e4a Strict mode: Changed several warnings due to logic bugs into errors. If an error pops up from these ones, please add the game where it occurred and the steps to reproduce the error before turning it into a warning
svn-id: r49973
2010-06-17 23:50:28 +00:00
Max Horn afa2af5dfb SCI: cleanup
svn-id: r49573
2010-06-10 13:43:38 +00:00
Filippos Karapetis cc6f5eb3e4 Unified invokeSelector() and invokeSelectorArgv(), and removed the INV_SEL kludge. Also, removed the selectorInvocation parameter - if invokeSelector() fails, the error is in most cases unrecoverable, and the error description thrown covers all cases where kContinueOnInvalidSelector was used. This uncovered a bug too: in some places, non reg_t parameters were parsed
svn-id: r49564
2010-06-10 09:22:30 +00:00
Filippos Karapetis 2ae4c5796b The setCursor selector is no longer used for the detection of the kSetCursor() kernel function semantics
svn-id: r49408
2010-06-03 10:44:50 +00:00
Filippos Karapetis 67de5b1bd3 Mass renaming of selector-related functions, and removed some defines which were just cloaking functions with a different name
- GET_SEL32 -> readSelector
- GET_SEL32V -> readSelectorValue
- PUT_SEL32 -> writeSelector
- PUT_SEL32V -> writeSelectorValue
Also, changed some selector-related function names and variables to CamelCase

svn-id: r49317
2010-05-29 23:37:15 +00:00