diff options
Diffstat (limited to 'engines/sword1/sword1.cpp')
-rw-r--r-- | engines/sword1/sword1.cpp | 76 |
1 files changed, 38 insertions, 38 deletions
diff --git a/engines/sword1/sword1.cpp b/engines/sword1/sword1.cpp index 23dff4dec2..6a3f215c4b 100644 --- a/engines/sword1/sword1.cpp +++ b/engines/sword1/sword1.cpp @@ -48,9 +48,9 @@ SystemVars SwordEngine::_systemVars; SwordEngine::SwordEngine(OSystem *syst) : Engine(syst) { - if (!scumm_stricmp(ConfMan.get("gameid").c_str(), "sword1demo") || - !scumm_stricmp(ConfMan.get("gameid").c_str(), "sword1psxdemo") || - !scumm_stricmp(ConfMan.get("gameid").c_str(), "sword1macdemo")) + if (!scumm_stricmp(ConfMan.get("gameid").c_str(), "sword1demo") || + !scumm_stricmp(ConfMan.get("gameid").c_str(), "sword1psxdemo") || + !scumm_stricmp(ConfMan.get("gameid").c_str(), "sword1macdemo")) _features = GF_DEMO; else _features = 0; @@ -85,11 +85,11 @@ Common::Error SwordEngine::init() { initGraphics(640, 480, true); - if ( 0 == scumm_stricmp(ConfMan.get("gameid").c_str(), "sword1mac") || - 0 == scumm_stricmp(ConfMan.get("gameid").c_str(), "sword1macdemo") ) + if (0 == scumm_stricmp(ConfMan.get("gameid").c_str(), "sword1mac") || + 0 == scumm_stricmp(ConfMan.get("gameid").c_str(), "sword1macdemo")) _systemVars.platform = Common::kPlatformMacintosh; - else if (0 == scumm_stricmp(ConfMan.get("gameid").c_str(), "sword1psx") || - 0 == scumm_stricmp(ConfMan.get("gameid").c_str(), "sword1psxdemo") ) + else if (0 == scumm_stricmp(ConfMan.get("gameid").c_str(), "sword1psx") || + 0 == scumm_stricmp(ConfMan.get("gameid").c_str(), "sword1psxdemo")) _systemVars.platform = Common::kPlatformPSX; else _systemVars.platform = Common::kPlatformWindows; @@ -279,18 +279,18 @@ const CdFile SwordEngine::_pcCdFileList[] = { { "text.clu", FLAG_CD1 | FLAG_DEMO }, { "cows.mad", FLAG_DEMO }, { "speech1.clu", FLAG_SPEECH1 }, - { "speech2.clu", FLAG_SPEECH2 } + { "speech2.clu", FLAG_SPEECH2 } #ifdef USE_FLAC - ,{ "speech1.clf", FLAG_SPEECH1 }, - { "speech2.clf", FLAG_SPEECH2 } + , { "speech1.clf", FLAG_SPEECH1 }, + { "speech2.clf", FLAG_SPEECH2 } #endif #ifdef USE_VORBIS - ,{ "speech1.clv", FLAG_SPEECH1 }, - { "speech2.clv", FLAG_SPEECH2 } + , { "speech1.clv", FLAG_SPEECH1 }, + { "speech2.clv", FLAG_SPEECH2 } #endif #ifdef USE_MAD - ,{ "speech1.cl3", FLAG_SPEECH1 }, - { "speech2.cl3", FLAG_SPEECH2 } + , { "speech1.cl3", FLAG_SPEECH1 }, + { "speech2.cl3", FLAG_SPEECH2 } #endif }; @@ -311,18 +311,18 @@ const CdFile SwordEngine::_macCdFileList[] = { { "swordres.rif", FLAG_CD1 | FLAG_DEMO | FLAG_IMMED }, { "text.clm", FLAG_CD1 | FLAG_DEMO }, { "speech1.clu", FLAG_SPEECH1 }, - { "speech2.clu", FLAG_SPEECH2 } + { "speech2.clu", FLAG_SPEECH2 } #ifdef USE_FLAC ,{ "speech1.clf", FLAG_SPEECH1 }, - { "speech2.clf", FLAG_SPEECH2 } + { "speech2.clf", FLAG_SPEECH2 } #endif #ifdef USE_VORBIS ,{ "speech1.clv", FLAG_SPEECH1 }, - { "speech2.clv", FLAG_SPEECH2 } + { "speech2.clv", FLAG_SPEECH2 } #endif #ifdef USE_MAD ,{ "speech1.cl3", FLAG_SPEECH1 }, - { "speech2.cl3", FLAG_SPEECH2 } + { "speech2.cl3", FLAG_SPEECH2 } #endif }; @@ -364,7 +364,7 @@ void SwordEngine::showFileErrorMsg(uint8 type, bool *fileExists) { int msgId = (type == TYPE_IMMED) ? 0 : 2; if (missCnt == 1) { sprintf(msg, errorMsgs[msgId], - _macCdFileList[missNum].name, (_macCdFileList[missNum].flags & FLAG_CD2) ? 2 : 1); + _macCdFileList[missNum].name, (_macCdFileList[missNum].flags & FLAG_CD2) ? 2 : 1); warning("%s", msg); } else { char *pos = msg + sprintf(msg, errorMsgs[msgId + 1], missCnt); @@ -407,7 +407,7 @@ void SwordEngine::showFileErrorMsg(uint8 type, bool *fileExists) { int msgId = (type == TYPE_IMMED) ? 0 : 2; if (missCnt == 1) { sprintf(msg, errorMsgs[msgId], - _pcCdFileList[missNum].name, (_pcCdFileList[missNum].flags & FLAG_CD2) ? 2 : 1); + _pcCdFileList[missNum].name, (_pcCdFileList[missNum].flags & FLAG_CD2) ? 2 : 1); warning("%s", msg); } else { char *pos = msg + sprintf(msg, errorMsgs[msgId + 1], missCnt); @@ -454,9 +454,9 @@ void SwordEngine::checkCdFiles() { // check if we're running from cd, hdd or wha if (Common::File::exists(_psxCdFileList[fcnt].name)) { fileExists[fcnt] = true; flagsToBool(foundTypes, _psxCdFileList[fcnt].flags); - if (!(_psxCdFileList[fcnt].flags & FLAG_DEMO)) + if (!(_psxCdFileList[fcnt].flags & FLAG_DEMO)) isFullVersion = true; - cd2FilesFound = true; + cd2FilesFound = true; } else { flagsToBool(missingTypes, _psxCdFileList[fcnt].flags); fileExists[fcnt] = false; @@ -486,9 +486,9 @@ void SwordEngine::checkCdFiles() { // check if we're running from cd, hdd or wha if (foundTypes[TYPE_SPEECH2]) // same for speech2 missingTypes[TYPE_SPEECH2] = false; - if (isFullVersion) // if this is the full version... + if (isFullVersion) // if this is the full version... missingTypes[TYPE_DEMO] = false; // then we don't need demo files... - else // and vice versa + else // and vice versa missingTypes[TYPE_SPEECH1] = missingTypes[TYPE_SPEECH2] = missingTypes[TYPE_CD1] = missingTypes[TYPE_CD2] = false; bool somethingMissing = false; @@ -526,13 +526,13 @@ void SwordEngine::checkCdFiles() { // check if we're running from cd, hdd or wha showFileErrorMsg(TYPE_IMMED, fileExists); } else if ((!missingTypes[TYPE_CD1]) && !cd2FilesFound) { /* we have all the data from cd one, but not a single one from CD2. - I'm not sure how we should handle this, for now I'll just assume that the - user has set up the extrapath correctly and copied the necessary files to HDD. - A quite optimistic assumption, I'd say. Maybe we should change this for the release - to warn the user? */ + I'm not sure how we should handle this, for now I'll just assume that the + user has set up the extrapath correctly and copied the necessary files to HDD. + A quite optimistic assumption, I'd say. Maybe we should change this for the release + to warn the user? */ warning("CD2 data files not found. I hope you know what you're doing and that\n" - "you have set up the extrapath and additional data correctly.\n" - "If you didn't, you should better read the ScummVM readme file"); + "you have set up the extrapath and additional data correctly.\n" + "If you didn't, you should better read the ScummVM readme file"); _systemVars.runningFromCd = true; _systemVars.playSpeech = true; } else if (missingTypes[TYPE_CD1] || missingTypes[TYPE_CD2]) { @@ -542,13 +542,13 @@ void SwordEngine::checkCdFiles() { // check if we're running from cd, hdd or wha // not so important, but there won't be any voices if (missingTypes[TYPE_SPEECH1] && missingTypes[TYPE_SPEECH2]) warning("Unable to find the speech files. The game will work, but you won't hear any voice output.\n" - "Please copy the SPEECH.CLU files from both CDs and rename them to SPEECH1.CLU and SPEECH2.CLU,\n" - "corresponding to the CD number.\n" - "Please read the ScummVM Readme file for more information"); + "Please copy the SPEECH.CLU files from both CDs and rename them to SPEECH1.CLU and SPEECH2.CLU,\n" + "corresponding to the CD number.\n" + "Please read the ScummVM Readme file for more information"); else warning("Unable to find the speech file from CD %d.\n" - "You won't hear any voice output in that part of the game.\n" - "Please read the ScummVM Readme file for more information", missingTypes[TYPE_SPEECH1] ? 1 : 2); + "You won't hear any voice output in that part of the game.\n" + "Please read the ScummVM Readme file for more information", missingTypes[TYPE_SPEECH1] ? 1 : 2); } else if (missingTypes[TYPE_DEMO]) { // for the demo version, we simply expect to have all files immediately showFileErrorMsg(TYPE_IMMED, fileExists); @@ -618,9 +618,9 @@ void SwordEngine::checkCd() { _music->startMusic(0, 0); // _sound->closeCowSystem(); // close music and sound files before changing CDs _systemVars.currentCD = needCd; // askForCd will ask the player to insert _systemVars.currentCd, - _control->askForCd(); // so it has to be updated before calling it. + _control->askForCd(); // so it has to be updated before calling it. } - } else { // we're running from HDD, we don't have to care about music files and Sound will take care of + } else { // we're running from HDD, we don't have to care about music files and Sound will take care of if (needCd) // switching sound.clu files on Sound::newScreen by itself, so there's nothing to be done. _systemVars.currentCD = needCd; else if (_systemVars.currentCD == 0) @@ -673,7 +673,7 @@ uint8 SwordEngine::mainLoop() { // The control panel is triggered by F5 or ESC. else if (((_keyPressed.keycode == Common::KEYCODE_F5 || _keyPressed.keycode == Common::KEYCODE_ESCAPE) - && (Logic::_scriptVars[MOUSE_STATUS] & 1)) || (_systemVars.controlPanelMode)) { + && (Logic::_scriptVars[MOUSE_STATUS] & 1)) || (_systemVars.controlPanelMode)) { retCode = _control->runPanel(); if (retCode == CONTROL_NOTHING_DONE) _screen->fullRefresh(); |