diff options
| author | Willem Jan Palenstijn | 2013-09-21 20:05:47 +0200 | 
|---|---|---|
| committer | Willem Jan Palenstijn | 2013-09-21 20:05:47 +0200 | 
| commit | 4b5ca10f68effb88e297d72f6ea366d760acf9ed (patch) | |
| tree | 4a410f6c32f452afaef54c43119730cf6b53c60b /engines/sci | |
| parent | a6d902df2827b91dc641b6f51c0a070b70a09179 (diff) | |
| parent | 97b255ab33fa5fcd4507573e77cd42a8406e1b55 (diff) | |
| download | scummvm-rg350-4b5ca10f68effb88e297d72f6ea366d760acf9ed.tar.gz scummvm-rg350-4b5ca10f68effb88e297d72f6ea366d760acf9ed.tar.bz2 scummvm-rg350-4b5ca10f68effb88e297d72f6ea366d760acf9ed.zip  | |
Merge branch 'master' into sci_midiparser
Conflicts:
	engines/sci/sound/midiparser_sci.cpp
Diffstat (limited to 'engines/sci')
| -rw-r--r-- | engines/sci/detection_tables.h | 11 | ||||
| -rw-r--r-- | engines/sci/engine/savegame.cpp | 5 | ||||
| -rw-r--r-- | engines/sci/engine/savegame.h | 3 | ||||
| -rw-r--r-- | engines/sci/sound/midiparser_sci.cpp | 1 | ||||
| -rw-r--r-- | engines/sci/sound/music.h | 2 | ||||
| -rw-r--r-- | engines/sci/sound/soundcmd.cpp | 7 | 
6 files changed, 23 insertions, 6 deletions
diff --git a/engines/sci/detection_tables.h b/engines/sci/detection_tables.h index 92e77cead9..d0a0db2a3b 100644 --- a/engines/sci/detection_tables.h +++ b/engines/sci/detection_tables.h @@ -3297,6 +3297,17 @@ static const struct ADGameDescription SciGameDescriptions[] = {  		AD_LISTEND},  	 	Common::EN_ANY, Common::kPlatformWindows, ADGF_UNSTABLE, GUIO4(GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI)	}, +	// RAMA - German Windows CD (from farmboy0, in pull request 397) +	{"rama", "", { +		{"resmap.001", 0, "f68cd73308c46977a9632dfc618e1e38", 8338}, +	 	{"ressci.001", 0, "2a68edd064e5e4937b5e9c74b38f2082", 70595521}, +	 	{"resmap.002", 0, "891fc2f5d9e23e7d9a9454acc7aaae52", 12082}, +	 	{"ressci.002", 0, "2a68edd064e5e4937b5e9c74b38f2082", 128508558}, +	 	{"resmap.003", 0, "222096000bd83a1d56577114a452cccf", 1636}, +	 	{"ressci.003", 0, "2a68edd064e5e4937b5e9c74b38f2082", 6954219}, +		AD_LISTEND}, +	 	Common::DE_DEU, Common::kPlatformWindows, ADGF_UNSTABLE, GUIO4(GUIO_NOASPECT, GAMEOPTION_PREFER_DIGITAL_SFX, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_FB01_MIDI)	}, +  	// RAMA - Italian Windows CD (from glorifindel)  	// SCI interpreter version 3.000.000 (a guess?)  	{"rama", "", { diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp index c8076ec819..c60b50a964 100644 --- a/engines/sci/engine/savegame.cpp +++ b/engines/sci/engine/savegame.cpp @@ -600,7 +600,10 @@ void MusicEntry::saveLoadWithSerializer(Common::Serializer &s) {  	s.syncAsSint16LE(dataInc);  	s.syncAsSint16LE(ticker);  	s.syncAsSint16LE(signal, VER(17)); -	s.syncAsByte(priority); +	if (s.getVersion() >= 31) // FE sound/music.h -> priority +		s.syncAsSint16LE(priority); +	else +		s.syncAsByte(priority);  	s.syncAsSint16LE(loop, VER(17));  	s.syncAsByte(volume);  	s.syncAsByte(hold, VER(17)); diff --git a/engines/sci/engine/savegame.h b/engines/sci/engine/savegame.h index 1d899b0d37..f1f02f89f2 100644 --- a/engines/sci/engine/savegame.h +++ b/engines/sci/engine/savegame.h @@ -37,6 +37,7 @@ struct EngineState;   *   * Version - new/changed feature   * ============================= + *      31 - priority for sound effects/music is now a signed int16, instead of a byte   *      30 - synonyms   *      29 - system strings   *      28 - heap @@ -55,7 +56,7 @@ struct EngineState;   */  enum { -	CURRENT_SAVEGAME_VERSION = 30, +	CURRENT_SAVEGAME_VERSION = 31,  	MINIMUM_SAVEGAME_VERSION = 14  }; diff --git a/engines/sci/sound/midiparser_sci.cpp b/engines/sci/sound/midiparser_sci.cpp index 3332edd5a6..d6ff4f6cc8 100644 --- a/engines/sci/sound/midiparser_sci.cpp +++ b/engines/sci/sound/midiparser_sci.cpp @@ -611,7 +611,6 @@ void MidiParser_SCI::processEvent(const EventInfo &info, bool fireEvents) {  						error("unsupported _soundVersion");  					}  					_pSnd->dataInc += inc; -					_pSnd->signal = 0x7f + inc;  					debugC(4, kDebugLevelSound, "datainc %04x", inc);  				} diff --git a/engines/sci/sound/music.h b/engines/sci/sound/music.h index 1f798c90d7..40236c8445 100644 --- a/engines/sci/sound/music.h +++ b/engines/sci/sound/music.h @@ -69,7 +69,7 @@ public:  	uint16 dataInc;  	uint16 ticker;  	uint16 signal; -	byte priority; +	int16 priority; // must be int16, at least in Laura Bow 1, main music (object conMusic) uses priority -1  	uint16 loop;  	int16 volume;  	int16 hold; diff --git a/engines/sci/sound/soundcmd.cpp b/engines/sci/sound/soundcmd.cpp index b0102a002b..e36c5705ab 100644 --- a/engines/sci/sound/soundcmd.cpp +++ b/engines/sci/sound/soundcmd.cpp @@ -116,7 +116,10 @@ void SoundCommandParser::processInitSound(reg_t obj) {  	newSound->resourceId = resourceId;  	newSound->soundObj = obj;  	newSound->loop = readSelectorValue(_segMan, obj, SELECTOR(loop)); -	newSound->priority = readSelectorValue(_segMan, obj, SELECTOR(priority)) & 0xFF; +	if (_soundVersion <= SCI_VERSION_0_LATE) +		newSound->priority = readSelectorValue(_segMan, obj, SELECTOR(priority)); +	else +		newSound->priority = readSelectorValue(_segMan, obj, SELECTOR(priority)) & 0xFF;  	if (_soundVersion >= SCI_VERSION_1_EARLY)  		newSound->volume = CLIP<int>(readSelectorValue(_segMan, obj, SELECTOR(vol)), 0, MUSIC_VOLUME_MAX);  	newSound->reverb = -1;	// initialize to SCI invalid, it'll be set correctly in soundInitSnd() below @@ -428,7 +431,7 @@ reg_t SoundCommandParser::kDoSoundUpdate(int argc, reg_t *argv, reg_t acc) {  	int16 objVol = CLIP<int>(readSelectorValue(_segMan, obj, SELECTOR(vol)), 0, 255);  	if (objVol != musicSlot->volume)  		_music->soundSetVolume(musicSlot, objVol); -	uint32 objPrio = readSelectorValue(_segMan, obj, SELECTOR(priority)); +	int16 objPrio = readSelectorValue(_segMan, obj, SELECTOR(priority));  	if (objPrio != musicSlot->priority)  		_music->soundSetPriority(musicSlot, objPrio);  	return acc;  | 
