[Scummvm-cvs-logs] CVS: scummvm/sky control.cpp,1.49,1.50 logic.cpp,1.126,1.127 sound.cpp,1.28,1.29
Robert G?ffringmann
lavosspawn at users.sourceforge.net
Mon Jul 14 13:02:22 CEST 2003
Update of /cvsroot/scummvm/scummvm/sky
In directory sc8-pr-cvs1:/tmp/cvs-serv19389/sky
Modified Files:
control.cpp logic.cpp sound.cpp
Log Message:
maybe this fixed those random crashes...
Index: control.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/control.cpp,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -d -r1.49 -r1.50
--- control.cpp 14 Jul 2003 09:26:50 -0000 1.49
+++ control.cpp 14 Jul 2003 20:01:53 -0000 1.50
@@ -1447,6 +1447,7 @@
if (srcPos - srcBuf != (int32)size)
error("Restore failed! Savegame data = %d bytes. Expected size: %d", srcPos-srcBuf, size);
+ SkyState::_systemVars.systemFlags |= SF_GAME_RESTORED;
if (!SkyState::isDemo()) {
_skyLogic->fnLeaveSection(oldSection, 0, 0);
_skyLogic->fnEnterSection(SkyLogic::_scriptVariables[CUR_SECTION], 0, 0);
@@ -1457,7 +1458,6 @@
_skyMusic->startMusic((uint16)music);
_savedMouse = (uint16)mouseType;
SkyState::_systemVars.currentPalette = palette; // will be set when doControlPanel ends
- SkyState::_systemVars.systemFlags |= SF_GAME_RESTORED; // what's that for?
return GAME_RESTORED;
}
Index: logic.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/logic.cpp,v
retrieving revision 1.126
retrieving revision 1.127
diff -u -d -r1.126 -r1.127
--- logic.cpp 14 Jul 2003 10:05:32 -0000 1.126
+++ logic.cpp 14 Jul 2003 20:01:53 -0000 1.127
@@ -2215,7 +2215,7 @@
if (sectionNo == 5) //linc section - has different mouse icons
_skyMouse->replaceMouseCursors(60301);
- _currentSection = 0xFF; // force music-, sound- and gridreload
+ //_currentSection = 0xFF; // force music-, sound- and gridreload
return true;
}
@@ -2231,13 +2231,14 @@
if (sectionNo == 5) //linc section - has different mouse icons
_skyMouse->replaceMouseCursors(60302);
- if (sectionNo != _currentSection) {
+ if ((sectionNo != _currentSection) || (SkyState::_systemVars.systemFlags & SF_GAME_RESTORED)) {
_currentSection = sectionNo;
sectionNo++;
_skyMusic->loadSection((byte)sectionNo);
_skySound->loadSection((byte)sectionNo);
_skyGrid->loadGrids();
+ SkyState::_systemVars.systemFlags &= ~SF_GAME_RESTORED;
}
return true;
Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/sound.cpp,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- sound.cpp 13 Jul 2003 16:22:16 -0000 1.28
+++ sound.cpp 14 Jul 2003 20:01:54 -0000 1.29
@@ -1067,6 +1067,7 @@
void SkySound::loadSection(uint8 pSection) {
fnStopFx();
+ _mixer->stopAll();
if (_soundData) free(_soundData);
_soundData = _skyDisk->loadFile(pSection * 4 + SOUND_FILE_BASE, NULL);
More information about the Scummvm-git-logs
mailing list