aboutsummaryrefslogtreecommitdiff
path: root/sky
diff options
context:
space:
mode:
authorTorbjörn Andersson2003-09-24 06:33:59 +0000
committerTorbjörn Andersson2003-09-24 06:33:59 +0000
commit570e60a48797efa08ae5a6c7102f16678704bae8 (patch)
treef7fe3554f78b9c5e70ba4391eeedb69a5f0911ea /sky
parent3854ce8f3d060f5bb4c1e248d846f73a7fe2942c (diff)
downloadscummvm-rg350-570e60a48797efa08ae5a6c7102f16678704bae8.tar.gz
scummvm-rg350-570e60a48797efa08ae5a6c7102f16678704bae8.tar.bz2
scummvm-rg350-570e60a48797efa08ae5a6c7102f16678704bae8.zip
Whitespace changes
svn-id: r10390
Diffstat (limited to 'sky')
-rw-r--r--sky/compact.cpp42
-rw-r--r--sky/control.cpp249
-rw-r--r--sky/intro.cpp198
-rw-r--r--sky/music/adlibchannel.cpp48
-rw-r--r--sky/music/gmchannel.cpp48
-rw-r--r--sky/music/musicbase.cpp52
-rw-r--r--sky/sky.cpp109
-rw-r--r--sky/text.cpp22
8 files changed, 369 insertions, 399 deletions
diff --git a/sky/compact.cpp b/sky/compact.cpp
index 5a18cb8c47..90879ba512 100644
--- a/sky/compact.cpp
+++ b/sky/compact.cpp
@@ -58,27 +58,27 @@ namespace SkyCompact {
uint16 *getGrafixPtr(Compact *cpt) {
uint16 *buf;
switch (cpt->grafixProg.ptrType) {
- case PTR_NULL:
- return NULL;
- case AUTOROUTE:
- if (!cpt->extCompact)
- error("::getGrafixPtr: request for AR pointer, extCompact is NULL, though.");
- return (cpt->extCompact->animScratch + cpt->grafixProg.pos);
- case COMPACT:
- buf = (uint16*)SkyState::fetchCompact(cpt->grafixProg.ptrTarget);
- if (buf == NULL)
- error("::getGrafixPtr: request for cpt %d pointer. It's NULL.", cpt->grafixProg.ptrTarget);
- return (buf + cpt->grafixProg.pos);
- case COMPACTELEM:
- buf = *(uint16 **)SkyCompact::getCompactElem(cpt, cpt->grafixProg.ptrTarget);
- if (buf == NULL)
- error("::getGrafixPtr: request for elem ptr %d. It's NULL.", cpt->grafixProg.ptrTarget);
- return buf + cpt->grafixProg.pos;
- case TALKTABLE:
- buf = (uint16 *)SkyTalkAnims::animTalkTablePtr[cpt->grafixProg.ptrTarget];
- return buf + cpt->grafixProg.pos;
- default:
- error("::getGrafixPtr: unknown grafixProg type for Compact cpt");
+ case PTR_NULL:
+ return NULL;
+ case AUTOROUTE:
+ if (!cpt->extCompact)
+ error("::getGrafixPtr: request for AR pointer, extCompact is NULL, though.");
+ return (cpt->extCompact->animScratch + cpt->grafixProg.pos);
+ case COMPACT:
+ buf = (uint16*)SkyState::fetchCompact(cpt->grafixProg.ptrTarget);
+ if (buf == NULL)
+ error("::getGrafixPtr: request for cpt %d pointer. It's NULL.", cpt->grafixProg.ptrTarget);
+ return (buf + cpt->grafixProg.pos);
+ case COMPACTELEM:
+ buf = *(uint16 **)SkyCompact::getCompactElem(cpt, cpt->grafixProg.ptrTarget);
+ if (buf == NULL)
+ error("::getGrafixPtr: request for elem ptr %d. It's NULL.", cpt->grafixProg.ptrTarget);
+ return buf + cpt->grafixProg.pos;
+ case TALKTABLE:
+ buf = (uint16 *)SkyTalkAnims::animTalkTablePtr[cpt->grafixProg.ptrTarget];
+ return buf + cpt->grafixProg.pos;
+ default:
+ error("::getGrafixPtr: unknown grafixProg type for Compact cpt");
}
return NULL; // never reached
}
diff --git a/sky/control.cpp b/sky/control.cpp
index ca36685866..36f115b368 100644
--- a/sky/control.cpp
+++ b/sky/control.cpp
@@ -502,96 +502,77 @@ uint16 SkyControl::handleClick(SkyConResource *pButton) {
char quitDos[] = "Quit to DOS?";
switch(pButton->_onClick) {
- case DO_NOTHING:
- return 0;
-
- case REST_GAME_PANEL:
- if (!loadSaveAllowed())
- return CANCEL_PRESSED; // can't save/restore while choosing
- animClick(pButton);
- return saveRestorePanel(false); // texts can't be edited
-
- case SAVE_GAME_PANEL:
- if (!loadSaveAllowed())
- return CANCEL_PRESSED; // can't save/restore while choosing
- animClick(pButton);
- return saveRestorePanel(true); // texts can be edited
-
- case SAVE_A_GAME:
- animClick(pButton);
- return saveGameToFile();
-
- case RESTORE_A_GAME:
- animClick(pButton);
- return restoreGameFromFile(false);
-
- case RESTORE_AUTO:
- animClick(pButton);
- return restoreGameFromFile(true);
-
- case SP_CANCEL:
- animClick(pButton);
- return CANCEL_PRESSED;
-
- case SHIFT_DOWN_FAST:
- animClick(pButton);
- return shiftDown(FAST);
-
- case SHIFT_DOWN_SLOW:
- animClick(pButton);
- return shiftDown(SLOW);
-
- case SHIFT_UP_FAST:
- animClick(pButton);
- return shiftUp(FAST);
-
- case SHIFT_UP_SLOW:
- animClick(pButton);
- return shiftUp(SLOW);
-
- case SPEED_SLIDE:
- _mouseClicked = true;
- return doSpeedSlide();
-
- case MUSIC_SLIDE:
- _mouseClicked = true;
- return doMusicSlide();
-
- case TOGGLE_FX:
- return toggleFx(pButton);
-
- case TOGGLE_MS:
- animClick(pButton);
- toggleMusic();
- return TOGGLED;
-
- case TOGGLE_TEXT:
- animClick(pButton);
- return toggleText();
-
- case EXIT:
- animClick(pButton);
- return QUIT_PANEL;
-
- case RESTART:
- animClick(pButton);
- if (getYesNo(NULL)) {
- restartGame();
- return GAME_RESTORED;
- } else
- return 0;
-
- case QUIT_TO_DOS:
- animClick(pButton);
- if (getYesNo(quitDos)) {
- showGameQuitMsg(false);
- delay(1500);
- _system->quit();
- }
+ case DO_NOTHING:
+ return 0;
+ case REST_GAME_PANEL:
+ if (!loadSaveAllowed())
+ return CANCEL_PRESSED; // can't save/restore while choosing
+ animClick(pButton);
+ return saveRestorePanel(false); // texts can't be edited
+ case SAVE_GAME_PANEL:
+ if (!loadSaveAllowed())
+ return CANCEL_PRESSED; // can't save/restore while choosing
+ animClick(pButton);
+ return saveRestorePanel(true); // texts can be edited
+ case SAVE_A_GAME:
+ animClick(pButton);
+ return saveGameToFile();
+ case RESTORE_A_GAME:
+ animClick(pButton);
+ return restoreGameFromFile(false);
+ case RESTORE_AUTO:
+ animClick(pButton);
+ return restoreGameFromFile(true);
+ case SP_CANCEL:
+ animClick(pButton);
+ return CANCEL_PRESSED;
+ case SHIFT_DOWN_FAST:
+ animClick(pButton);
+ return shiftDown(FAST);
+ case SHIFT_DOWN_SLOW:
+ animClick(pButton);
+ return shiftDown(SLOW);
+ case SHIFT_UP_FAST:
+ animClick(pButton);
+ return shiftUp(FAST);
+ case SHIFT_UP_SLOW:
+ animClick(pButton);
+ return shiftUp(SLOW);
+ case SPEED_SLIDE:
+ _mouseClicked = true;
+ return doSpeedSlide();
+ case MUSIC_SLIDE:
+ _mouseClicked = true;
+ return doMusicSlide();
+ case TOGGLE_FX:
+ return toggleFx(pButton);
+ case TOGGLE_MS:
+ animClick(pButton);
+ toggleMusic();
+ return TOGGLED;
+ case TOGGLE_TEXT:
+ animClick(pButton);
+ return toggleText();
+ case EXIT:
+ animClick(pButton);
+ return QUIT_PANEL;
+ case RESTART:
+ animClick(pButton);
+ if (getYesNo(NULL)) {
+ restartGame();
+ return GAME_RESTORED;
+ } else
return 0;
-
- default:
- error("SkyControl::handleClick: unknown routine: %X",pButton->_onClick);
+ case QUIT_TO_DOS:
+ animClick(pButton);
+ if (getYesNo(quitDos)) {
+ showGameQuitMsg(false);
+ delay(1500);
+ _system->quit();
+ }
+ return 0;
+ default:
+ error("SkyControl::handleClick: unknown routine: %X",pButton->_onClick);
}
}
@@ -1649,21 +1630,21 @@ void SkyControl::restartGame(void) {
uint16 *resetData = lz77decode((uint16 *)_resetData288);
switch (SkyState::_systemVars.gameVersion) {
- case 303:
- applyDiff(resetData, (uint16*)_resetDiff303, 206);
- break;
- case 331:
- applyDiff(resetData, (uint16*)_resetDiff331, 206);
- break;
- case 348:
- applyDiff(resetData, (uint16*)_resetDiff348, 206);
- break;
- case 365:
- case 368:
- case 372:
- applyDiff(resetData, (uint16*)_resetDiffCd, 214);
- default:
- break;
+ case 303:
+ applyDiff(resetData, (uint16*)_resetDiff303, 206);
+ break;
+ case 331:
+ applyDiff(resetData, (uint16*)_resetDiff331, 206);
+ break;
+ case 348:
+ applyDiff(resetData, (uint16*)_resetDiff348, 206);
+ break;
+ case 365:
+ case 368:
+ case 372:
+ applyDiff(resetData, (uint16*)_resetDiffCd, 214);
+ default:
+ break;
}
// ok, we finally have our savedata
@@ -1688,41 +1669,35 @@ void SkyControl::delay(unsigned int amount) {
do {
while (_system->poll_event(&event)) {
switch (event.event_code) {
- case OSystem::EVENT_KEYDOWN:
- // Make sure backspace works right (this fixes a small issue on OS X)
- if (event.kbd.keycode == 8)
- _keyPressed = 8;
- else
- _keyPressed = (byte)event.kbd.ascii;
- break;
-
- case OSystem::EVENT_MOUSEMOVE:
- _mouseX = event.mouse.x;
- _mouseY = event.mouse.y;
- break;
-
- case OSystem::EVENT_LBUTTONDOWN:
- _mouseClicked = true;
+ case OSystem::EVENT_KEYDOWN:
+ // Make sure backspace works right (this fixes a small issue on OS X)
+ if (event.kbd.keycode == 8)
+ _keyPressed = 8;
+ else
+ _keyPressed = (byte)event.kbd.ascii;
+ break;
+ case OSystem::EVENT_MOUSEMOVE:
+ _mouseX = event.mouse.x;
+ _mouseY = event.mouse.y;
+ break;
+ case OSystem::EVENT_LBUTTONDOWN:
+ _mouseClicked = true;
#ifdef _WIN32_WCE
- _mouseX = event.mouse.x;
- _mouseY = event.mouse.y;
+ _mouseX = event.mouse.x;
+ _mouseY = event.mouse.y;
#endif
- break;
-
- case OSystem::EVENT_LBUTTONUP:
- _mouseClicked = false;
- break;
-
- case OSystem::EVENT_RBUTTONDOWN:
- break;
-
- case OSystem::EVENT_QUIT:
- if (!SkyState::_systemVars.quitting)
- showGameQuitMsg(false);
- break;
-
- default:
- break;
+ break;
+ case OSystem::EVENT_LBUTTONUP:
+ _mouseClicked = false;
+ break;
+ case OSystem::EVENT_RBUTTONDOWN:
+ break;
+ case OSystem::EVENT_QUIT:
+ if (!SkyState::_systemVars.quitting)
+ showGameQuitMsg(false);
+ break;
+ default:
+ break;
}
}
diff --git a/sky/intro.cpp b/sky/intro.cpp
index 4ed7bf7fa3..c40a47f41f 100644
--- a/sky/intro.cpp
+++ b/sky/intro.cpp
@@ -667,86 +667,86 @@ bool SkyIntro::nextPart(uint16 *&data) {
// return false means cancel intro
uint16 command = *data++;
switch (command) {
- case SHOWSCREEN:
- _skyScreen->showScreen(*data++);
- return true;
- case FADEUP:
- _skyScreen->paletteFadeUp(*data++);
- return true;
- case FADEDOWN:
- _skyScreen->fnFadeDown(0);
- return true;
- case DELAY:
- if (!escDelay(*data++))
+ case SHOWSCREEN:
+ _skyScreen->showScreen(*data++);
+ return true;
+ case FADEUP:
+ _skyScreen->paletteFadeUp(*data++);
+ return true;
+ case FADEDOWN:
+ _skyScreen->fnFadeDown(0);
+ return true;
+ case DELAY:
+ if (!escDelay(*data++))
+ return false;
+ return true;
+ case DOFLIRT:
+ _skyScreen->startSequence(*data++);
+ while (_skyScreen->sequenceRunning())
+ if (!escDelay(50))
return false;
- return true;
- case DOFLIRT:
- _skyScreen->startSequence(*data++);
- while (_skyScreen->sequenceRunning())
- if (!escDelay(50))
- return false;
- return true;
- case SCROLLFLIRT:
- return floppyScrollFlirt();
- case COMMANDFLIRT:
- return commandFlirt(data);
- case STOPFLIRT:
- _skyScreen->stopSequence();
- return true;
- case STARTMUSIC:
- _skyMusic->startMusic(*data++);
- return true;
- case WAITMUSIC:
- while (_skyMusic->musicIsPlaying())
- if (!escDelay(50))
- return false;
- return true;
- case BGFLIRT:
- _skyScreen->startSequence(*data++);
- return true;
- case WAITFLIRT:
- while (_skyScreen->sequenceRunning())
- if (!escDelay(50))
- return false;
- return true;
- case PLAYVOICE:
- if (!escDelay(200))
+ return true;
+ case SCROLLFLIRT:
+ return floppyScrollFlirt();
+ case COMMANDFLIRT:
+ return commandFlirt(data);
+ case STOPFLIRT:
+ _skyScreen->stopSequence();
+ return true;
+ case STARTMUSIC:
+ _skyMusic->startMusic(*data++);
+ return true;
+ case WAITMUSIC:
+ while (_skyMusic->musicIsPlaying())
+ if (!escDelay(50))
return false;
- vData = _skyDisk->loadFile(*data++, NULL);
- // HACK: Fill the header with silence. We should
- // probably use _skySound instead of calling playRaw()
- // directly, but this will have to do for now.
- memset(vData, 127, sizeof(struct dataFileHeader));
- _mixer->playRaw(&_voice, vData, _skyDisk->_lastLoadedFileSize, 11025,
- SoundMixer::FLAG_AUTOFREE | SoundMixer::FLAG_UNSIGNED, SOUND_VOICE);
- return true;
- case WAITVOICE:
- while (_voice)
- if (!escDelay(50))
- return false;
- return true;
- case LOADBG:
- _mixer->stopID(SOUND_BG);
- if (_bgBuf)
- free(_bgBuf);
- _bgBuf = _skyDisk->loadFile(*data++, NULL);
- _bgSize = _skyDisk->_lastLoadedFileSize;
- return true;
- case LOOPBG:
- _mixer->stopID(SOUND_BG);
- _mixer->playRaw(&_bgSfx, _bgBuf + 256, _bgSize - 768, 11025,
- SoundMixer::FLAG_UNSIGNED | SoundMixer::FLAG_LOOP, SOUND_BG);
- return true;
- case PLAYBG:
- _mixer->stopID(SOUND_BG);
- _mixer->playRaw(&_bgSfx, _bgBuf + 256, _bgSize - 768, 11025,
- SoundMixer::FLAG_UNSIGNED, SOUND_BG);
- return true;
- case STOPBG:
- _mixer->stopID(SOUND_BG);
- return true;
- default:
- error("Unknown intro command %X", command);
+ return true;
+ case BGFLIRT:
+ _skyScreen->startSequence(*data++);
+ return true;
+ case WAITFLIRT:
+ while (_skyScreen->sequenceRunning())
+ if (!escDelay(50))
+ return false;
+ return true;
+ case PLAYVOICE:
+ if (!escDelay(200))
+ return false;
+ vData = _skyDisk->loadFile(*data++, NULL);
+ // HACK: Fill the header with silence. We should
+ // probably use _skySound instead of calling playRaw()
+ // directly, but this will have to do for now.
+ memset(vData, 127, sizeof(struct dataFileHeader));
+ _mixer->playRaw(&_voice, vData, _skyDisk->_lastLoadedFileSize, 11025,
+ SoundMixer::FLAG_AUTOFREE | SoundMixer::FLAG_UNSIGNED, SOUND_VOICE);
+ return true;
+ case WAITVOICE:
+ while (_voice)
+ if (!escDelay(50))
+ return false;
+ return true;
+ case LOADBG:
+ _mixer->stopID(SOUND_BG);
+ if (_bgBuf)
+ free(_bgBuf);
+ _bgBuf = _skyDisk->loadFile(*data++, NULL);
+ _bgSize = _skyDisk->_lastLoadedFileSize;
+ return true;
+ case LOOPBG:
+ _mixer->stopID(SOUND_BG);
+ _mixer->playRaw(&_bgSfx, _bgBuf + 256, _bgSize - 768, 11025,
+ SoundMixer::FLAG_UNSIGNED | SoundMixer::FLAG_LOOP, SOUND_BG);
+ return true;
+ case PLAYBG:
+ _mixer->stopID(SOUND_BG);
+ _mixer->playRaw(&_bgSfx, _bgBuf + 256, _bgSize - 768, 11025,
+ SoundMixer::FLAG_UNSIGNED, SOUND_BG);
+ return true;
+ case STOPBG:
+ _mixer->stopID(SOUND_BG);
+ return true;
+ default:
+ error("Unknown intro command %X", command);
}
return true;
}
@@ -803,27 +803,27 @@ bool SkyIntro::commandFlirt(uint16 *&data) {
data++;
uint16 command = *data++;
switch(command) {
- case IC_PREPARE_TEXT:
- _skyText->getText(*data++);
- _skyText->displayText(_textBuf, true, INTRO_TEXT_WIDTH, 255);
- break;
- case IC_SHOW_TEXT:
- ((dataFileHeader*)_textBuf)->s_x = *data++;
- ((dataFileHeader*)_textBuf)->s_y = *data++;
- showTextBuf();
- break;
- case IC_REMOVE_TEXT:
- restoreScreen();
- break;
- case IC_MAKE_SOUND:
- _skySound->playSound(data[0], data[1], 0);
- data += 2;
- break;
- case IC_FX_VOLUME:
- _skySound->playSound(1, *data++, 0);
- break;
- default:
- error("Unknown FLIRT command %X\n", command);
+ case IC_PREPARE_TEXT:
+ _skyText->getText(*data++);
+ _skyText->displayText(_textBuf, true, INTRO_TEXT_WIDTH, 255);
+ break;
+ case IC_SHOW_TEXT:
+ ((dataFileHeader*)_textBuf)->s_x = *data++;
+ ((dataFileHeader*)_textBuf)->s_y = *data++;
+ showTextBuf();
+ break;
+ case IC_REMOVE_TEXT:
+ restoreScreen();
+ break;
+ case IC_MAKE_SOUND:
+ _skySound->playSound(data[0], data[1], 0);
+ data += 2;
+ break;
+ case IC_FX_VOLUME:
+ _skySound->playSound(1, *data++, 0);
+ break;
+ default:
+ error("Unknown FLIRT command %X\n", command);
}
}
if (!escDelay(50)) {
diff --git a/sky/music/adlibchannel.cpp b/sky/music/adlibchannel.cpp
index 98b7a9fb17..a5215ca2b5 100644
--- a/sky/music/adlibchannel.cpp
+++ b/sky/music/adlibchannel.cpp
@@ -138,30 +138,30 @@ uint8 SkyAdlibChannel::process(uint16 aktTime) {
// dummy opcode
} else if (opcode >= 0x90) {
switch (opcode&0xF) {
- case 0: com90_caseNoteOff(); break;
- case 1: com90_stopChannel(); break;
- case 2: com90_setupInstrument(); break;
- case 3:
- returnVal = com90_updateTempo();
- break;
- case 5: com90_getFreqOffset(); break;
- case 6: com90_getChannelVolume(); break;
- case 7: com90_getTremoVibro(); break;
- case 8: com90_rewindMusic(); break;
- case 9: com90_keyOff(); break;
- case 12: com90_setStartOfData(); break;
- case 4: //com90_dummy();
- case 10: //com90_error();
- case 11: //com90_doLodsb();
- case 13: //com90_do_two_Lodsb();
- error("SkyChannel: dummy music routine 0x%02X was called",opcode);
- _channelData.channelActive = 0;
- break;
- default:
- // these opcodes aren't implemented in original music driver
- error("SkyChannel: Not existant routine 0x%02X was called",opcode);
- _channelData.channelActive = 0;
- break;
+ case 0: com90_caseNoteOff(); break;
+ case 1: com90_stopChannel(); break;
+ case 2: com90_setupInstrument(); break;
+ case 3:
+ returnVal = com90_updateTempo();
+ break;
+ case 5: com90_getFreqOffset(); break;
+ case 6: com90_getChannelVolume(); break;
+ case 7: com90_getTremoVibro(); break;
+ case 8: com90_rewindMusic(); break;
+ case 9: com90_keyOff(); break;
+ case 12: com90_setStartOfData(); break;
+ case 4: //com90_dummy();
+ case 10: //com90_error();
+ case 11: //com90_doLodsb();
+ case 13: //com90_do_two_Lodsb();
+ error("SkyChannel: dummy music routine 0x%02X was called",opcode);
+ _channelData.channelActive = 0;
+ break;
+ default:
+ // these opcodes aren't implemented in original music driver
+ error("SkyChannel: Not existant routine 0x%02X was called",opcode);
+ _channelData.channelActive = 0;
+ break;
}
} else {
// new adlib channel assignment
diff --git a/sky/music/gmchannel.cpp b/sky/music/gmchannel.cpp
index ceb3ca24a0..744b15f383 100644
--- a/sky/music/gmchannel.cpp
+++ b/sky/music/gmchannel.cpp
@@ -93,30 +93,30 @@ uint8 SkyGmChannel::process(uint16 aktTime) {
// dummy opcode
} else if (opcode >= 0x90) {
switch (opcode&0xF) {
- case 0: com90_caseNoteOff(); break;
- case 1: com90_stopChannel(); break;
- case 2: com90_setupInstrument(); break;
- case 3:
- returnVal = com90_updateTempo();
- break;
- case 5: com90_getPitch(); break;
- case 6: com90_getChannelVolume(); break;
- case 8: com90_rewindMusic(); break;
- case 9: com90_keyOff(); break;
- case 11: com90_getChannelPanValue(); break;
- case 12: com90_setStartOfData(); break;
- case 13: com90_getChannelControl(); break;
- case 4: //com90_dummy();
- case 7: //com90_skipTremoVibro();
- case 10: //com90_error();
- error("SkyChannel: dummy music routine 0x%02X was called",opcode);
- _channelData.channelActive = 0;
- break;
- default:
- // these opcodes aren't implemented in original music driver
- error("SkyChannel: Not existant routine 0x%02X was called",opcode);
- _channelData.channelActive = 0;
- break;
+ case 0: com90_caseNoteOff(); break;
+ case 1: com90_stopChannel(); break;
+ case 2: com90_setupInstrument(); break;
+ case 3:
+ returnVal = com90_updateTempo();
+ break;
+ case 5: com90_getPitch(); break;
+ case 6: com90_getChannelVolume(); break;
+ case 8: com90_rewindMusic(); break;
+ case 9: com90_keyOff(); break;
+ case 11: com90_getChannelPanValue(); break;
+ case 12: com90_setStartOfData(); break;
+ case 13: com90_getChannelControl(); break;
+ case 4: //com90_dummy();
+ case 7: //com90_skipTremoVibro();
+ case 10: //com90_error();
+ error("SkyChannel: dummy music routine 0x%02X was called",opcode);
+ _channelData.channelActive = 0;
+ break;
+ default:
+ // these opcodes aren't implemented in original music driver
+ error("SkyChannel: Not existant routine 0x%02X was called",opcode);
+ _channelData.channelActive = 0;
+ break;
}
} else {
// new midi channel assignment
diff --git a/sky/music/musicbase.cpp b/sky/music/musicbase.cpp
index c0672d70b5..fecfff6dae 100644
--- a/sky/music/musicbase.cpp
+++ b/sky/music/musicbase.cpp
@@ -78,32 +78,32 @@ void SkyMusicBase::musicCommand(uint16 command)
return ;
}
switch(command >> 8) {
- case 0:
- debug(1,"SkyMusic: got call to startAdlibDriver(). Not necessary in this implementation.");
- break;
- case 1:
- debug(1,"SkyMusic: got call to stopDriver(). Not necessary in this implementation.");
- break;
- case 2:
- debug(1,"SkyMusic: got call to SetTempo(). Tempo is fixed in this implementation.");
- break;
- case 3:
- debug(1,"SkyMusic: ignored direct call to driverPoll().");
- break;
- case 4:
- startMusic(command&0xFF);
- break;
- case 6:
- reinitFM();
- break;
- case 7:
- stopMusic();
- break;
- case 13:
- setFMVolume(command&0xFF);
- break;
- default:
- debug(1,"musicCommand %d ignored.",command>>8);
+ case 0:
+ debug(1,"SkyMusic: got call to startAdlibDriver(). Not necessary in this implementation.");
+ break;
+ case 1:
+ debug(1,"SkyMusic: got call to stopDriver(). Not necessary in this implementation.");
+ break;
+ case 2:
+ debug(1,"SkyMusic: got call to SetTempo(). Tempo is fixed in this implementation.");
+ break;
+ case 3:
+ debug(1,"SkyMusic: ignored direct call to driverPoll().");
+ break;
+ case 4:
+ startMusic(command&0xFF);
+ break;
+ case 6:
+ reinitFM();
+ break;
+ case 7:
+ stopMusic();
+ break;
+ case 13:
+ setFMVolume(command&0xFF);
+ break;
+ default:
+ debug(1,"musicCommand %d ignored.",command>>8);
}
}
diff --git a/sky/sky.cpp b/sky/sky.cpp
index 84d21b495b..8709522b68 100644
--- a/sky/sky.cpp
+++ b/sky/sky.cpp
@@ -142,24 +142,24 @@ uint8 SkyState::_languageTable[11] = {
void SkyState::doCheat(uint8 num) {
switch(num) {
- case 1: warning("executed cheat: get jammer");
- SkyLogic::_scriptVariables[258] = 42; // got_jammer
- SkyLogic::_scriptVariables[240] = 69; // got_sponsor
- break;
- case 2: warning("executed cheat: computer room");
- SkyLogic::_scriptVariables[479] = 2; // card_status
- SkyLogic::_scriptVariables[480] = 1; // card_fix
- break;
- case 3: warning("executed cheat: get to burke");
- SkyLogic::_scriptVariables[190] = 42; // knows_port
- break;
- case 4: warning("executed cheat: get to reactor section");
- SkyLogic::_scriptVariables[451] = 42; // foreman_friend
- _skyLogic->fnSendSync(8484, 1, 0); // send sync to RAD suit (put in locker)
- _skyLogic->fnKillId(ID_ANITA_SPY, 0, 0); // stop anita from getting to you
- break;
- default: warning("unknown cheat: %d", num);
- break;
+ case 1: warning("executed cheat: get jammer");
+ SkyLogic::_scriptVariables[258] = 42; // got_jammer
+ SkyLogic::_scriptVariables[240] = 69; // got_sponsor
+ break;
+ case 2: warning("executed cheat: computer room");
+ SkyLogic::_scriptVariables[479] = 2; // card_status
+ SkyLogic::_scriptVariables[480] = 1; // card_fix
+ break;
+ case 3: warning("executed cheat: get to burke");
+ SkyLogic::_scriptVariables[190] = 42; // knows_port
+ break;
+ case 4: warning("executed cheat: get to reactor section");
+ SkyLogic::_scriptVariables[451] = 42; // foreman_friend
+ _skyLogic->fnSendSync(8484, 1, 0); // send sync to RAD suit (put in locker)
+ _skyLogic->fnKillId(ID_ANITA_SPY, 0, 0); // stop anita from getting to you
+ break;
+ default: warning("unknown cheat: %d", num);
+ break;
}
}
@@ -417,51 +417,46 @@ void SkyState::delay(uint amount) { //copied and mutilated from Simon.cpp
do {
while (_system->poll_event(&event)) {
switch (event.event_code) {
- case OSystem::EVENT_KEYDOWN:
- if (event.kbd.flags == OSystem::KBD_CTRL) {
- if (event.kbd.keycode == 'f') {
- _fastMode ^= 1;
- break;
- }
- if (event.kbd.keycode == 'g') {
- _fastMode ^= 2;
- break;
- }
+ case OSystem::EVENT_KEYDOWN:
+ if (event.kbd.flags == OSystem::KBD_CTRL) {
+ if (event.kbd.keycode == 'f') {
+ _fastMode ^= 1;
+ break;
}
-
- // Make sure backspace works right (this fixes a small issue on OS X)
- if (event.kbd.keycode == 8)
- _key_pressed = 8;
- else
- _key_pressed = (byte)event.kbd.ascii;
- break;
-
- case OSystem::EVENT_MOUSEMOVE:
- if (!(_systemVars.systemFlags & SF_MOUSE_LOCKED)) {
- _sdl_mouse_x = event.mouse.x;
- _sdl_mouse_y = event.mouse.y;
+ if (event.kbd.keycode == 'g') {
+ _fastMode ^= 2;
+ break;
}
- break;
+ }
- case OSystem::EVENT_LBUTTONDOWN:
- _skyMouse->buttonPressed(2);
-#ifdef _WIN32_WCE
+ // Make sure backspace works right (this fixes a small issue on OS X)
+ if (event.kbd.keycode == 8)
+ _key_pressed = 8;
+ else
+ _key_pressed = (byte)event.kbd.ascii;
+ break;
+ case OSystem::EVENT_MOUSEMOVE:
+ if (!(_systemVars.systemFlags & SF_MOUSE_LOCKED)) {
_sdl_mouse_x = event.mouse.x;
_sdl_mouse_y = event.mouse.y;
+ }
+ break;
+ case OSystem::EVENT_LBUTTONDOWN:
+ _skyMouse->buttonPressed(2);
+#ifdef _WIN32_WCE
+ _sdl_mouse_x = event.mouse.x;
+ _sdl_mouse_y = event.mouse.y;
#endif
- break;
-
- case OSystem::EVENT_RBUTTONDOWN:
- _skyMouse->buttonPressed(1);
- break;
-
- case OSystem::EVENT_QUIT:
- if (!SkyState::_systemVars.quitting)
- _skyControl->showGameQuitMsg(); // will call _system->quit()
- break;
-
- default:
- break;
+ break;
+ case OSystem::EVENT_RBUTTONDOWN:
+ _skyMouse->buttonPressed(1);
+ break;
+ case OSystem::EVENT_QUIT:
+ if (!SkyState::_systemVars.quitting)
+ _skyControl->showGameQuitMsg(); // will call _system->quit()
+ break;
+ default:
+ break;
}
}
diff --git a/sky/text.cpp b/sky/text.cpp
index 12d7cc7aab..f308b5c198 100644
--- a/sky/text.cpp
+++ b/sky/text.cpp
@@ -222,17 +222,17 @@ void SkyText::fnSetFont(uint32 fontNr) {
struct charSet *newCharSet;
switch (fontNr) {
- case 0:
- newCharSet = &_mainCharacterSet;
- break;
- case 1:
- newCharSet = &_controlCharacterSet;
- break;
- case 2:
- newCharSet = &_linkCharacterSet;
- break;
- default:
- error("Tried to set invalid font (%d)", fontNr);
+ case 0:
+ newCharSet = &_mainCharacterSet;
+ break;
+ case 1:
+ newCharSet = &_controlCharacterSet;
+ break;
+ case 2:
+ newCharSet = &_linkCharacterSet;
+ break;
+ default:
+ error("Tried to set invalid font (%d)", fontNr);
}
_curCharSet = fontNr;