[Scummvm-cvs-logs] CVS: scummvm/sword1 sword1.cpp,1.28,1.29
Robert G?ffringmann
lavosspawn at users.sourceforge.net
Sun Jan 4 09:20:52 CET 2004
Update of /cvsroot/scummvm/scummvm/sword1
In directory sc8-pr-cvs1:/tmp/cvs-serv7591/sword1
Modified Files:
sword1.cpp
Log Message:
fixed cd changing code
Index: sword1.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword1/sword1.cpp,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- sword1.cpp 4 Jan 2004 14:00:58 -0000 1.28
+++ sword1.cpp 4 Jan 2004 17:19:17 -0000 1.29
@@ -1085,16 +1085,24 @@
void SwordEngine::checkCd(void) {
uint8 needCd = _cdList[SwordLogic::_scriptVars[NEW_SCREEN]];
- if ((needCd == 0) && (_systemVars.currentCD == 0))
- needCd = 1;
- if (needCd != _systemVars.currentCD) {
- _systemVars.currentCD = needCd;
- if (_systemVars.runningFromCd) {
+ if (needCd == 0) {
+ if (_systemVars.currentCD == 0)
+ needCd = 1;
+ else
+ needCd = _systemVars.currentCD;
+ }
+ if (_systemVars.runningFromCd) {
+ if (!_systemVars.currentCD) {
+ _systemVars.currentCD = needCd;
+ _control->askForCd();
+ } else if (_systemVars.currentCD != needCd) {
_music->startMusic(0, 0);
_sound->closeCowSystem();
+ _systemVars.currentCD = needCd;
_control->askForCd();
}
- }
+ } else
+ _systemVars.currentCD = needCd;
}
uint8 SwordEngine::mainLoop(void) {
More information about the Scummvm-git-logs
mailing list