8541 Commits

Author SHA1 Message Date
sluicebox
6c7d39618f SCI32: Fix loading Mac Sync36 resources 2020-04-12 17:44:01 -07:00
sluicebox
23fc7f52e0 SCI: Fix SoundResource error handling, ctor, dtor
Fixes several problems with the SoundResource class:

- Constructor doesn't fully initialize object if resource doesn't exist
- Destructor crashes if object not fully initialized
- Constructor has no mechanism to report failure
- Callers believe failure is reported by constructor returning null
- SoundCommandParser::initSoundResource attempts to pre-detect failure
  insufficiently in the absence of a formal mechanism.

SoundResource now always fully initializes, the destructor no longer
accesses uninitialized memory, and an exists() method has been added
which callers now test.

SQ6 Mac can now progress past the main menu.
2020-04-12 01:47:15 -07:00
sluicebox
bd992479b3 SCI: Fix QFG3 GOG/NRS crash when angering Guardian
Fixes bug #11411
2020-04-09 22:05:36 -07:00
Lothar Serra Mari
768f8b8137 SCI: Add detection entry for alternative christmas1992 variant
Reported by oblivioncth in #11390
2020-03-25 22:03:05 +01:00
Filippos Karapetis
41e1053898 SCI: Stop any currently playing audio when loading. Fixes bug #9953.
Loading is not normally allowed while audio is being played in SCI games.
Stopping sounds is needed in ScummVM, as the player may load via
Control-F5 at any point, even while a sound is playing.
2020-03-21 18:35:27 +02:00
Filippos Karapetis
41dbcb6e64 SCI: Remove dead code 2020-03-21 18:35:27 +02:00
Filippos Karapetis
f25ffc2eea SCI32: Add a sanity check for array structures in kFileIOReadRaw 2020-03-17 09:36:38 +02:00
Zvika Haramaty
0b747dba48 SCI: fix #9907 by choosing queued sound with highest priority 2020-03-17 09:34:45 +02:00
Filippos Karapetis
7a68ee57b1 SCI: Always include the opcodeNames table, as it's used in VM hooks 2020-03-16 01:58:34 +02:00
Zvika Haramaty
540a3cd7a5 SCI: adding stopAfterFading to savegame, fixing #10685 2020-03-16 01:22:50 +02:00
Zvika Haramaty
23c6a5182e SCI: Added new VM hook mechanism, allowing new instructions
The current patch mechanism allows only replacing intructions in current
scripts, but not adding new instructions out of nowhere.
Thus, issue like #9646 is about to be closed as WONTFIX.

This new mechanism adds a hook on vm.cpp, before executing opcodes, and
if required, executs a new code.

It solves one of the issues of #9646, the others can be solved as well using that mechanism.
2020-03-16 01:17:03 +02:00
Zvika Haramaty
f2345cc372 SCI: debugger: disasm_addr - fixed 'bcc' parameter 2020-03-04 02:53:14 +02:00
Zvika Haramaty
5ab4185257 SCI: using only channels 1-8 on GM devices
There are many situations that GM sounds worse than MT, even for games
that were written for GM.
I think this is related to this.
And, there is a note in midi.cpp:
// NOTE: SSCI uses channels 1 through 8 for General MIDI as well, in the drivers I checked

Also, issue #6686 reports that using the "higher" channels causes
problem on a real SC-55.

This change solves at least: #6686, #9735 and #10297
2020-02-19 08:08:40 +02:00
Paul Gilbert
a00e44ba6c ENGINES: Merge saveGameState virtual methods into a single one 2020-02-16 15:44:28 -08:00
NMIError
b2468d9442 SCI/MIDI: GS drumkits - comments and re-usability
- Move the GS drumkit fallback map to generic audio code for re-use
- Added comments and debug message
2020-02-16 13:33:45 +02:00
NMIError
65f85a232d SCI: Add support for Roland GS drumkits
This adds support for the Roland GS drumkits used by SQ5 and QfG3.
The original Sierra GM driver does not pass the drumkit select MIDI
messages to the GM device, but they do exist in the MIDI data.

