Commit graph

62 commits

Author SHA1 Message Date
Colin Snover
673d25a9cd SCI32: Fix crash starting KQ7 demo
Fixes Trac#10343.
2017-11-28 16:47:37 -06:00
Colin Snover
b2966f3fc8 SCI32: Fix support for RAMA demo
Fixes Trac#10251.
2017-09-30 01:08:12 -05:00
Colin Snover
cd6130cdd6 SCI32: Add audio volume sync support for RAMA 2017-09-28 14:58:17 -05:00
Colin Snover
200c8c442b SCI: Remove dead code 2017-09-10 22:17:17 -05:00
Colin Snover
b13777da8c SCI32: Implement guest additions volume sync for Phant2 2017-07-30 19:10:50 -05:00
Colin Snover
afe344cc1f SCI32: Add guest additions support for LSL7 2017-07-17 22:42:18 -05:00
Colin Snover
07d6ffd989 SCI32: Force General MIDI for games that support nothing else
* MGDX has only GM music;
* KQ7 1.x's AdLib data is incomplete, so is not usable even though
  it is partially there

Fixes Trac#9789.
2017-07-07 13:28:54 -05:00
Colin Snover
d556dcc57b SCI: Switch SCI2 games to use Audio32
Upon investigation of Sound code across SCI32 games, it was
determined that there are actually (at least) 3 different
revisions, not just a single SCI2.1 version. This patch only
changes the parts of Sound code that are relevant to the correct
use of Audio32.

Fixes Trac#9736, Trac#9756, Trac#9767, Trac#9791.
2017-06-18 21:42:58 -05:00
Colin Snover
66efb750a0 SCI: Add more support for >16-bit SCI3 offsets
Basically just grepped for getOffset calls being assigned to
uint16s and expanded those to uint32 when they looked trivial.

While some of these changes seem superfluous, at least for the
US/English SCI3 games where potentially impacted game scripts are
not large enough to have a problem with 16-bit offsets (e.g. when
feature detecting the sound type), at least some of these changes
are necessary for correct operation of the find_callk debugger
command in SCI3 games. There should not be a reason why any of
these variables need to be kept as uint16, in any case.
2017-05-20 21:14:18 -05:00
Colin Snover
91df45c6c5 SCI32: Fix missing/incorrect game features detection 2017-05-06 10:38:58 -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
31daa956d6 SCI: Implement bounds-checked reads of game resources 2017-03-27 19:42:31 -05:00
Martin Kiewitz
c270b30a79 SCI: Fix pseudo mouse in various SCI1 games like e.g. Larry5
Pseudo mouse was functionality in SCI1+ games, that allowed the
user to control the mouse via keyboard cursor keys.

