aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backends/platform/sdl/events.cpp4
-rw-r--r--backends/platform/sdl/graphics.cpp8
-rw-r--r--common/debugger.cpp4
-rw-r--r--engines/kyra/gui.cpp2
-rw-r--r--engines/kyra/scene.cpp2
-rw-r--r--engines/kyra/staticres.cpp4
-rw-r--r--engines/kyra/text.cpp2
-rw-r--r--engines/saga/animation.cpp2
-rw-r--r--engines/saga/events.cpp8
-rw-r--r--engines/saga/game.cpp2
-rw-r--r--engines/saga/gfx.cpp4
-rw-r--r--engines/saga/interface.cpp2
-rw-r--r--engines/saga/puzzle.cpp2
-rw-r--r--engines/saga/rscfile.cpp6
-rw-r--r--engines/scumm/he/script_v100he.cpp6
-rw-r--r--engines/scumm/he/script_v60he.cpp2
-rw-r--r--engines/scumm/he/script_v72he.cpp4
-rw-r--r--engines/scumm/he/script_v90he.cpp6
-rw-r--r--engines/scumm/he/sound_he.cpp4
-rw-r--r--engines/scumm/he/sprite_he.cpp6
-rw-r--r--engines/scumm/he/wiz_he.cpp2
-rw-r--r--engines/scumm/imuse_digi/dimuse_music.cpp4
-rw-r--r--engines/scumm/imuse_digi/dimuse_sndmgr.cpp6
-rw-r--r--engines/scumm/input.cpp2
-rw-r--r--engines/scumm/insane/insane_ben.cpp2
-rw-r--r--engines/scumm/insane/insane_enemy.cpp8
-rw-r--r--engines/scumm/insane/insane_scenes.cpp2
-rw-r--r--engines/scumm/plugin.cpp2
-rw-r--r--engines/scumm/smush/chunk.cpp2
-rw-r--r--engines/scumm/smush/codec37.cpp2
-rw-r--r--engines/scumm/smush/codec47.cpp2
-rw-r--r--engines/scumm/smush/imuse_channel.cpp4
-rw-r--r--engines/scumm/smush/saud_channel.cpp2
-rw-r--r--engines/scumm/smush/smush_player.cpp4
-rw-r--r--engines/simon/charset.cpp2
-rw-r--r--engines/simon/draw.cpp2
-rw-r--r--engines/simon/oracle.cpp8
-rw-r--r--engines/simon/verb.cpp4
-rw-r--r--engines/sky/control.cpp2
-rw-r--r--engines/sky/intro.cpp2
-rw-r--r--graphics/ilbm.cpp4
-rw-r--r--gui/KeysDialog.cpp14
-rw-r--r--gui/eval.cpp4
-rw-r--r--gui/launcher.cpp2
-rw-r--r--gui/newgui.cpp12
-rw-r--r--sound/mididrv.cpp2
-rw-r--r--sound/voc.cpp2
47 files changed, 92 insertions, 92 deletions
diff --git a/backends/platform/sdl/events.cpp b/backends/platform/sdl/events.cpp
index 4fa02907db..72afad36df 100644
--- a/backends/platform/sdl/events.cpp
+++ b/backends/platform/sdl/events.cpp
@@ -183,8 +183,8 @@ bool OSystem_SDL::pollEvent(Event &event) {
return true;
}
- while(SDL_PollEvent(&ev)) {
- switch(ev.type) {
+ while (SDL_PollEvent(&ev)) {
+ switch (ev.type) {
case SDL_KEYDOWN:{
b = event.kbd.flags = SDLModToOSystemKeyFlags(SDL_GetModState());
diff --git a/backends/platform/sdl/graphics.cpp b/backends/platform/sdl/graphics.cpp
index eb560c5769..e78f94b4ef 100644
--- a/backends/platform/sdl/graphics.cpp
+++ b/backends/platform/sdl/graphics.cpp
@@ -944,8 +944,8 @@ void OSystem_SDL::makeChecksums(const byte *buf) {
/* the 8x8 blocks in buf are enumerated starting in the top left corner and
* reading each line at a time from left to right */
- for(y = 0; y != last_y; y++, buf += _screenWidth * (8 - 1))
- for(x = 0; x != last_x; x++, buf += 8) {
+ for (y = 0; y != last_y; y++, buf += _screenWidth * (8 - 1))
+ for (x = 0; x != last_x; x++, buf += 8) {
// Adler32 checksum algorithm (from RFC1950, used by gzip and zlib).
// This computes the Adler32 checksum of a 8x8 pixel block. Note
// that we can do the modulo operation (which is the slowest part)
@@ -990,8 +990,8 @@ void OSystem_SDL::addDirtyRgnAuto(const byte *buf) {
int x, y, w;
uint32 *ck = _dirtyChecksums;
- for(y = 0; y != _screenHeight / 8; y++) {
- for(x = 0; x != _screenWidth / 8; x++, ck++) {
+ for (y = 0; y != _screenHeight / 8; y++) {
+ for (x = 0; x != _screenWidth / 8; x++, ck++) {
if (ck[0] != ck[_cksumNum]) {
/* found a dirty 8x8 block, now go as far to the right as possible,
and at the same time, unmark the dirty status by setting old to new. */
diff --git a/common/debugger.cpp b/common/debugger.cpp
index 0771e65720..e0ad40eea9 100644
--- a/common/debugger.cpp
+++ b/common/debugger.cpp
@@ -193,7 +193,7 @@ bool Debugger<T>::RunCommand(const char *inputOrig) {
if (!strncmp(_dvars[i].name, param[0], strlen(_dvars[i].name))) {
if (num_params > 1) {
// Alright, we need to check the TYPE of the variable to deref and stuff... the array stuff is a bit ugly :)
- switch(_dvars[i].type) {
+ switch (_dvars[i].type) {
// Integer
case DVAR_BYTE:
*(byte *)_dvars[i].variable = atoi(param[1]);
@@ -226,7 +226,7 @@ bool Debugger<T>::RunCommand(const char *inputOrig) {
}
} else {
// And again, type-dependent prints/defrefs. The array one is still ugly.
- switch(_dvars[i].type) {
+ switch (_dvars[i].type) {
// Integer
case DVAR_BYTE:
DebugPrintf("(byte)%s = %d\n", param[0], *(const byte *)_dvars[i].variable);
diff --git a/engines/kyra/gui.cpp b/engines/kyra/gui.cpp
index bb7e1d0b8a..f59f1811a1 100644
--- a/engines/kyra/gui.cpp
+++ b/engines/kyra/gui.cpp
@@ -1458,7 +1458,7 @@ void KyraEngine::gui_fadePalette() {
_screen->_currentPalette[i] /= 2;
}
- while( menuPalIndexes[index] != -1) {
+ while (menuPalIndexes[index] != -1) {
memcpy(&_screen->_currentPalette[menuPalIndexes[index]*3], &_screen->getPalette(2)[menuPalIndexes[index]*3], 3);
index++;
}
diff --git a/engines/kyra/scene.cpp b/engines/kyra/scene.cpp
index f77091658d..f015c12373 100644
--- a/engines/kyra/scene.cpp
+++ b/engines/kyra/scene.cpp
@@ -883,7 +883,7 @@ int KyraEngine::handleSceneChange(int xpos, int ypos, int unk1, int frameReset)
ypos = _sceneExits.westYPos;
_pathfinderFlag = 7;
}
- } else if(xpos >= 308) {
+ } else if (xpos >= 308) {
if (_roomTable[sceneId].eastExit != 0xFFFF) {
xpos = 307;
ypos = _sceneExits.eastYPos;
diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp
index 3485243459..724d318299 100644
--- a/engines/kyra/staticres.cpp
+++ b/engines/kyra/staticres.cpp
@@ -759,9 +759,9 @@ void KyraEngine::loadMainScreen(int page) {
_screen->loadBitmap("MAIN15.CPS", page, page, 0);
else if ((_features & GF_ENGLISH) && (_features & GF_TALKIE))
_screen->loadBitmap("MAIN_ENG.CPS", page, page, 0);
- else if(_features & GF_FRENCH)
+ else if (_features & GF_FRENCH)
_screen->loadBitmap("MAIN_FRE.CPS", page, page, 0);
- else if(_features & GF_GERMAN)
+ else if (_features & GF_GERMAN)
_screen->loadBitmap("MAIN_GER.CPS", page, page, 0);
else if (_features & GF_SPANISH)
_screen->loadBitmap("MAIN_SPA.CPS", page, page, 0);
diff --git a/engines/kyra/text.cpp b/engines/kyra/text.cpp
index 3c2f290645..edc46d3eb7 100644
--- a/engines/kyra/text.cpp
+++ b/engines/kyra/text.cpp
@@ -39,7 +39,7 @@ void KyraEngine::waitForChatToFinish(int16 chatDuration, const char *chatStr, ui
uint8 currPage;
OSystem::Event event;
- //while( towns_isEscKeyPressed() )
+ //while (towns_isEscKeyPressed() )
//towns_getKey();
uint32 timeToEnd = strlen(chatStr) * 8 * _tickLength + _system->getMillis();
diff --git a/engines/saga/animation.cpp b/engines/saga/animation.cpp
index 3a4102f5d6..0b939e1bfb 100644
--- a/engines/saga/animation.cpp
+++ b/engines/saga/animation.cpp
@@ -241,7 +241,7 @@ void Anim::load(uint16 animId, const byte *animResourceData, size_t animResource
char *buf=(char*)anim->resourceData;
FILE*f;
f=fopen(s,"wb");
- for(long i=0;i<flen;i++)
+ for (long i = 0; i < flen; i++)
fputc(buf[i],f);
fclose(f);*/
diff --git a/engines/saga/events.cpp b/engines/saga/events.cpp
index bc3ac68fec..b3e2230c5b 100644
--- a/engines/saga/events.cpp
+++ b/engines/saga/events.cpp
@@ -125,8 +125,8 @@ int Events::handleContinuous(Event *event) {
Surface *backGroundSurface;
BGInfo bgInfo;
Rect rect;
- if(event->duration != 0) {
- event_pc = ((double)event->duration - event->time) / event->duration;
+ if (event->duration != 0) {
+ event_pc = ((double)event->duration - event->time) / event->duration;
} else {
event_pc = 1.0;
}
@@ -207,8 +207,8 @@ int Events::handleImmediate(Event *event) {
bool event_done = false;
// Duration might be 0 so dont do division then
- if(event->duration != 0) {
- event_pc = ((double)event->duration - event->time) / event->duration;
+ if (event->duration != 0) {
+ event_pc = ((double)event->duration - event->time) / event->duration;
} else {
// Just make sure that event_pc is 1.0 so event_done is true
event_pc = 1.0;
diff --git a/engines/saga/game.cpp b/engines/saga/game.cpp
index 57ff94e575..4ce00761c7 100644
--- a/engines/saga/game.cpp
+++ b/engines/saga/game.cpp
@@ -145,7 +145,7 @@ static int detectGame(const FSList *fslist, Common::Language language, Common::P
tstr = file->_key;
tstr.toLowercase();
- if(!filesMD5.contains(tstr)) {
+ if (!filesMD5.contains(tstr)) {
if (testFile.open(file->_key)) {
testFile.close();
diff --git a/engines/saga/gfx.cpp b/engines/saga/gfx.cpp
index 12b951d485..bb85bd9b5f 100644
--- a/engines/saga/gfx.cpp
+++ b/engines/saga/gfx.cpp
@@ -168,7 +168,7 @@ void Surface::transitionDissolve(const byte *sourceBuffer, const Common::Rect &s
}
void Gfx::initPalette() {
- if(_vm->getGameType() != GType_IHNM)
+ if (_vm->getGameType() != GType_IHNM)
return;
ResourceContext *resourceContext = _vm->_resource->getContext(GAME_RESOURCEFILE);
@@ -184,7 +184,7 @@ void Gfx::initPalette() {
MemoryReadStream metaS(resourcePointer, resourceLength);
- for(int i = 0; i < 256; i++) {
+ for (int i = 0; i < 256; i++) {
_globalPalette[i].red = metaS.readByte();
_globalPalette[i].green = metaS.readByte();
_globalPalette[i].blue = metaS.readByte();
diff --git a/engines/saga/interface.cpp b/engines/saga/interface.cpp
index 0a4a58e871..e0d905a015 100644
--- a/engines/saga/interface.cpp
+++ b/engines/saga/interface.cpp
@@ -1905,7 +1905,7 @@ void Interface::drawPanelButtonText(Surface *ds, InterfacePanel *panel, PanelBut
Rect rect;
textId = panelButton->id;
- switch(panelButton->id) {
+ switch (panelButton->id) {
case kTextReadingSpeed:
if (_vm->getFeatures() & GF_CD_FX) {
if (_vm->_subtitlesEnabled)
diff --git a/engines/saga/puzzle.cpp b/engines/saga/puzzle.cpp
index f2d923bead..54ebf0bc3f 100644
--- a/engines/saga/puzzle.cpp
+++ b/engines/saga/puzzle.cpp
@@ -471,7 +471,7 @@ void Puzzle::solicitHint(void) {
}
void Puzzle::handleReply(int reply) {
- switch(reply) {
+ switch (reply) {
case 0: // Quit the puzzle
exitPuzzle();
break;
diff --git a/engines/saga/rscfile.cpp b/engines/saga/rscfile.cpp
index 8b2a5d7e7f..040bafdbbe 100644
--- a/engines/saga/rscfile.cpp
+++ b/engines/saga/rscfile.cpp
@@ -377,11 +377,11 @@ void Resource::clearContexts() {
if (_contexts == NULL) {
return;
}
- for(i = 0; i < _contextsCount; i++) {
+ for (i = 0; i < _contextsCount; i++) {
context = &_contexts[i];
delete context->file;
if (context->table != NULL) {
- for(j = 0; j < context->count; j++) {
+ for (j = 0; j < context->count; j++) {
delete context->table[j].patchData;
}
}
@@ -398,7 +398,7 @@ uint32 Resource::convertResourceId(uint32 resourceId) {
return resourceId - 2;
} else {
if (resourceId == 1535 || resourceId == 1536) {
- error ("Wrong resource number %d for Mac ITE", resourceId);
+ error("Wrong resource number %d for Mac ITE", resourceId);
}
}
}
diff --git a/engines/scumm/he/script_v100he.cpp b/engines/scumm/he/script_v100he.cpp
index e824bff129..d20a0487a6 100644
--- a/engines/scumm/he/script_v100he.cpp
+++ b/engines/scumm/he/script_v100he.cpp
@@ -1968,7 +1968,7 @@ void ScummEngine_v100he::o100_setSpriteInfo() {
spriteId++;
for (; spriteId <= _curMaxSpriteId; spriteId++)
- switch(args[1]) {
+ switch (args[1]) {
case 0:
_sprite->setSpriteFlagXFlipped(spriteId, args[0]);
break;
@@ -2434,7 +2434,7 @@ void ScummEngine_v100he::o100_getSpriteGroupInfo() {
type = pop();
spriteGroupId = pop();
if (spriteGroupId) {
- switch(type) {
+ switch (type) {
case 0:
push(_sprite->getGroupXMul(spriteGroupId));
break;
@@ -2775,7 +2775,7 @@ void ScummEngine_v100he::o100_getSpriteInfo() {
flags = pop();
spriteId = pop();
if (spriteId) {
- switch(flags) {
+ switch (flags) {
case 0:
push(_sprite->getSpriteFlagXFlipped(spriteId));
break;
diff --git a/engines/scumm/he/script_v60he.cpp b/engines/scumm/he/script_v60he.cpp
index 24efa9eabc..7c6cd10711 100644
--- a/engines/scumm/he/script_v60he.cpp
+++ b/engines/scumm/he/script_v60he.cpp
@@ -999,7 +999,7 @@ void ScummEngine_v60he::o60_openFile() {
}
if (slot != -1) {
- switch(mode) {
+ switch (mode) {
case 1:
// TODO / FIXME: Consider using listSavefiles to avoid unneccessary openForLoading calls
_hInFileTable[slot] = _saveFileMan->openForLoading(filename);
diff --git a/engines/scumm/he/script_v72he.cpp b/engines/scumm/he/script_v72he.cpp
index a502df6929..cbd68a20e9 100644
--- a/engines/scumm/he/script_v72he.cpp
+++ b/engines/scumm/he/script_v72he.cpp
@@ -594,7 +594,7 @@ void ScummEngine_v72he::decodeScriptString(byte *dst, bool scriptString) {
chr = string[num++];
if (chr == '%') {
chr = string[num++];
- switch(chr) {
+ switch (chr) {
case 'b':
//dst += sprintf((char *)dst, "%b", args[val++]);
break;
@@ -1738,7 +1738,7 @@ void ScummEngine_v72he::o72_openFile() {
}
if (slot != -1) {
- switch(mode) {
+ switch (mode) {
case 1:
// TODO / FIXME: Consider using listSavefiles to avoid unneccessary openForLoading calls
_hInFileTable[slot] = _saveFileMan->openForLoading(filename);
diff --git a/engines/scumm/he/script_v90he.cpp b/engines/scumm/he/script_v90he.cpp
index a7c40c590f..7032a1fc97 100644
--- a/engines/scumm/he/script_v90he.cpp
+++ b/engines/scumm/he/script_v90he.cpp
@@ -952,7 +952,7 @@ void ScummEngine_v90he::o90_getSpriteInfo() {
flags = pop();
spriteId = pop();
if (spriteId) {
- switch(flags) {
+ switch (flags) {
case 0:
push(_sprite->getSpriteFlagXFlipped(spriteId));
break;
@@ -1167,7 +1167,7 @@ void ScummEngine_v90he::o90_setSpriteInfo() {
spriteId++;
for (; spriteId <= _curMaxSpriteId; spriteId++)
- switch(args[1]) {
+ switch (args[1]) {
case 0:
_sprite->setSpriteFlagXFlipped(spriteId, args[0]);
break;
@@ -1479,7 +1479,7 @@ void ScummEngine_v90he::o90_getSpriteGroupInfo() {
type = pop();
spriteGroupId = pop();
if (spriteGroupId) {
- switch(type) {
+ switch (type) {
case 0:
push(_sprite->getGroupXMul(spriteGroupId));
break;
diff --git a/engines/scumm/he/sound_he.cpp b/engines/scumm/he/sound_he.cpp
index 1a2dd25e86..f7dc7989a2 100644
--- a/engines/scumm/he/sound_he.cpp
+++ b/engines/scumm/he/sound_he.cpp
@@ -369,7 +369,7 @@ void SoundHE::processSoundCode() {
assert(codePtr);
codePtr += _heChannel[chan].codeOffs;
- while(1) {
+ while (1) {
size = READ_LE_UINT16(codePtr);
time = READ_LE_UINT32(codePtr + 2);
@@ -414,7 +414,7 @@ void SoundHE::processSoundCode() {
void SoundHE::processSoundOpcodes(int sound, byte *codePtr, int *soundVars) {
int arg, opcode, var, val;
- while(READ_LE_UINT16(codePtr) != 0) {
+ while (READ_LE_UINT16(codePtr) != 0) {
codePtr += 2;
opcode = READ_LE_UINT16(codePtr); codePtr += 2;
opcode = (opcode & 0xFFF) >> 4;
diff --git a/engines/scumm/he/sprite_he.cpp b/engines/scumm/he/sprite_he.cpp
index 6983dc147a..5b0fb0f7fa 100644
--- a/engines/scumm/he/sprite_he.cpp
+++ b/engines/scumm/he/sprite_he.cpp
@@ -370,7 +370,7 @@ int Sprite::getSpriteGeneralProperty(int spriteId, int type) {
// XXX U32 related check
- switch(type) {
+ switch (type) {
case 0x7B:
return _spriteTable[spriteId].imgFlags;
case 0x7D:
@@ -677,7 +677,7 @@ void Sprite::setSpriteFlagAutoAnim(int spriteId, int value) {
void Sprite::setSpriteFlagUpdateType(int spriteId, int value) {
checkRange(_varNumSprites, 1, spriteId, "Invalid sprite %d");
- switch(value) {
+ switch (value) {
case 2:
_spriteTable[spriteId].flags &= ~(kSFMarkDirty);
_spriteTable[spriteId].flags |= kSFBlitDirectly;
@@ -740,7 +740,7 @@ void Sprite::setSpriteGeneralProperty(int spriteId, int type, int value) {
// XXX U32 related check
- switch(type) {
+ switch (type) {
case 0x7B:
_spriteTable[spriteId].imgFlags = value;
_spriteTable[spriteId].flags |= kSFChanged | kSFNeedRedraw;
diff --git a/engines/scumm/he/wiz_he.cpp b/engines/scumm/he/wiz_he.cpp
index 4636090d42..74414fc2cc 100644
--- a/engines/scumm/he/wiz_he.cpp
+++ b/engines/scumm/he/wiz_he.cpp
@@ -1917,7 +1917,7 @@ void Wiz::processWizImage(const WizParameters *params) {
if (params->processFlags & kWPFUseFile) {
Common::File f;
- switch(params->fileWriteMode) {
+ switch (params->fileWriteMode) {
case 2:
_vm->VAR(119) = -1;
break;
diff --git a/engines/scumm/imuse_digi/dimuse_music.cpp b/engines/scumm/imuse_digi/dimuse_music.cpp
index 4c7b30c701..d9a922cc80 100644
--- a/engines/scumm/imuse_digi/dimuse_music.cpp
+++ b/engines/scumm/imuse_digi/dimuse_music.cpp
@@ -171,7 +171,7 @@ void IMuseDigital::playDigMusic(const char *songName, const imuseDigTable *table
fadeOutMusic(120);
- switch(table->opcode) {
+ switch (table->opcode) {
case 0:
case 5:
case 6:
@@ -425,7 +425,7 @@ int IMuseDigital::getSoundIdByName(const char *soundName) {
void IMuseDigital::playFtMusic(const char *songName, int opcode, int volume) {
fadeOutMusic(200);
- switch(opcode) {
+ switch (opcode) {
case 0:
case 4:
break;
diff --git a/engines/scumm/imuse_digi/dimuse_sndmgr.cpp b/engines/scumm/imuse_digi/dimuse_sndmgr.cpp
index 19d34eabc9..65e003d0ec 100644
--- a/engines/scumm/imuse_digi/dimuse_sndmgr.cpp
+++ b/engines/scumm/imuse_digi/dimuse_sndmgr.cpp
@@ -60,7 +60,7 @@ void ImuseDigiSndMgr::countElements(byte *ptr, int &numRegions, int &numJumps, i
do {
tag = READ_BE_UINT32(ptr); ptr += 4;
- switch(tag) {
+ switch (tag) {
case MKID_BE('TEXT'):
case MKID_BE('STOP'):
case MKID_BE('FRMT'):
@@ -154,7 +154,7 @@ void ImuseDigiSndMgr::prepareSound(byte *ptr, soundStruct *sound) {
}
offset += 4;
len >>= 8;
- switch(code) {
+ switch (code) {
case 0:
quit = true;
break;
@@ -211,7 +211,7 @@ void ImuseDigiSndMgr::prepareSound(byte *ptr, soundStruct *sound) {
do {
tag = READ_BE_UINT32(ptr); ptr += 4;
- switch(tag) {
+ switch (tag) {
case MKID_BE('FRMT'):
ptr += 12;
sound->bits = READ_BE_UINT32(ptr); ptr += 4;
diff --git a/engines/scumm/input.cpp b/engines/scumm/input.cpp
index 7dfe6fa782..e078d56c22 100644
--- a/engines/scumm/input.cpp
+++ b/engines/scumm/input.cpp
@@ -331,7 +331,7 @@ void ScummEngine::processKbd(bool smushMode) {
if (_voiceMode == 3)
_voiceMode = 0;
- switch(_voiceMode) {
+ switch (_voiceMode) {
case 0:
sprintf(buf, "Speech Only");
ConfMan.setBool("speech_mute", false);
diff --git a/engines/scumm/insane/insane_ben.cpp b/engines/scumm/insane/insane_ben.cpp
index 64566fe628..35ad7004a3 100644
--- a/engines/scumm/insane/insane_ben.cpp
+++ b/engines/scumm/insane/insane_ben.cpp
@@ -501,7 +501,7 @@ int32 Insane::calcBenDamage(bool arg_0, bool arg_4) {
void Insane::actor02Reaction(int32 buttons) {
int32 tmp, tmp2;
- switch(_actor[0].act[2].state) {
+ switch (_actor[0].act[2].state) {
case 1:
smlayer_setActorLayer(0, 2, 5);
_actor[0].weaponClass = 2;
diff --git a/engines/scumm/insane/insane_enemy.cpp b/engines/scumm/insane/insane_enemy.cpp
index 1c3830154b..ec38aa9fe8 100644
--- a/engines/scumm/insane/insane_enemy.cpp
+++ b/engines/scumm/insane/insane_enemy.cpp
@@ -178,7 +178,7 @@ int32 Insane::enemy0handler(int32 actor1, int32 actor2, int32 probability) {
break;
}
} else {
- switch(_vm->_rnd.getRandomNumber(14)) {
+ switch (_vm->_rnd.getRandomNumber(14)) {
case 2:
if (!_enemyState[EN_ROTT1][2]) {
_enemyState[EN_ROTT1][2] = 1;
@@ -342,7 +342,7 @@ int32 Insane::enemy1handler(int32 actor1, int32 actor2, int32 probability) {
break;
}
} else {
- switch(_vm->_rnd.getRandomNumber(14)) {
+ switch (_vm->_rnd.getRandomNumber(14)) {
case 2:
if (!_enemyState[EN_ROTT2][2]) {
_enemyState[EN_ROTT2][2] = 1;
@@ -1353,7 +1353,7 @@ void Insane::actor11Reaction(int32 buttons) {
chooseEnemyWeaponAnim(buttons);
- switch(_actor[1].tilt) {
+ switch (_actor[1].tilt) {
case -3:
if (_actor[1].act[1].state != 41 || _actor[1].weaponClass != _actor[1].animWeaponClass) {
setEnemyAnimation(1, 6);
@@ -1617,7 +1617,7 @@ void Insane::setEnemyState(void) {
void Insane::actor12Reaction(int32 buttons) {
int32 tmp, tmp2;
- switch(_actor[1].act[2].state) {
+ switch (_actor[1].act[2].state) {
case 1:
smlayer_setActorLayer(1, 2, 5);
_actor[1].weaponClass = 2;
diff --git a/engines/scumm/insane/insane_scenes.cpp b/engines/scumm/insane/insane_scenes.cpp
index 343299425f..52a54edee8 100644
--- a/engines/scumm/insane/insane_scenes.cpp
+++ b/engines/scumm/insane/insane_scenes.cpp
@@ -344,7 +344,7 @@ int Insane::loadSceneData(int scene, int flag, int phase) {
break;
case 3:
case 13:
- switch(_currEnemy) {
+ switch (_currEnemy) {
case EN_TORQUE:
smlayer_loadSound(59, flag, phase);
smlayer_loadSound(93, flag, phase);
diff --git a/engines/scumm/plugin.cpp b/engines/scumm/plugin.cpp
index d1e8c3d912..ffb19d7650 100644
--- a/engines/scumm/plugin.cpp
+++ b/engines/scumm/plugin.cpp
@@ -824,7 +824,7 @@ Common::String ScummEngine::generateFilename(const int room) const {
if (_heV7DiskOffsets)
disk = _heV7DiskOffsets[room];
- switch(disk) {
+ switch (disk) {
case 2:
id = 'b';
snprintf(buf, sizeof(buf), "%s.(b)", _filenamePattern.pattern);
diff --git a/engines/scumm/smush/chunk.cpp b/engines/scumm/smush/chunk.cpp
index 7f409bce20..2d457e0d85 100644
--- a/engines/scumm/smush/chunk.cpp
+++ b/engines/scumm/smush/chunk.cpp
@@ -65,7 +65,7 @@ uint32 BaseChunk::getSize() const {
}
bool BaseChunk::seek(int32 delta, seek_type dir) {
- switch(dir) {
+ switch (dir) {
case seek_cur:
_curPos += delta;
break;
diff --git a/engines/scumm/smush/codec37.cpp b/engines/scumm/smush/codec37.cpp
index ba323c03f2..0078237c30 100644
--- a/engines/scumm/smush/codec37.cpp
+++ b/engines/scumm/smush/codec37.cpp
@@ -519,7 +519,7 @@ void Codec37Decoder::decode(byte *dst, const byte *src) {
maketable(pitch, src[1]);
int32 tmp;
- switch(src[0]) {
+ switch (src[0]) {
case 0:
if ((_deltaBufs[_curtable] - _deltaBuf) > 0) {
memset(_deltaBuf, 0, _deltaBufs[_curtable] - _deltaBuf);
diff --git a/engines/scumm/smush/codec47.cpp b/engines/scumm/smush/codec47.cpp
index 5e44492a8e..e7cb767c46 100644
--- a/engines/scumm/smush/codec47.cpp
+++ b/engines/scumm/smush/codec47.cpp
@@ -573,7 +573,7 @@ bool Codec47Decoder::decode(byte *dst, const byte *src) {
gfx_data += 32896;
}
- switch(src[2]) {
+ switch (src[2]) {
case 0:
memcpy(_curBuf, gfx_data, _frameSize);
break;
diff --git a/engines/scumm/smush/imuse_channel.cpp b/engines/scumm/smush/imuse_channel.cpp
index 76a10a9e9e..9afbfe8d47 100644
--- a/engines/scumm/smush/imuse_channel.cpp
+++ b/engines/scumm/smush/imuse_channel.cpp
@@ -140,7 +140,7 @@ bool ImuseChannel::handleStop(Chunk &src) {
bool ImuseChannel::handleMap(Chunk &map) {
while (!map.eof()) {
Chunk *sub = map.subBlock();
- switch(sub->getType()) {
+ switch (sub->getType()) {
case TYPE_FRMT:
handleFormat(*sub);
break;
@@ -213,7 +213,7 @@ bool ImuseChannel::handleSubTags(int32 &offset) {
Chunk::type type = READ_BE_UINT32(_tbuffer + offset);
uint32 size = READ_BE_UINT32(_tbuffer + offset + 4);
uint32 available_size = _tbufferSize - offset;
- switch(type) {
+ switch (type) {
case TYPE_MAP_:
_inData = false;
if (available_size >= (size + 8)) {
diff --git a/engines/scumm/smush/saud_channel.cpp b/engines/scumm/smush/saud_channel.cpp
index 9969ac4bc9..662da3ee76 100644
--- a/engines/scumm/smush/saud_channel.cpp
+++ b/engines/scumm/smush/saud_channel.cpp
@@ -52,7 +52,7 @@ bool SaudChannel::handleSubTags(int32 &offset) {
uint32 size = READ_BE_UINT32(_tbuffer + offset + 4);
uint32 available_size = _tbufferSize - offset;
- switch(type) {
+ switch (type) {
case TYPE_STRK:
_inData = false;
if (available_size >= (size + 8)) {
diff --git a/engines/scumm/smush/smush_player.cpp b/engines/scumm/smush/smush_player.cpp
index ba51b472da..8b22e42867 100644
--- a/engines/scumm/smush/smush_player.cpp
+++ b/engines/scumm/smush/smush_player.cpp
@@ -227,7 +227,7 @@ void SmushPlayer::timerCallback(void *refCon) {
((SmushPlayer *)refCon)->_inTimerCount++;
#endif
#ifdef __SYMBIAN32__
- if(((SmushPlayer *)refCon)->_closeOnTextTick) {
+ if (((SmushPlayer *)refCon)->_closeOnTextTick) {
delete ((SmushPlayer *)refCon)->_base;
((SmushPlayer *)refCon)->_base = NULL;
((SmushPlayer *)refCon)->_closeOnTextTick = false;
@@ -313,7 +313,7 @@ void SmushPlayer::release() {
#ifdef __SYMBIAN32__
_closeOnTextTick = true;
// Wait for _closeOnTextTick to be set to false to indicate file closure
- while(_closeOnTextTick) {
+ while (_closeOnTextTick) {
User::After(15624);
}
#endif
diff --git a/engines/simon/charset.cpp b/engines/simon/charset.cpp
index 5f40e2f688..7ae1113f56 100644
--- a/engines/simon/charset.cpp
+++ b/engines/simon/charset.cpp
@@ -1546,7 +1546,7 @@ void SimonEngine::video_putchar_drawchar(WindowBlock *window, uint x, uint y, by
h = 8;
w = 6;
- switch(_language) {
+ switch (_language) {
case Common::RU_RUS:
src = russian_video_font + (chr - 0x20) * 8;
break;
diff --git a/engines/simon/draw.cpp b/engines/simon/draw.cpp
index 4e3837f696..746b25c471 100644
--- a/engines/simon/draw.cpp
+++ b/engines/simon/draw.cpp
@@ -176,7 +176,7 @@ void SimonEngine::animateSpritesByY() {
vsp++;
}
- while(1) {
+ while (1) {
y = spriteTable[0][0];
slot = spriteTable[0][1];
diff --git a/engines/simon/oracle.cpp b/engines/simon/oracle.cpp
index f0d770e105..22fbf72375 100644
--- a/engines/simon/oracle.cpp
+++ b/engines/simon/oracle.cpp
@@ -92,7 +92,7 @@ void SimonEngine::oracleTextUp() {
if (_textWindow->scrollY > _oracleMaxScrollY) // For scroll up
_oracleMaxScrollY = _textWindow->scrollY;
- while(1) {
+ while (1) {
if (_textWindow->scrollY == _oracleMaxScrollY)
break;
_textWindow->textRow = 105;
@@ -126,7 +126,7 @@ void SimonEngine::oracleTextDown() {
if (_textWindow->scrollY > _oracleMaxScrollY) // For scroll up
_oracleMaxScrollY = _textWindow->scrollY;
- while(1) {
+ while (1) {
if (_textWindow->scrollY == 0)
break;
@@ -293,8 +293,8 @@ void SimonEngine::listSaveGames(int n) {
z++;
}
- while(1) {
- OK=1;
+ while (1) {
+ OK = 1;
if (getBitFlag(93) || getBitFlag(94)) {
OK = 0;
if (j > z)
diff --git a/engines/simon/verb.cpp b/engines/simon/verb.cpp
index c3c9159206..7c550c5712 100644
--- a/engines/simon/verb.cpp
+++ b/engines/simon/verb.cpp
@@ -641,7 +641,7 @@ void SimonEngine::inventoryUp(WindowBlock *window) {
_marks = 0;
checkUp(window);
loadSprite(4, 9, 21, 0 ,0, 0);
- while(1) {
+ while (1) {
if (_currentBoxNumber != 0x7FFB || !getBitFlag(89))
break;
checkUp(window);
@@ -668,7 +668,7 @@ void SimonEngine::inventoryDown(WindowBlock *window) {
_marks = 0;
checkDown(window);
loadSprite(4, 9, 23, 0, 0, 0);
- while(1) {
+ while (1) {
if (_currentBoxNumber != 0x7FFC || !getBitFlag(89))
break;
checkDown(window);
diff --git a/engines/sky/control.cpp b/engines/sky/control.cpp
index a53a6b899d..247befad41 100644
--- a/engines/sky/control.cpp
+++ b/engines/sky/control.cpp
@@ -529,7 +529,7 @@ uint16 Control::handleClick(ConResource *pButton) {
char quitDos[] = "Quit to DOS?";
char restart[] = "Restart?";
- switch(pButton->_onClick) {
+ switch (pButton->_onClick) {
case DO_NOTHING:
return 0;
case REST_GAME_PANEL:
diff --git a/engines/sky/intro.cpp b/engines/sky/intro.cpp
index 9f8b56356e..6c50ea9804 100644
--- a/engines/sky/intro.cpp
+++ b/engines/sky/intro.cpp
@@ -825,7 +825,7 @@ bool Intro::commandFlirt(uint16 *&data) {
while ((_skyScreen->seqFramesLeft() < *data)) {
data++;
uint16 command = *data++;
- switch(command) {
+ switch (command) {
case IC_PREPARE_TEXT:
_skyText->displayText(*data++, _textBuf, true, INTRO_TEXT_WIDTH, 255);
break;
diff --git a/graphics/ilbm.cpp b/graphics/ilbm.cpp
index 1b1f53d2c1..b44d3799b2 100644
--- a/graphics/ilbm.cpp
+++ b/graphics/ilbm.cpp
@@ -59,7 +59,7 @@ struct Chunk {
if (size % 2) {
size++;
}
- while(!_input->eos() && !eos()) {
+ while (!_input->eos() && !eos()) {
readByte();
}
}
@@ -244,7 +244,7 @@ void decodeILBM(Common::ReadStream &input, Surface &surface, byte *&colors) {
formChunk.incBytesRead(8);
chunk.readHeader();
- switch(chunk.id) {
+ switch (chunk.id) {
case ID_BMHD:
bitmapHeader.width = chunk.readUint16();
bitmapHeader.height = chunk.readUint16();
diff --git a/gui/KeysDialog.cpp b/gui/KeysDialog.cpp
index c8abe1087b..d196eab1be 100644
--- a/gui/KeysDialog.cpp
+++ b/gui/KeysDialog.cpp
@@ -78,7 +78,7 @@ KeysDialog::KeysDialog(const Common::String &title)
}
void KeysDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {
- switch(cmd) {
+ switch (cmd) {
case kListSelectionChangedCmd:
if (_actionsList->getSelected() >= 0) {
@@ -86,14 +86,14 @@ void KeysDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {
#ifdef __SYMBIAN32__
uint16 key = Actions::Instance()->getMapping(_actionsList->getSelected());
- if(key != 0) {
+ if (key != 0) {
// ScummVM mappings for F1-F9 are different from SDL so remap back to sdl
- if(key >= 315 && key <= 323) {
+ if (key >= 315 && key <= 323) {
key = key - 315 + SDLK_F1;
}
}
- if(key != 0)
+ if (key != 0)
sprintf(selection, "Associated key : %s", SDL_GetKeyName((SDLKey)key));
else
sprintf(selection, "Associated key : none");
@@ -114,9 +114,9 @@ void KeysDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {
_actionSelected = _actionsList->getSelected();
#ifdef __SYMBIAN32__
uint16 key = Actions::Instance()->getMapping(_actionSelected);
- if(key != 0) {
+ if (key != 0) {
// ScummVM mappings for F1-F9 are different from SDL so remap back to sdl
- if(key >= 315 && key <= 323) {
+ if (key >= 315 && key <= 323) {
key = key - 315 + SDLK_F1;
}
@@ -163,7 +163,7 @@ void KeysDialog::handleKeyUp(uint16 ascii, int keycode, int modifiers) {
Actions::Instance()->setMapping((ActionType)_actionSelected, ascii);
#ifdef __SYMBIAN32__
- if(ascii != 0)
+ if (ascii != 0)
sprintf(selection, "Associated key : %s", SDL_GetKeyName((SDLKey) keycode));
else
sprintf(selection, "Associated key : none");
diff --git a/gui/eval.cpp b/gui/eval.cpp
index ac0d2d984f..89dd827f76 100644
--- a/gui/eval.cpp
+++ b/gui/eval.cpp
@@ -192,10 +192,10 @@ void Eval::getToken() {
if (_input[_pos] == '"') {
_pos++;
- while(_input[_pos] != '"' && _input[_pos] != '\n')
+ while (_input[_pos] != '"' && _input[_pos] != '\n')
*temp++ = _input[_pos++];
- if(_input[_pos] == '\n')
+ if (_input[_pos] == '\n')
exprError(eMissingQuote);
_pos++;
diff --git a/gui/launcher.cpp b/gui/launcher.cpp
index 249752e984..8e4d67ba26 100644
--- a/gui/launcher.cpp
+++ b/gui/launcher.cpp
@@ -373,7 +373,7 @@ void EditGameDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 dat
case kCmdGlobalAudioOverride:
setAudioSettingsState(data != 0);
setSubtitleSettingsState(data != 0);
- if(_globalVolumeOverride == NULL)
+ if (_globalVolumeOverride == NULL)
setVolumeSettingsState(data != 0);
draw();
break;
diff --git a/gui/newgui.cpp b/gui/newgui.cpp
index c8fd560691..819b6728f7 100644
--- a/gui/newgui.cpp
+++ b/gui/newgui.cpp
@@ -68,17 +68,17 @@ void GuiObject::handleScreenChanged() {
_w = g_gui.evaluator()->getVar(_name + ".w");
_h = g_gui.evaluator()->getVar(_name + ".h");
- if(_x < 0)
+ if (_x < 0)
error("Widget <%s> has x < 0", _name.c_str());
- if(_x >= g_system->getOverlayWidth())
+ if (_x >= g_system->getOverlayWidth())
error("Widget <%s> has x > %d", _name.c_str(), g_system->getOverlayWidth());
- if(_x + _w > g_system->getOverlayWidth())
+ if (_x + _w > g_system->getOverlayWidth())
error("Widget <%s> has x + w > %d (%d)", _name.c_str(), g_system->getOverlayWidth(), _x + _w);
- if(_y < 0)
+ if (_y < 0)
error("Widget <%s> has y < 0", _name.c_str());
- if(_y >= g_system->getOverlayWidth())
+ if (_y >= g_system->getOverlayWidth())
error("Widget <%s> has y > %d", _name.c_str(), g_system->getOverlayHeight());
- if(_y + _h > g_system->getOverlayWidth())
+ if (_y + _h > g_system->getOverlayWidth())
error("Widget <%s> has y + h > %d (%d)", _name.c_str(), g_system->getOverlayHeight(), _y + _h);
}
}
diff --git a/sound/mididrv.cpp b/sound/mididrv.cpp
index 7420a69171..1612488fd5 100644
--- a/sound/mididrv.cpp
+++ b/sound/mididrv.cpp
@@ -208,7 +208,7 @@ int MidiDriver::detectMusicDriver(int flags) {
}
MidiDriver *MidiDriver::createMidi(int midiDriver) {
- switch(midiDriver) {
+ switch (midiDriver) {
case MD_NULL: return MidiDriver_NULL_create();
case MD_ADLIB: return MidiDriver_ADLIB_create(g_engine->_mixer);
diff --git a/sound/voc.cpp b/sound/voc.cpp
index 0fc224521e..5f6118537f 100644
--- a/sound/voc.cpp
+++ b/sound/voc.cpp
@@ -90,7 +90,7 @@ byte *loadVOCFromStream(Common::ReadStream &stream, int &size, int &rate, int &l
len |= stream.readByte() << 8;
len |= stream.readByte() << 16;
- switch(code) {
+ switch (code) {
case 1: {
int time_constant = stream.readByte();
int packing = stream.readByte();