Commit Graph

128 Commits

Author SHA1 Message Date
D G Turner
84d0a294af SCUMM: Replace Various String Functions with Common String Usage
This removes the dependency on the unsafe strcpy and strcat string
functions with usage of Common::String instead.
2019-09-15 20:20:03 +01:00
athrxx
0e73472207 AUDIO: (FM-Towns/PC98) - cleanup mutex handling 2019-08-07 16:43:06 +02:00
athrxx
aecf194880 SCUMM: (iMUSE/Amiga) - minor fixes
- At at least one place in INDY4 the game attempts to send a Roland MT-32 patch to the Amiga driver. This will fail and thus not cause any harm, but I have added a check nonetheless. The original Amiga driver ignores sysex messages that don't have the iMuse manufacturer id 7D.
- In INDY4 the iMuse player thinks it has a percussion channel due to the fact that it plays ROL resources. This should also be irrelevant for the actual playback, but I have added a check for that, too.
2019-07-22 20:17:38 +02:00
jepael
afb9ff0048 SCUMM: (iMUSE/Amiga) - Fix compiler warning (#1751) 2019-07-17 21:10:39 +02:00
athrxx
4c45f9f39f SCUMM: (iMUSE/Amiga) - fix INDY4 instruments handling
FOA Amiga uses 'ROL ' resources (unlike MI2 which has 'AMI ' resources). So our imuse player treated those as MT32 tracks playing on a non-MT32 device and applied GM mapping. Which of course messed up the instruments.
2019-07-17 17:26:52 +02:00
athrxx
4c6ff7843f SCUMM: remove unused declarations
(several function declarations in imuse_internal.h)
2019-07-17 17:26:52 +02:00
athrxx
7478cffd88 SCUMM: (iMUSE/Amiga) - cleanup 2019-07-17 17:26:51 +02:00
athrxx
01f99f1a0a SCUMM: imuse driver directory cleanup
- move mac, pc speaker and fm-towns ims sound drivers into separate directory

(AdLib and MT32/GM drivers are still too entangled with common code to be moved so easily, especially MT32/GM. It would require lots of changes to the common code and possibly to all engines using the MidiDriver class. So I leave that for now.)
2019-07-14 21:45:43 +02:00
athrxx
d1b64aab0c SCUMM: (iMuse/Amiga) - improve accuracy
This fixes the issue that some rhythm instruments didn't receive correct notes. The changes have been limited to the Amiga versions.
2019-07-14 21:45:29 +02:00
athrxx
0899ecc987 SCUMM: hook up Amiga MI2 + INDY4 to new sound driver 2019-07-14 20:56:27 +02:00
athrxx
9afdde2601 SCUMM: add Amiga iMuse sound driver
(applies to MI2 and INDY4)
2019-07-14 20:56:27 +02:00
Torbjörn Andersson
1e23d43006 SCUMM: Silence GCC memset() warnings
Recent GCC versions complain if you memset() a class or struct that
contain non-POD data types. Get around that by either initializing
the object when created, or by adding a reset() method.
2019-07-14 14:58:19 +03:00
Adrian Frühwirth
7ebbb12dfb SCUMM: Remove superfluous 'else' in IMuseInternal::ImSetTrigger()
Both means to calculate `diff` are essentially equal because
wraparound of unsigned integers is well-defined and does what
the 'else' branch is simulating manually. Because of this,
gcc complains when compiling with -Wduplicated-branches.
2018-05-07 22:21:42 +02:00
Colin Snover
08186aeec6 SCUMM: Rename iMUSE save/load function to avoid confusing function hiding 2018-01-31 21:24:09 -06:00
Colin Snover
2e061d95c5 COMMON: Move VER macro for serializer into common code 2018-01-31 17:58:01 +01:00
Colin Snover
9916b26383 SCUMM: Replace UB-triggering serialization code with Common::Serializer
Fixes Trac#10342.
2018-01-31 17:58:01 +01:00
Ben Castricum
d58f594755 SCUMM: MI2 kill tune 113 on start of next, Fixes bug #1410 / Booty Island
Fix the "MI2: Two soundtracks playing at once" bug from the bug tracker.
It's triggered when the player enters the kiosk for the second time and
leaves before tune 113 is started.
2017-07-30 22:10:54 +02:00
Ben Castricum
392d8b44ff SCUMM: MI2 kill tune 107 on start of next, Fixes bug #1410 / Scabb Island
Fix the "MI2: Two soundtracks playing at once" bug from the forum.  It's
triggered when the player is moving faster then the scripts expect causing
the "stop tune 117" command be executed before the start of the tune.
Effectily creating a hanging tune 107.
This patch kills the tune when this sitation is detected.
2017-07-30 22:10:54 +02:00
Eugene Sandulenko
f2134a0dc2 SCUMM: Fix IMUSE initialization 2016-11-19 17:39:43 +01:00
Eugene Sandulenko
f7a551dab2 SCUMM: Fix class initalization 2016-11-19 17:37:44 +01:00
Johannes Schickel
3847465163 SCUMM: Make GPL headers consistent in themselves. 2014-02-18 02:39:38 +01:00
Sven Hesse
989ea7cb56 JANITORIAL: Remove trailing whitespace 2013-07-14 19:01:47 +02:00
Torbjörn Andersson
29bc36d070 SCUMM: Fix initGM() buffer overflow (CID 1032513)
We're clearly using 12 bytes, not 11.
2013-07-06 14:03:31 +02:00
tcarey
dc6b39d058 SCUMM: Clean-up of Roland GS code
1. Remove _sc55 bool. All Roland GS-capable devices have MT-32 sound/drum maps, so they should always be used when _enable_gs is set.
2. Always enable _native_mt32 if Roland GS mode is selected. I don't know why I never did this originally, since _enable_gs is automatically disabled for SCUMM v6+ games that use General MIDI tracks instead of MT-32 music.
3. Set master tune for GS devices to 442.0kHz. This is the master tune setting for the MT-32.
2013-05-11 19:18:11 +03:00
Willem Jan Palenstijn
2d1fd3b554 ALL: Fix typo (existant->existent) 2013-02-23 22:07:32 +01:00
Johannes Schickel
97d7bf9b9a Merge pull request #291 from eriktorbjorn/mac-mi-music-final
SCUMM: Add support for Macintosh music in Monkey Island 1 and Loom
2012-12-14 11:57:49 -08:00
Torbjörn Andersson
f0c1d8dcc4 SCUMM: Add hack to preserve savegame compatibility with Mac MI1
For old savegames, we now use a "dummy" iMUSE objet to skip the old
iMUSE save state. I had hoped to be able to do this without making
any changes to the iMUSE code itself, but I was unable to.

Also added note about how the save state for the new music will not
quite work if the mixer output rate changes. Personally, I'm not
too worried about that. It breaks, but it shouldn't break badly.
2012-11-16 07:49:17 +01:00
Johannes Schickel
40ab5f8788 SCUMM: Ignore detune for Sam&Max. 2012-10-01 03:11:09 +02:00
Johannes Schickel
01a458f8f2 SCUMM: Add check for resource fork for ".iMUSE Setups".
This should help identify incorrect dumps/file naming like what (probably)
happened in bug #3570973
"FOA: Doesn't start anymore after adding Mac sound support".
2012-09-23 21:12:06 +02:00
Matthew Hoops
b105104534 SCUMM: Update comments 2012-09-20 12:00:13 -04:00
Matthew Hoops
2a9d98003e SCUMM: Restrict the Mac m68k v5 driver to MI2/Indy4
Shouldn't be used with MI1
2012-09-20 11:58:04 -04:00
Matthew Hoops
fc6ab89b50 SCUMM: Add support for Indy4 Mac 68k sound 2012-09-20 11:48:00 -04:00
Johannes Schickel
6ea51e8c45 SCUMM: Implement support for special sfx in MI2 Mac.
This also increases the savegame version, since it introduces a new
Instrument subclass.
2012-09-20 02:13:03 +02:00
Johannes Schickel
58f542d434 SCUMM: Implement support for Monkey Island 2 Mac music.
This is a initial RE of the audio output Monkey Island 2 Mac uses. Support
for special sound effects is not in there yet.
2012-09-20 02:12:41 +02:00
Johannes Schickel
6c9f9f8356 SCUMM: Extend comment about SysEx manufacturer 0x97. 2012-09-20 01:59:51 +02:00
Willem Jan Palenstijn
9e4d3234c5 SCUMM: Revert "Removed a duplicate variable assignment"
This reverts commit 747ebffd17,
and adds a FIXME.
2011-11-04 10:04:42 +01:00
Filippos Karapetis
747ebffd17 SCUMM: Removed a duplicate variable assignment 2011-11-04 00:42:38 +02:00
Johannes Schickel
a07908a001 SCUMM: Fix typo in PC Speaker output. 2011-08-21 22:00:22 +02:00
Christoph Mallon
23a0f5318c JANITORIAL: Remove trailing empty lines. 2011-08-07 13:53:33 +02:00
Johannes Schickel
482fcea8f3 SCUMM: Add debug output in case the code tries to set up a non-existant iMuse instrument. 2011-07-14 01:09:47 +02:00
Johannes Schickel
f814dc971c SCUMM: Handle default instrument set up in iMuse like the original. 2011-07-14 00:49:32 +02:00
Johannes Schickel
9565af1ae4 SCUMM: Implement iMuse alloc part command closer to the original. 2011-07-14 00:49:32 +02:00
Johannes Schickel
25c0f0a772 SCUMM: Adapt iMuse code formatting to our standards. 2011-07-11 22:53:41 +02:00
Johannes Schickel
4ee228bb16 SCUMM: Fix some envelope bugs in PC Speaker output. 2011-07-10 19:23:59 +02:00
Johannes Schickel
5f5daadedb SCUMM: Let PC Speaker output be controlable via music volume. 2011-07-10 18:14:42 +02:00
Johannes Schickel
adb2bbbb59 SCUMM: Properly implement volume controler for PC Speaker output. 2011-07-10 18:06:33 +02:00
Johannes Schickel
5edb6f9e4a SCUMM: Fix priority settings in iMuse allocate part sysEx command.
Formerly we ever only used the lower 4 bit of the priority setting for a new
part. The original used a full 8 bit setting though (based on the Indy4 PC
Speaker output driver). This fixes missing notes in the Indy4 intro with PC
Speaker output.

This might affect other outputs too! And could cause regressions in case other
outputs implemented priority settings differently.
2011-07-10 17:58:41 +02:00
Johannes Schickel
781b7215c4 SCUMM: Fix PC Speaker sound.
Now we only output a new frequency if a new channel was selected or a new
output frequency has to be send. This makes the sound much more like in
DOSBox. This is not present in the original, but since our timings are
different this should make up for that.
2011-07-10 17:42:02 +02:00
Johannes Schickel
fb4ed2224f SCUMM: Minor clean up in iMuse instrument handling code. 2011-07-10 05:28:20 +02:00
Johannes Schickel
abbd29b16a SCUMM: Limit iMuse default instrument load to PC Speaker output.
Albeit the code is marked as a hack inside the source, the original behaved
exaclty the same. If the code is removed the PC Speaker output will miss notes,
since unlike the original we only output to parts, which have an instrument set
up.
2011-07-10 05:21:25 +02:00