This new class only worked, when a tiny difference inside
the keyboard driver happened on kMapKeyToDir calls. We previously
tried to enable this behavior depending on cursor type, but
this didn't work correctly (Larry 5 for example was not detected
as such, but had PseudoMouse support).
2016-08-13 14:58:07 +02:00
Martin Kiewitz
0dd760724e SCI32: split up SCI2.1 into EARLY/MIDDLE/LATE
- Detection works via signatures (couldn't find a better way)
- new kString subcalls were introduced SCI2.1 LATE
- kString now has signatures and is split via subcall table
- kString fix, so that KQ7 doesn't crash, when starting a chapter
- Sci2StringFunctionType removed, because no longer needed
2015-12-29 01:44:11 +01:00
Filippos Karapetis
f2f8bf5685 SCI: Fix wrong game features heuristic for Hoyle 1/2 - bug #6606
Games with newer graphics functions can call kDrawPic with 4 or 8
parameters. Older games call it with 6 parameters. Fixes the about
dialog in Hoyle 1
2014-08-08 02:51:57 +03:00
Johannes Schickel
8fc7d60feb SCI: Make GPL headers consistent in themselves. 2014-02-18 02:39:37 +01:00
Filippos Karapetis
bd945bc756 SCI: Add support for the King's Questions mini-game
This can be found in the KQ collection
2013-08-20 19:48:33 +03:00
Matthew Hoops
ee86e671f1 SCI: Fix Phantasmagoria Mac's kDoSound 2013-04-28 13:43:17 -04:00
Filippos Karapetis
146d00a799 SCI: Add the Inside the Chest / Benind the Developer's Shield demo 2012-10-22 12:19:13 +03:00
Filippos Karapetis
2b50824133 SCI: Add setter/getter methods to reg_t's
No functionality change has been made with this commit. This avoids
setting and getting the reg_t members directly, and is the basis of any
future work on large SCI3 scripts (larger than 64KB)
2012-06-18 05:24:06 +03:00
Filippos Karapetis
e41e412c9e SCI: Fix for bug #3522046 "Detection of SQ4CD as Windows breaks Music"
Fall back to the DOS soundtracks in Windows CD versions if the user picks
a non-General MIDI music device, as the Windows tracks only contain MIDI
music
2012-04-29 20:45:16 +03:00
Filippos Karapetis
6a49d3eadd ENGINES: Return all available custom GUI options if no target is specified
This is used to set default settings for all custom game options when an
engine starts
2012-03-31 13:55:03 +03:00
Filippos Karapetis
536a7e407f SCI: Hook up the digital SFX and CD audio options
The relevant code wasn't added in the newer commits - this was an
oversight from my part
2012-03-25 16:40:49 +03:00
Willem Jan Palenstijn
56fb56936e SCI: Clean up some memory management and loops 2012-01-15 18:25:00 +01:00
strangerke
69b1485a22 GIT: Clean up: Suppress SVN tags, now useless 2011-05-12 01:16:22 +02:00
md5
4d33923436 SCI: Cleanup of the save/load dialog patching code and the lofs type detection code 2011-02-28 00:15:47 +02:00
Filippos Karapetis
2c2f3a97e6 SCI: Added support for the alternate Windows MIDI soundtracks of the CD versions of EcoQuest, Jones, KQ5 and SQ4
svn-id: r54476
2010-11-25 14:22:09 +00:00
Filippos Karapetis
d275461958 SCI: Added a heuristic to detect the modified late SCI2.1/SCI3 kString/kArray kernel functions
svn-id: r54398
2010-11-21 00:44:04 +00:00
Filippos Karapetis
430df91076 SCI1.1 and newer games always ignore move count. The "version" command works now in SCI3
svn-id: r54295
2010-11-17 15:02:58 +00:00
Filippos Karapetis
47e137fd8e SCI: lofsa/lofss functionality for SCI3
- Updated detectLofsType() for SCI3
- Cleaned up op_lofsa and op_lofss and updated them for SCI3

svn-id: r54293
2010-11-17 14:28:32 +00:00
Martin Kiewitz
89d4e44281 SCI: doing detectDoSoundType() properly sci0early
checking, if sound resources are sci0early or late for sci0early games instead of hardcoding lsl2

svn-id: r52514
2010-09-04 08:51:10 +00:00
Martin Kiewitz
92c3a4b5aa SCI: lsl2 early uses sci0late sound
fixes bug #3037012 and lsl2 now has music everywhere

svn-id: r52513
2010-09-04 08:28:53 +00:00
Martin Kiewitz
0c5561105c SCI: storing game super class address now inside SciEngine
svn-id: r52311
2010-08-23 20:29:13 +00:00
Johannes Schickel
dd38e424e7 SCI: Fix leaks in ResourceManager::listResources caller code.
svn-id: r51666
2010-08-02 22:27:26 +00:00
Martin Kiewitz
d5e4efa025 SCI: fix lofs autodetection
makes polish lsl1 work (its game superclass name got translated, so no "Game" object available) - bug #3037194 thx to dam-soft for his patient help

svn-id: r51557
2010-07-31 22:45:38 +00:00
Matthew Hoops
828434456f SCI: Better fix for bug #3035058 - ECOQUEST demo: Missing subtitles
The demo really uses kGetMessage and not kMessage. We now detect which version of the message function is used. Thanks to Walter for pointing this out.

svn-id: r51384
2010-07-27 19:07:39 +00:00
Martin Kiewitz
539d10ea11 SCI: adding sound version 2.1, to properly add sci2.1 signature for kDoSound(play)
svn-id: r50878
2010-07-14 11:29:55 +00:00
Filippos Karapetis
d5e037e703 Added some slight fixes for the RAMA demo, which starts now, though it dies horribly when clicking on anything
svn-id: r50569
2010-07-01 21:08:38 +00:00
Max Horn
e5509d38b6 SCI: More comment rewrapping
svn-id: r50431
2010-06-28 11:23:16 +00:00
Max Horn
30218a2c32 SCI: Make Script member vars private; add const qualifiers
Only three Script members remain public (for now)

svn-id: r50428
2010-06-28 11:22:20 +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
Filippos Karapetis
9c1ec81d76 Strict mode: Turned several severe errors (almost all detection related) into errors, instead of warnings
svn-id: r49972
2010-06-17 23:45:38 +00:00
Filippos Karapetis
eb4ec596cd Use the SELECTOR() macro for readability
svn-id: r49563
2010-06-10 09:18:57 +00:00
Filippos Karapetis
05357d0f2a Cleanup
svn-id: r49342
2010-05-31 07:34:18 +00:00
Filippos Karapetis
c32e88fe0b Limit access to the _bufSize, _scriptSize and _heapSize members of the Script class
svn-id: r49327
2010-05-30 16:14:31 +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
Filippos Karapetis
b2e4e4b340 Cleaned up detectGfxFunctionsType() slightly, and made it work for Hoyle 1 and 2 properly.
svn-id: r49292
2010-05-28 12:36:47 +00:00
Max Horn
0197e9f6a1 SCI: Making various object and script related things const
svn-id: r49246
2010-05-26 16:30:10 +00:00
Walter van Niftrik
725fb248ea SCI: Don't error() out when autodetection fails
svn-id: r48790
2010-04-24 22:02:31 +00:00
Max Horn
ee1110a114 SCI: Reduce header interdependencies
svn-id: r48086
2010-02-17 23:38:43 +00:00