525 Commits

Author SHA1 Message Date
Walter van Niftrik
c8293df572 SCI: Add Roland D-110/D-10/D-20 support 2020-08-27 14:56:17 +02:00
Zvika Haramaty
b4d40ed596 SCI: add support for Hebrew translation of Torin
- Detect fan made Hebrew translation of Torin's Passage
- Use BiDi algorithm in SCI engine
2020-05-19 12:32:58 +02:00
Paul Gilbert
ba147f5ad5 SCI: Refactor to use Engine debugger 2020-02-16 13:07:19 +02:00
sluicebox
6e9d0fafb5 SCI32: Use Mac cursor palettes
Fixes cursor colors in SCI32 Mac games that use native cursor resources.
2020-02-12 09:04:57 -08:00
Filippos Karapetis
ff044aa431 SCI: Move the GK2 subtitle patch dialog inside the SciEngine class
This is now grouped together with the other GUI messages. The script
patcher class itself does not need to handle such logic
2020-02-09 23:27:11 +02:00
sluicebox
c1fb6562ac SCI32: Add Save/Restore support for Mac games 2020-01-30 16:56:01 -08:00
Colin Snover
07df6cc254 SCI: Add built-in resource patcher
The resource patcher can be used to patch non-script resources
like views, maps, sounds, etc. It is more primitive than the script
patcher in that it does not use signatures for safe and automatic
patch relocation, but it does at least allow existing resources to
be grown if needed.

