[ scummvm-Patches-1773489 ] FW: Fixes for German Amiga Version

SourceForge.net noreply at sourceforge.net
Mon Aug 13 22:26:21 CEST 2007


Patches item #1773489, was opened at 2007-08-13 22:26
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=418822&aid=1773489&group_id=37116

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Thomas Richter (thorfdbg)
Assigned to: Nobody/Anonymous (nobody)
Summary: FW: Fixes for German Amiga Version

Initial Comment:
The following patches fix the crashes for the german Amiga version of FutureWars (SVN version used) for bugs
1763053
1758503
in the bug database (not so) recently reported by myself:

a) Replace in cine/script.cpp o1_freePartRange by:

void o1_freePartRange() {
	byte startIdx = getNextByte();
	byte numIdx = getNextByte();

	assert(startIdx + numIdx <= NUM_MAX_ANIMDATA);
	g_sound->stopMusic();
	debugC(5, kCineDebugScript, "Line: %d: freePartRange(%d,%d)", _currentLine, startIdx, numIdx);
	freeAnimDataRange(startIdx, numIdx);
}

This will stop the sound engine when unloading its resources, fixes the first bug reported in 1763053.

b) Replace in cine/unpack.cpp delphineUnpack(), the termination condition of the while loop with:

	} while (uc.datasize > 0 && uc.src >= src - 4);

This will stop unpacking your sofa if something's wrong with the packed data. Aparently, this seems to be the case for one of the files near the end at least for my version (or my disks are getting weary, but never mind, this extra condition doesn't hurt).
This fixes the second bug reported in 1763053.

c) in cine/sound.cpp replace PaulaSound::playMusic by:

void PaulaSound::playMusic() {
	_mixer->stopHandle(_moduleHandle);
	if (_moduleStream) {
	  _mixer->playInputStream(Audio::Mixer::kMusicSoundType, &_moduleHandle, _moduleStream,
				  -1,255,0,false);
	}
}

This will avoid deleting the sound channels because they will be needed afterwards again. This is part of the fix for 1758503.

d) in cine/sound.cpp replace PaulaSound::stopMusic() by:

void PaulaSound::stopMusic() {
	_mixer->stopHandle(_moduleHandle);
	_mixer->pauseAll(true);
	for(int i = 0;i < NUM_CHANNELS;i++)
	  _soundChannelsTable[i].data = 0;
}

This will *really* stop the music, not just pretend to, and is part of the fix for both reports.

For saved games, please check the two bug reports in the database.

Greetings,
Thomas

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=418822&aid=1773489&group_id=37116




More information about the Scummvm-tracker mailing list