Another issue is that the drumkit numbers used are incorrect. This
does work on the original Roland SC-55 devices because they correct
the drumkit numbers. Later devices do not do this. Code has been
added to correct these wrong drumkit numbers.
2020-02-16 13:33:45 +02:00
Paul Gilbert
ba147f5ad5 SCI: Refactor to use Engine debugger 2020-02-16 13:07:19 +02:00
sluicebox
11061948ac SCI32: Fix PHANT2 volume scrollbar arrows
Fixes bug #10164
2020-02-15 17:59:12 -08:00
sluicebox
1e3bd598ba SCI: Remove MIDI driver timer before closing
Fixes bug #10374
2020-02-15 15:10:24 -08:00
Zvika Haramaty
ac87c01895 SCI: debugger: disasm - added 'bcc' parameter, to use in C code
'bcc' is based on 'bc', but prints in format that's can be used in
C code for patches - just copy and paste (without the address column).
2020-02-13 23:42:06 +02:00
Zvika Haramaty
190e47be96 SCI32: fix bug #2053 - refresh the screen before saving the game 2020-02-13 01:09:09 +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
Eugene Sandulenko
8ef27002cb SCI: Fix compilation on platforms without RGB colors 2020-02-12 00:40:28 +01:00
Eugene Sandulenko
c2778705d5 SCI: Fix compilation 2020-02-12 00:28:54 +01:00
Filippos Karapetis
f9744da62b Revert "SCI: Hopefully fix bug #6718 in LSL6 Polish"
This reverts commit 22aaf995ed4f5131ae9cf6753d228718a96293f3.
2020-02-09 23:52:26 +02: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
Bastien Bouclet
553d2968bb SCI: Add override keywords 2020-02-09 12:43:16 +01:00
Zvika Haramaty
bf3a8df741 SCI: GK2: if subtitles patch is missing, explain how to install it 2020-02-09 13:18:37 +02:00
sluicebox
2486824e3c SCI32: Detect Robot file endianness 2020-02-08 13:29:13 -08:00
sluicebox
ba241462da SCI32: Add Shivers Mac detection entry 2020-02-07 13:43:47 -08:00
sluicebox
8f6979234e SCI: Remove unreachable error() from Mac cursor code
Removes a call to error() that can't be reached.
The condition it's attempting to detect is normal and not an error.
2020-02-07 13:15:44 -08:00
sluicebox
01360d26fe SCI32: Set PHANT1 Mac video quality to high 2020-02-07 13:15:43 -08:00
sluicebox
07827aeb20 SCI32: Add PHANT1 Mac kArrayFill workarounds 2020-02-07 13:15:43 -08:00
sluicebox
4b504a5786 SCI32: Fix kArrayFill kernel signature
kArray fill always expects 4 parameters. Fixes PHANT1 Mac initialization
2020-02-07 13:15:43 -08:00
sluicebox
ab8cf3d77c SCI32: Update kCheckDisc kernel signature for Mac 2020-02-07 13:15:43 -08:00
sluicebox
d5d7d05d80 SCI32: Use correct kDoSound subops in Mac games 2020-02-07 13:15:43 -08:00
sluicebox
ed9318494d SCI32: Fix Mac sound initialization error 2020-02-07 13:15:43 -08:00
Eugene Sandulenko
62f67f4bfa SCI: Added override keywords 2020-02-05 16:11:11 +01:00
Paul Gilbert
5b80320525 ENGINES: Adding override keyword to hasFeature methods 2020-02-04 20:04:11 -08:00
Filippos Karapetis
d1205abb7c SCI32: More work on Hoyle 5 poker logic 2020-02-05 01:34:30 +02:00
Zvika
2f9f488b1e
SCI: fix segfault upon detection of pirated game, without fallback 2020-02-03 09:08:01 +02:00
sluicebox
15ce41c4da SCI32: Delete planes when restoring Mac games 2020-02-01 20:00:20 -08:00
Eugene Sandulenko
a4821672ca SCI: Added override keywords 2020-01-31 14:15:36 +01:00
sluicebox
7079f01044 SCI32: Stub out and document kPlatformMac32 subops 2020-01-30 17:14:06 -08:00
sluicebox
c1fb6562ac SCI32: Add Save/Restore support for Mac games 2020-01-30 16:56:01 -08:00
sluicebox
ef5885d14d SCI32: Add LSL7 Mac detection entry 2020-01-30 16:50:28 -08:00
sluicebox
fad20484cb SCI32: Ignore invalid LIGHTHOUSE German audio map 2020-01-27 19:08:51 -08:00
sluicebox
961d222cee SCI32: Ignore invalid LSL7 French audio map
Fixes bug #11315
2020-01-27 17:30:39 -08:00
sluicebox
9c0655c67a SCI32: Fix GK1 fortune teller dance timer 2020-01-27 13:28:28 -08:00
sluicebox
b58da7d847 SCI: Fix KQ6 truncated messages
Fixes bug #10682
2020-01-26 19:46:47 -08:00