Refs Trac#9788. Refs Trac#9690.
2020-01-19 21:37:20 +02:00
sluicebox
4b13347df8 SCI32: Add support for AIFF audio
Used by at least LSL6 Mac CD for voices
2019-10-21 11:13:24 -07:00
sluicebox
999f813dc3 SCI32: Add QFG4 character import message box
Adds the ScummVM message box explaining saved character files
to the QFG4 import character screen.
2019-09-25 21:00:48 -07:00
Kawa
9aadb27267 SCI: Add some more SCI11+ features
Also gate them behind the presence of a 184.VOC resource instead of GID_CATDATE. This should not matter with regards to the remap effects -- the 2015 and 2016 demos had none, and the first that did has an unknown release status. Only the 2017 demo would fall, which would be easily fixed by dropping in a valid 184.VOC patch file.
2019-06-23 01:46:53 +03:00
Filippos Karapetis
9551e64bdf SCI: Remove unnecessary two-phase Kernel initialisation
Adapted from csnover's commit 8c96c1fd3e1568b61ee0594522615466f26a7793
2019-05-12 19:05:51 +03:00
Colin Snover
8cec2ba8f9 SCI: Remove unnecessary two-phase GfxCursor initialisation 2019-05-12 19:05:50 +03:00
sluicebox
bc2ab79261 SCI: Add parser support for LSL3, SQ3 German Amiga
Add parser support for multilingual Amiga versions that were released
in 1991 and are SCI_VERSION_1_MIDDLE
2019-04-09 20:50:28 +03:00
sluicebox
4a467cb1f8 SCI: Fix LONGBOW Green Man riddles and forest sweep 2019-04-06 15:01:49 +03:00
Cameron Cawley
09dbe7686b JANITORIAL: Update all scummvm.org URLS to use https 2019-03-09 21:52:14 +01:00
Colin Snover
00552e62c3 SCI: Stop sleeping if the game is trying to quit
This applies to any sleep, but is particularly noticeable in games
that send SysEx messages to MT-32, which add delays by sleeping in
order to avoid buffer overflows in the device firmware.
2018-12-05 01:02:26 +02:00
Kawa
ca2209cb5f SCI: Add support for The Dating Pool (#1403) 2018-12-02 22:56:19 +02:00
Colin Snover
9a8070da3c SCI: Do some clean-up of event handling system
Convert macros and vars to enums, rename keyboard events in
preparation for adding key up events, clean up unnecessary nested
conditionals, add TODOs for potential future work.
2017-09-27 20:27:33 -05:00
Colin Snover
f11b0a4ff5 SCI32: Toggle Phant2 content censoring from game options
To enable the optional content censoring mode, Phant2 looks
for a RESDUK.PAT file, which is normally placed by the game's
installer if the user chose to enable censorship. If the file
exists, the game reads an unlock password out of the file and
asks the user to enter the password when starting a new game to
create an uncensored game, or to click a "less intense" button
to start the game with censoring. The censorship state of the
game is then persisted in the save game file, and installations
with the RESDUK.PAT file need to enter the password again in
order to restore any of the uncensored saves.

Since we do not have an installer that can enable this feature,
add a game option toggle to enable/disable censoring (for the
releases that have the optional censorship mode) instead so the
censored content feature is available for anyone that wants to use
it. This flag is restored from ScummVM whenever a save game is
loaded, so it can be toggled on or off at any point without
needing a separate save game, unlike in the original interpreter.
2017-09-08 16:03:24 -05:00
Colin Snover
365dde1e5d SCI32: Reduce priority of PATCHES directory for Phant2
For whatever reason, Sierra decided that the final patches would
go in the root directory for Phant2. The game disc includes
(different, older) patches for many of the same resources in the
PATCHES directory, and loading those instead makes the game not
always work quite right.
2017-07-26 22:43:20 -05:00
Colin Snover
f15f9e3b7c SCI32: Refactor Video32 code to reduce code & feature duplication 2017-07-06 19:12:39 -05:00
Colin Snover
9f910535c9 SCI32: Centralise OSystem screen updates 2017-07-06 19:12:35 -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
d6ff67e3c4 SCI32: Fix detection and loading of localized resources in Torin
Italian still needs to be fixed, but nobody seems to have access
to this version at the moment.

Fixes Trac#9772.
2017-06-10 20:32:22 -05:00
Willem Jan Palenstijn
423ecde8e0 SCI: Move printObject from console to scriptdebug 2017-06-10 21:32:35 +02:00
Colin Snover
61f07c13d3 SCI: Start engine at tick 1
In SSCI, games could never start at tick 0 because the video
benchmarking code on game startup would take several ticks to
run. In ScummVM, where the benchmarking code is disabled, it
becomes possible for games to start at tick 0. This can break a
lot of kernel code, which uses tick 0 as a special value
indicating that a feature is not active. For example, in GK2,
the music at the start of the game will not fade in on systems
that are fast enough to start audio playback at tick 0, since
a fade start tick of 0 is used to indicate audio fade is disabled.

Fixes Trac#9830.
2017-06-10 12:28:21 -05:00
Colin Snover
57d257b36a SCI32: Fix audio sync recursion
Calling to SciEngine::syncSoundSettings from GuestAdditions
recurses back into GuestAdditions, which is obviously not
desirable. Even when it didn't manage to cause infinite recursion
(as in SQ6 demo), it would make the UI behave in broken ways (e.g.
the +/- buttons on the music slider in SQ6 would not work because
the UI would just get updated immediately back to the closest
rounded value).
2017-06-09 23:30:10 -05:00
Hein-Pieter van Braam
cffe01536e SCI32: Add 'music/' subdir to file path for LSL7 GOG
LSL7 originally came with music in two qualities in subdirectories of
the 'music' directory, 22s8 and 22s16. The gog.com release doesn't do
this and only ships the hq music in the root of 'music/'. This PR adds
it to the search path.

Closes gh-951.
2017-05-23 23:16:15 -05:00
Colin Snover
eba1e883e9 SCI: Minor punctuation fix in buggy script alert 2017-05-20 21:14:18 -05:00
Colin Snover
9e839775b6 SCI: Add "patch" directory to search paths
Refs Trac#9776.
2017-05-10 12:04:56 -05:00
Colin Snover
200adb99cf SCI: Add example of KQ6 game with incorrect patches directory 2017-05-10 11:53:26 -05:00
Colin Snover
c9cbb8e31c SCI: Translate messages passed to dialogues 2017-05-08 11:26:46 -05:00
Colin Snover
8b49313af3 SCI32: Fix terrible rendering performance when vsync is enabled
More than one call to OSystem::updateScreen per frame on systems
with vsync ruins performance because the call is blocked until
the next vsync interval.

This also fixes bad rendering performance with the OpenGL backend.
2017-05-06 10:38:58 -05:00
Colin Snover
866419fa71 SCI: Implement fallback detection for SCI3 2017-04-23 13:07:25 -05:00
Colin Snover
ca507e2b0b SCI: Fix missing music in LSL7 2017-04-23 13:07:25 -05:00
Colin Snover
c8486395fa SCI: Clean up unnecessary delayed restore flags
_delayedRestoreGame is always set and cleared at the same time as
_delayedRestoreGameId, and _delayedRestoreFromLauncher is written
but never read.
2017-04-22 13:01:35 -05:00
Colin Snover
ec12c5a342 SCI: Move ScummVM save/restore to GuestAdditions and reimplement for SCI32 2017-04-22 13:01:16 -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
Colin Snover
0e77471467 SCI: Remove unused SciEngine::speechAndSubtitlesEnabled method 2017-01-16 12:16:12 -06:00
Colin Snover
bf293fface SCI: Fix non-responsive application warning during sysex transfers
This also fixes the display of the startup LCD message, which had
been delayed until after the sysex transfer was finished.
2016-12-03 12:21:54 -06:00
Colin Snover
68023904a4 SCI32: Fix LSL6hires text speed slider
For whatever reason, this game uses a different global for
specifying the text speed.
2016-12-03 12:00:58 -06:00
Colin Snover
42ebd5a664 SCI32: Allow SCI32 games to update speech & subtitles settings
Fixes Trac#9637.
2016-11-03 13:14:58 -05:00
Colin Snover
67acdb628b SCI32: Sync subtitle text speed with ScummVM GUI 2016-09-30 20:08:09 -05:00
Colin Snover
6290f1e5fc SCI: Add prefix to global variable constants 2016-09-29 19:39:16 -05:00
Colin Snover
1847b0f705 SCI32: Fix warnings and incompatible save games when built without SCI32 2016-09-29 19:39:16 -05:00
Colin Snover
0c9d423497 SCI32: Emulate MGDX ego view metadata 2016-09-29 19:39:16 -05:00
Colin Snover
fba8568484 SCI32: Fix multiple bugs in kSave
1. Shift save numbers up/down for game scripts that rely on save
   game numbers starting from 0 to work correctly
2. Add fake file operations to support KQ7 save games
3. Hide autosave games from native save/load list to match SSCI.
2016-09-29 19:39:16 -05:00
Colin Snover
1eb6d90eec SCI32: Implement ScummVM save/load 2016-09-29 19:39:16 -05:00
Colin Snover
b5d0fffb8b SCI: Replace magic numbers for globals with named constants 2016-09-29 19:39:16 -05:00