aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMax Horn2011-02-07 23:01:06 +0000
committerMax Horn2011-02-07 23:01:06 +0000
commit2d1c8a35331d4c73032a6fcd50ab3f7a27513dbb (patch)
treea538852678f172dec297b83d115a7d76f2638969 /engines
parent377b4c67d99503b19e866ff47c685c57dd2a56e0 (diff)
downloadscummvm-rg350-2d1c8a35331d4c73032a6fcd50ab3f7a27513dbb.tar.gz
scummvm-rg350-2d1c8a35331d4c73032a6fcd50ab3f7a27513dbb.tar.bz2
scummvm-rg350-2d1c8a35331d4c73032a6fcd50ab3f7a27513dbb.zip
ALL: Fix whitespaces / indention
svn-id: r55818
Diffstat (limited to 'engines')
-rw-r--r--engines/agi/sprite.cpp2
-rw-r--r--engines/agi/text.cpp2
-rw-r--r--engines/agos/draw.cpp2
-rw-r--r--engines/agos/gfx.cpp4
-rw-r--r--engines/agos/items.cpp2
-rw-r--r--engines/agos/res.cpp2
-rw-r--r--engines/agos/vga_e2.cpp2
-rw-r--r--engines/cine/various.cpp3
-rw-r--r--engines/draci/game.cpp3
-rw-r--r--engines/gob/draw_playtoons.cpp4
-rw-r--r--engines/gob/global.cpp2
-rw-r--r--engines/gob/sound/adlib.cpp2
-rw-r--r--engines/hugo/hugo.cpp2
-rw-r--r--engines/kyra/animator_tim.cpp2
-rw-r--r--engines/kyra/gui.cpp2
-rw-r--r--engines/kyra/kyra_mr.cpp2
-rw-r--r--engines/kyra/lol.cpp2
-rw-r--r--engines/kyra/script_lol.cpp2
-rw-r--r--engines/kyra/script_tim.cpp2
-rw-r--r--engines/lastexpress/game/sound.h2
-rw-r--r--engines/lure/events.cpp3
-rw-r--r--engines/lure/game.cpp3
-rw-r--r--engines/lure/lure.cpp3
-rw-r--r--engines/parallaction/gui_br.cpp3
-rw-r--r--engines/saga/actor_path.cpp2
-rw-r--r--engines/saga/actor_walk.cpp2
-rw-r--r--engines/saga/interface.cpp8
-rw-r--r--engines/saga/puzzle.cpp6
-rw-r--r--engines/sci/graphics/palette.cpp2
-rw-r--r--engines/sci/sound/drivers/midi.cpp2
-rw-r--r--engines/sci/sound/drivers/pcjr.cpp2
-rw-r--r--engines/scumm/debugger.cpp2
-rw-r--r--engines/scumm/gfx.cpp2
-rw-r--r--engines/scumm/he/resource_he.cpp16
-rw-r--r--engines/scumm/he/wiz_he.cpp2
-rw-r--r--engines/scumm/script_v4.cpp2
-rw-r--r--engines/sword1/control.cpp2
-rw-r--r--engines/sword1/mouse.cpp4
-rw-r--r--engines/sword1/music.cpp2
-rw-r--r--engines/sword1/router.cpp8
-rw-r--r--engines/sword1/screen.cpp2
-rw-r--r--engines/sword1/sound.cpp4
-rw-r--r--engines/sword2/function.cpp2
-rw-r--r--engines/teenagent/teenagent.cpp3
-rw-r--r--engines/tinsel/events.h2
-rw-r--r--engines/tinsel/palette.cpp2
-rw-r--r--engines/tinsel/sched.cpp3
-rw-r--r--engines/toon/movie.h2
-rw-r--r--engines/toon/toon.h4
49 files changed, 77 insertions, 69 deletions
diff --git a/engines/agi/sprite.cpp b/engines/agi/sprite.cpp
index 569481d772..e2b74e87bb 100644
--- a/engines/agi/sprite.cpp
+++ b/engines/agi/sprite.cpp
@@ -103,7 +103,7 @@ void SpritesMgr::blitPixel(uint8 *p, uint8 *end, uint8 col, int spr, int width,
uint8 *p1;
// Yes, get effective priority going down
for (p1 = p; p1 < end && (epr = *p1 & 0xf0) < 0x30; p1 += width)
- ;
+ ;
if (p1 >= end)
epr = 0x40;
} else {
diff --git a/engines/agi/text.cpp b/engines/agi/text.cpp
index 778da0a527..af3881170a 100644
--- a/engines/agi/text.cpp
+++ b/engines/agi/text.cpp
@@ -560,7 +560,7 @@ char *AgiEngine::agiSprintf(const char *s) {
// remove all leading 0
// don't remove the 3rd zero if 000
for (i = 0; z[i] == '0' && i < 14; i++)
- ;
+ ;
} else {
i = 15 - i;
}
diff --git a/engines/agos/draw.cpp b/engines/agos/draw.cpp
index 316b4ef2bc..37abe9324c 100644
--- a/engines/agos/draw.cpp
+++ b/engines/agos/draw.cpp
@@ -879,7 +879,7 @@ void AGOSEngine::slowFadeIn() {
src = _displayPalette;
dst = _currentPalette;
- for (p = _fastFadeInFlag; p !=0 ; p -= 3) {
+ for (p = _fastFadeInFlag; p !=0; p -= 3) {
if (src[0] >= c)
dst[0] += 4;
if (src[1] >= c)
diff --git a/engines/agos/gfx.cpp b/engines/agos/gfx.cpp
index 82a4cb714b..b784e4fcb3 100644
--- a/engines/agos/gfx.cpp
+++ b/engines/agos/gfx.cpp
@@ -778,7 +778,7 @@ void AGOSEngine::drawVertImage(VC10_state *state) {
}
void AGOSEngine::drawVertImageUncompressed(VC10_state *state) {
- assert ((state->flags & kDFCompressed) == 0) ;
+ assert((state->flags & kDFCompressed) == 0);
const byte *src;
byte *dst;
@@ -804,7 +804,7 @@ void AGOSEngine::drawVertImageUncompressed(VC10_state *state) {
}
void AGOSEngine::drawVertImageCompressed(VC10_state *state) {
- assert (state->flags & kDFCompressed) ;
+ assert(state->flags & kDFCompressed);
uint w, h;
state->x_skip *= 4; /* reached */
diff --git a/engines/agos/items.cpp b/engines/agos/items.cpp
index 6c6b127a51..81da5264ba 100644
--- a/engines/agos/items.cpp
+++ b/engines/agos/items.cpp
@@ -381,7 +381,7 @@ int AGOSEngine::wordMatch(Item *item, int16 a, int16 n) {
if (a == -1 && n == item->noun)
return 1;
if (a == item->adjective && n == item->noun)
- return 1 ;
+ return 1;
return 0;
}
diff --git a/engines/agos/res.cpp b/engines/agos/res.cpp
index 2d99f7bcef..b8409669ee 100644
--- a/engines/agos/res.cpp
+++ b/engines/agos/res.cpp
@@ -716,7 +716,7 @@ static void transferLoop(uint8 *dataOut, int &outIndex, uint32 destVal, int max)
assert(outIndex > max - 1);
byte *pDest = dataOut + outIndex;
- for (int i = 0; (i <= max) && (outIndex > 0) ; ++i) {
+ for (int i = 0; (i <= max) && (outIndex > 0); ++i) {
pDest = dataOut + --outIndex;
*pDest = pDest[destVal];
}
diff --git a/engines/agos/vga_e2.cpp b/engines/agos/vga_e2.cpp
index ea805c362c..a01e79ff99 100644
--- a/engines/agos/vga_e2.cpp
+++ b/engines/agos/vga_e2.cpp
@@ -360,7 +360,7 @@ void AGOSEngine::fullFade() {
for (c = 64; c != 0; c --) {
srcPal = _curVgaFile2 + 32;
dstPal = _currentPalette;
- for (p = 768; p !=0 ; p -= 3) {
+ for (p = 768; p !=0; p -= 3) {
uint8 r = srcPal[0] * 4;
if (dstPal[0] != r)
dstPal[0] += 4;
diff --git a/engines/cine/various.cpp b/engines/cine/various.cpp
index cf7135a6b5..5b8663606e 100644
--- a/engines/cine/various.cpp
+++ b/engines/cine/various.cpp
@@ -1323,7 +1323,8 @@ void addSeqListElement(uint16 objIdx, int16 param1, int16 param2, int16 frame, i
Common::List<SeqListElement>::iterator it;
SeqListElement tmp;
- for (it = g_cine->_seqList.begin(); it != g_cine->_seqList.end() && it->varE < param7; ++it) ;
+ for (it = g_cine->_seqList.begin(); it != g_cine->_seqList.end() && it->varE < param7; ++it)
+ ;
tmp.objIdx = objIdx;
tmp.var4 = param1;
diff --git a/engines/draci/game.cpp b/engines/draci/game.cpp
index eef81d808e..060ee41077 100644
--- a/engines/draci/game.cpp
+++ b/engines/draci/game.cpp
@@ -577,8 +577,9 @@ void Game::loop(LoopSubstatus substatus, bool shouldExit) {
case kStatusDialogue:
handleDialogueLoop();
break;
- case kStatusGate: ;
+ case kStatusGate:
// cannot happen when isCursonOn; added for completeness
+ break;
}
}
diff --git a/engines/gob/draw_playtoons.cpp b/engines/gob/draw_playtoons.cpp
index f32c42ec43..edd7b76318 100644
--- a/engines/gob/draw_playtoons.cpp
+++ b/engines/gob/draw_playtoons.cpp
@@ -219,8 +219,8 @@ void Draw_Playtoons::spriteOperation(int16 operation) {
break;
default:
warning("oPlaytoons_spriteOperation: operation DRAW_DRAWLINE, draw %d lines", (_pattern & 0xFF) * (_pattern & 0xFF));
- for (int16 i = 0; i <= _pattern ; i++)
- for (int16 j = 0; j <= _pattern ; j++)
+ for (int16 i = 0; i <= _pattern; i++)
+ for (int16 j = 0; j <= _pattern; j++)
_spritesArray[_destSurface]->drawLine(
_destSpriteX - (_pattern / 2) + i,
_destSpriteY - (_pattern / 2) + j,
diff --git a/engines/gob/global.cpp b/engines/gob/global.cpp
index 0fcbddf410..8b8fb3d4c9 100644
--- a/engines/gob/global.cpp
+++ b/engines/gob/global.cpp
@@ -88,7 +88,7 @@ Global::Global(GobEngine *vm) : _vm(vm) {
_unusedPalette1[16] = (int16) 0xAAAA;
_unusedPalette1[17] = (int16) 0xFFFF;
- for (int i = 0; i < 16 ;i++)
+ for (int i = 0; i < 16; i++)
_unusedPalette2[i] = i;
_vgaPalette[ 0].red = 0x00; _vgaPalette[ 0].green = 0x00; _vgaPalette[ 0].blue = 0x00;
diff --git a/engines/gob/sound/adlib.cpp b/engines/gob/sound/adlib.cpp
index d643ae511b..f070bf14fa 100644
--- a/engines/gob/sound/adlib.cpp
+++ b/engines/gob/sound/adlib.cpp
@@ -736,7 +736,7 @@ void MDYPlayer::setVoices() {
_tbrStart = READ_LE_UINT16(timbrePtr);
timbrePtr += 2;
- for (int i = 0; i < _tbrCount ; i++)
+ for (int i = 0; i < _tbrCount; i++)
setVoice(i, i, true);
}
diff --git a/engines/hugo/hugo.cpp b/engines/hugo/hugo.cpp
index 1496e26501..46653c1e2f 100644
--- a/engines/hugo/hugo.cpp
+++ b/engines/hugo/hugo.cpp
@@ -903,7 +903,7 @@ int HugoEngine::deltaX(const int x1, const int x2, const int vx, int y) const {
debugC(3, kDebugEngine, "deltaX(%d, %d, %d, %d)", x1, x2, vx, y);
if (vx == 0)
- return 0 ; // Object stationary
+ return 0; // Object stationary
y *= kCompLineSize; // Offset into boundary file
if (vx > 0) {
diff --git a/engines/kyra/animator_tim.cpp b/engines/kyra/animator_tim.cpp
index ef1c760d71..0290b2aa7f 100644
--- a/engines/kyra/animator_tim.cpp
+++ b/engines/kyra/animator_tim.cpp
@@ -208,7 +208,7 @@ void TimAnimator::playPart(int animIndex, int firstFrame, int lastFrame, int del
Animation *anim = &_animations[animIndex];
int step = (lastFrame >= firstFrame) ? 1 : -1;
- for (int i = firstFrame; i != (lastFrame + step) ; i += step) {
+ for (int i = firstFrame; i != (lastFrame + step); i += step) {
uint32 next = _system->getMillis() + delay * _vm->_tickLength;
if (anim->wsaCopyParams & 0x4000) {
_screen->copyRegion(112, 0, 112, 0, 176, 120, 6, 2);
diff --git a/engines/kyra/gui.cpp b/engines/kyra/gui.cpp
index f0eb25190b..ff7bf233d2 100644
--- a/engines/kyra/gui.cpp
+++ b/engines/kyra/gui.cpp
@@ -490,7 +490,7 @@ void MainMenu::updateAnimation() {
_nextUpdate = now + _anim.delay * _vm->tickLength();
_anim.anim->displayFrame(_animIntern.curFrame, 0, 0, 0, 0, 0, 0);
- _animIntern.curFrame += _animIntern.direction ;
+ _animIntern.curFrame += _animIntern.direction;
if (_animIntern.curFrame < _anim.startFrame) {
_animIntern.curFrame = _anim.startFrame;
_animIntern.direction = 1;
diff --git a/engines/kyra/kyra_mr.cpp b/engines/kyra/kyra_mr.cpp
index 403ac151a5..a6b99fffbf 100644
--- a/engines/kyra/kyra_mr.cpp
+++ b/engines/kyra/kyra_mr.cpp
@@ -1315,7 +1315,7 @@ int KyraEngine_MR::loadLanguageFile(const char *file, uint8 *&buffer) {
Common::strlcpy(nBuf, file, sizeof(nBuf));
buffer = _res->fileData(appendLanguage(nBuf, _lang, sizeof(nBuf)), &size);
- return buffer ? size : 0 ;
+ return buffer ? size : 0;
}
uint8 *KyraEngine_MR::getTableEntry(uint8 *buffer, int id) {
diff --git a/engines/kyra/lol.cpp b/engines/kyra/lol.cpp
index f6ac8a1a73..87bd67b40b 100644
--- a/engines/kyra/lol.cpp
+++ b/engines/kyra/lol.cpp
@@ -3687,7 +3687,7 @@ void LoLEngine::applyMonsterDefenseSkill(MonsterInPlay *monster, int16 attacker,
if ((flags & 0x3f) == 2 || skill)
return;
- for (int i = 0; i < 3 ; i++) {
+ for (int i = 0; i < 3; i++) {
itm = _characters[attacker].items[i];
if (!itm)
continue;
diff --git a/engines/kyra/script_lol.cpp b/engines/kyra/script_lol.cpp
index 33fa16a22c..c9fb8df1fb 100644
--- a/engines/kyra/script_lol.cpp
+++ b/engines/kyra/script_lol.cpp
@@ -1400,7 +1400,7 @@ int LoLEngine::olol_characterSkillTest(EMCState *script){
int m = 0;
int c = 0;
- for (int i = 0; i < n ; i++) {
+ for (int i = 0; i < n; i++) {
int v = _characters[i].skillModifiers[skill] + _characters[i].skillLevels[skill] + 25;
if (v > m) {
m = v;
diff --git a/engines/kyra/script_tim.cpp b/engines/kyra/script_tim.cpp
index 30291c67db..28f18a1f79 100644
--- a/engines/kyra/script_tim.cpp
+++ b/engines/kyra/script_tim.cpp
@@ -906,7 +906,7 @@ TIMInterpreter_LoL::TIMInterpreter_LoL(LoLEngine *engine, Screen_v2 *screen_v2,
#undef COMMAND_UNIMPL
#undef COMMAND
- _commands = commandProcs ;
+ _commands = commandProcs;
_commandsSize = ARRAYSIZE(commandProcs);
_screen = engine->_screen;
diff --git a/engines/lastexpress/game/sound.h b/engines/lastexpress/game/sound.h
index 610eba9d5b..a2c69eb827 100644
--- a/engines/lastexpress/game/sound.h
+++ b/engines/lastexpress/game/sound.h
@@ -360,7 +360,7 @@ private:
void loadSoundData(SoundEntry *entry, Common::String name);
void updateEntry(SoundEntry *entry, uint value) const;
- void updateEntryState(SoundEntry *entry) const ;
+ void updateEntryState(SoundEntry *entry) const;
void resetEntry(SoundEntry *entry) const;
void removeEntry(SoundEntry *entry);
diff --git a/engines/lure/events.cpp b/engines/lure/events.cpp
index c637d4d7f7..f56a57ca34 100644
--- a/engines/lure/events.cpp
+++ b/engines/lure/events.cpp
@@ -141,7 +141,8 @@ void Mouse::waitForRelease() {
LureEngine &engine = LureEngine::getReference();
do {
- while (e.pollEvent() && !engine.shouldQuit()) ;
+ while (e.pollEvent() && !engine.shouldQuit())
+ ;
g_system->delayMillis(20);
} while (!engine.shouldQuit() && (lButton() || rButton() || mButton()));
}
diff --git a/engines/lure/game.cpp b/engines/lure/game.cpp
index e77ac25716..7e13cff032 100644
--- a/engines/lure/game.cpp
+++ b/engines/lure/game.cpp
@@ -228,7 +228,8 @@ void Game::execute() {
case Common::KEYCODE_KP_MINUS:
if (_debugFlag) {
if (roomNum == 1) roomNum = 55;
- while (res.getRoom(--roomNum) == NULL) ;
+ while (res.getRoom(--roomNum) == NULL)
+ ;
room.setRoomNumber(roomNum);
}
break;
diff --git a/engines/lure/lure.cpp b/engines/lure/lure.cpp
index 310480d2e1..ca102e237c 100644
--- a/engines/lure/lure.cpp
+++ b/engines/lure/lure.cpp
@@ -233,7 +233,8 @@ bool LureEngine::loadGame(uint8 slotNumber) {
}
// Read in and discard the savegame caption
- while (f->readByte() != 0) ;
+ while (f->readByte() != 0)
+ ;
// Load in the data
Resources::getReference().loadFromStream(f);
diff --git a/engines/parallaction/gui_br.cpp b/engines/parallaction/gui_br.cpp
index 21cb2d8b00..c80a9940a2 100644
--- a/engines/parallaction/gui_br.cpp
+++ b/engines/parallaction/gui_br.cpp
@@ -250,7 +250,8 @@ public:
bool complete[3];
_vm->_saveLoad->getGamePartProgress(complete, 3);
- for (i = 0; i < 3 && complete[i]; i++, _availItems++) ;
+ for (i = 0; i < 3 && complete[i]; i++, _availItems++)
+ ;
if (_vm->getPlatform() == Common::kPlatformAmiga) {
_menuStrings = _menuStringsAmiga;
diff --git a/engines/saga/actor_path.cpp b/engines/saga/actor_path.cpp
index 6f1fc2f2d4..df117841f3 100644
--- a/engines/saga/actor_path.cpp
+++ b/engines/saga/actor_path.cpp
@@ -464,7 +464,7 @@ void Actor::removeNodes() {
// directly reached from the first node. If we find any, skip directly
// from the first node to that node (by marking all nodes in between as
// empty).
- for (i = _pathNodeList.size() - 2; i > 1 ; i--) {
+ for (i = _pathNodeList.size() - 2; i > 1; i--) {
if (_pathNodeList[i].point.x == PATH_NODE_EMPTY) {
continue;
}
diff --git a/engines/saga/actor_walk.cpp b/engines/saga/actor_walk.cpp
index 310bc3b26c..6aabf27311 100644
--- a/engines/saga/actor_walk.cpp
+++ b/engines/saga/actor_walk.cpp
@@ -992,7 +992,7 @@ bool Actor::actorWalkTo(uint16 actorId, const Location &toLocation) {
} else if (pointFrom.y > anotherActorScreenPosition.y) {
testBox.bottom = pointFrom.y - 1;
} else {
- testBox.top = pointFrom.y + 1 ;
+ testBox.top = pointFrom.y + 1;
}
}
diff --git a/engines/saga/interface.cpp b/engines/saga/interface.cpp
index 5b15fc9803..5a3b229c9d 100644
--- a/engines/saga/interface.cpp
+++ b/engines/saga/interface.cpp
@@ -2705,7 +2705,7 @@ void Interface::mapPanelShow() {
_vm->_gfx->getCurrentPal(_mapSavedPal);
- for (i = 0; i < 6 ; i++) {
+ for (i = 0; i < 6; i++) {
_vm->_gfx->palToBlack(_mapSavedPal, 0.2 * i);
_vm->_render->drawScene();
_vm->_system->delayMillis(5);
@@ -2728,7 +2728,7 @@ void Interface::mapPanelShow() {
_vm->_gfx->drawRegion(rect, image.getBuffer());
// Evil Evil
- for (i = 0; i < 6 ; i++) {
+ for (i = 0; i < 6; i++) {
_vm->_gfx->blackToPal(cPal, 0.2 * i);
_vm->_render->drawScene();
_vm->_system->delayMillis(5);
@@ -2746,7 +2746,7 @@ void Interface::mapPanelClean() {
_vm->_gfx->getCurrentPal(pal);
- for (i = 0; i < 6 ; i++) {
+ for (i = 0; i < 6; i++) {
_vm->_gfx->palToBlack(pal, 0.2 * i);
_vm->_render->drawScene();
_vm->_system->delayMillis(5);
@@ -2758,7 +2758,7 @@ void Interface::mapPanelClean() {
_vm->_gfx->showCursor(true);
_vm->_render->drawScene();
- for (i = 0; i < 6 ; i++) {
+ for (i = 0; i < 6; i++) {
_vm->_gfx->blackToPal(_mapSavedPal, 0.2 * i);
_vm->_render->drawScene();
_vm->_system->delayMillis(5);
diff --git a/engines/saga/puzzle.cpp b/engines/saga/puzzle.cpp
index af81c3c670..0e08c84e43 100644
--- a/engines/saga/puzzle.cpp
+++ b/engines/saga/puzzle.cpp
@@ -191,7 +191,7 @@ void Puzzle::showPieces() {
SpriteList *spriteList;
_vm->_actor->getSpriteParams(puzzle, frameNumber, spriteList);
- for (int j = PUZZLE_PIECES - 1 ; j >= 0; j--) {
+ for (int j = PUZZLE_PIECES - 1; j >= 0; j--) {
int num = _piecePriority[j];
if (_puzzlePiece != num) {
@@ -350,9 +350,9 @@ void Puzzle::dropPiece(Point mousePt) {
spI = &((*spriteList)[_puzzlePiece]);
if (newx + spI->width > boxw)
- newx = boxw - spI->width ;
+ newx = boxw - spI->width;
if (newy + spI->height > boxh)
- newy = boxh - spI->height ;
+ newy = boxh - spI->height;
int x1 = ((newx - PUZZLE_X_OFFSET) & ~7) + PUZZLE_X_OFFSET;
int y1 = ((newy - PUZZLE_Y_OFFSET) & ~7) + PUZZLE_Y_OFFSET;
diff --git a/engines/sci/graphics/palette.cpp b/engines/sci/graphics/palette.cpp
index cc1bffee4e..616ee841c1 100644
--- a/engines/sci/graphics/palette.cpp
+++ b/engines/sci/graphics/palette.cpp
@@ -299,7 +299,7 @@ bool GfxPalette::merge(Palette *newPalette, bool force, bool forceRealMerge) {
bool paletteChanged = false;
// colors 0 (black) and 255 (white) are not affected by merging
- for (i = 1 ; i < 255; i++) {
+ for (i = 1; i < 255; i++) {
if (!newPalette->colors[i].used)// color is not used - so skip it
continue;
// forced palette merging or dest color is not used yet
diff --git a/engines/sci/sound/drivers/midi.cpp b/engines/sci/sound/drivers/midi.cpp
index ed3a1e25d2..c274c8bce2 100644
--- a/engines/sci/sound/drivers/midi.cpp
+++ b/engines/sci/sound/drivers/midi.cpp
@@ -785,7 +785,7 @@ void MidiPlayer_Midi::mapMt32ToGm(byte *data, size_t size) {
if (size > pos && ((0x100 * *(data + pos) + *(data + pos + 1)) == 0xdcba)) {
debugC(kDebugLevelSound, "\n[MT32-to-GM] Mapping percussion..");
- for (i = 0; i < 64 ; i++) {
+ for (i = 0; i < 64; i++) {
number = *(data + pos + 4 * i + 2);
byte ins = i + 24;
diff --git a/engines/sci/sound/drivers/pcjr.cpp b/engines/sci/sound/drivers/pcjr.cpp
index 93de072865..e1c3302fef 100644
--- a/engines/sci/sound/drivers/pcjr.cpp
+++ b/engines/sci/sound/drivers/pcjr.cpp
@@ -52,7 +52,7 @@ static const int freq_table[12] = { // A4 is 440Hz, halftone map is x |-> ** 2^(
static inline int get_freq(int note) {
int halftone_delta = note - BASE_NOTE;
int oct_diff = ((halftone_delta + BASE_OCTAVE * 12) / 12) - BASE_OCTAVE;
- int halftone_index = (halftone_delta + (12 * 100)) % 12 ;
+ int halftone_index = (halftone_delta + (12 * 100)) % 12;
int freq = (!note) ? 0 : freq_table[halftone_index] / (1 << (-oct_diff));
return freq;
diff --git a/engines/scumm/debugger.cpp b/engines/scumm/debugger.cpp
index 67a8abdec9..cf0ee0fa0a 100644
--- a/engines/scumm/debugger.cpp
+++ b/engines/scumm/debugger.cpp
@@ -425,7 +425,7 @@ bool ScummDebugger::Cmd_PrintObjects(int argc, const char **argv) {
DebugPrintf("|num | x | y |width|height|state|fl| cls |\n");
DebugPrintf("+----+----+----+-----+------+-----+--+---------+\n");
- for (i = 1; i < _vm->_numLocalObjects ; i++) {
+ for (i = 1; i < _vm->_numLocalObjects; i++) {
o = &(_vm->_objs[i]);
if (o->obj_nr == 0)
continue;
diff --git a/engines/scumm/gfx.cpp b/engines/scumm/gfx.cpp
index 313e8b88c0..9efddc6ad2 100644
--- a/engines/scumm/gfx.cpp
+++ b/engines/scumm/gfx.cpp
@@ -3122,7 +3122,7 @@ StripTable *GdiV2::generateStripTable(const byte *src, int width, int height, St
// Decode the graphics strips, and memorize the run/color values
// as well as the byte offset.
- for (x = 0 ; x < width; x++) {
+ for (x = 0; x < width; x++) {
if ((x % 8) == 0) {
assert(x / 8 < 160);
diff --git a/engines/scumm/he/resource_he.cpp b/engines/scumm/he/resource_he.cpp
index 0f7fe93e6d..135af1bb38 100644
--- a/engines/scumm/he/resource_he.cpp
+++ b/engines/scumm/he/resource_he.cpp
@@ -241,7 +241,7 @@ const char *Win32ResExtractor::res_type_string_to_id(const char *type) {
if (type == NULL)
return NULL;
- for (c = 0 ; c < (int)RES_TYPE_COUNT ; c++) {
+ for (c = 0; c < (int)RES_TYPE_COUNT; c++) {
if (res_types[c] != NULL && !scumm_stricmp(type, res_types[c]))
return res_type_ids[c];
}
@@ -355,7 +355,7 @@ byte *Win32ResExtractor::extract_group_icon_cursor_resource(WinLibrary *fi, WinR
/* calculate total size of output file */
RETURN_IF_BAD_POINTER(NULL, icondir->count);
skipped = 0;
- for (c = 0 ; c < FROM_LE_16(icondir->count) ; c++) {
+ for (c = 0; c < FROM_LE_16(icondir->count); c++) {
int level;
int iconsize;
char name[14];
@@ -411,7 +411,7 @@ byte *Win32ResExtractor::extract_group_icon_cursor_resource(WinLibrary *fi, WinR
/* transfer each cursor/icon: Win32CursorIconDirEntry and data */
skipped = 0;
- for (c = 0 ; c < FROM_LE_16(icondir->count) ; c++) {
+ for (c = 0; c < FROM_LE_16(icondir->count); c++) {
int level;
char name[14];
WinResource *fwr;
@@ -585,7 +585,7 @@ bool Win32ResExtractor::decode_pe_resource_id(WinLibrary *fi, WinResource *wr, u
RETURN_IF_BAD_OFFSET(false, &mem[1], sizeof(uint16) * len);
len = MIN(FROM_LE_16(mem[0]), (uint16)WINRES_ID_MAXLEN);
- for (c = 0 ; c < len ; c++)
+ for (c = 0; c < len; c++)
wr->id[c] = FROM_LE_16(mem[c+1]) & 0x00FF;
wr->id[len] = '\0';
wr->numeric_id = false;
@@ -629,7 +629,7 @@ Win32ResExtractor::WinResource *Win32ResExtractor::list_pe_resources(WinLibrary
wr = (WinResource *)malloc(sizeof(WinResource) * rescnt);
/* fill in the WinResource's */
- for (c = 0 ; c < rescnt ; c++) {
+ for (c = 0; c < rescnt; c++) {
RETURN_IF_BAD_POINTER(NULL, dirent[c]);
wr[c].this_ = pe_res;
wr[c].level = level;
@@ -708,7 +708,7 @@ bool Win32ResExtractor::read_library(WinLibrary *fi) {
/* we don't need to do OFFSET checking for the sections.
* calc_vma_size has already done that */
- for (d = pe_header->file_header.number_of_sections - 1; d >= 0 ; d--) {
+ for (d = pe_header->file_header.number_of_sections - 1; d >= 0; d--) {
Win32ImageSectionHeader *pe_sec = PE_SECTIONS(fi->memory) + d;
if (pe_sec->characteristics & IMAGE_SCN_CNT_UNINITIALIZED_DATA)
@@ -765,7 +765,7 @@ int Win32ResExtractor::calc_vma_size(WinLibrary *fi) {
seg = PE_SECTIONS(fi->memory);
RETURN_IF_BAD_POINTER(-1, *seg);
- for (c = 0 ; c < segcount ; c++) {
+ for (c = 0; c < segcount; c++) {
RETURN_IF_BAD_POINTER(0, *seg);
fix_win32_image_section_header(seg);
@@ -786,7 +786,7 @@ Win32ResExtractor::WinResource *Win32ResExtractor::find_with_resource_array(WinL
if (wr == NULL)
return NULL;
- for (c = 0 ; c < rescnt ; c++) {
+ for (c = 0; c < rescnt; c++) {
if (compare_resource_id(&wr[c], id)) {
/* duplicate WinResource and return it */
return_wr = (WinResource *)malloc(sizeof(WinResource));
diff --git a/engines/scumm/he/wiz_he.cpp b/engines/scumm/he/wiz_he.cpp
index 807380272d..c7e6a56083 100644
--- a/engines/scumm/he/wiz_he.cpp
+++ b/engines/scumm/he/wiz_he.cpp
@@ -2342,7 +2342,7 @@ void Wiz::remapWizImagePal(const WizParameters *params) {
const uint8 *index = params->remapIndex;
uint8 *iwiz = _vm->getResourceAddress(rtImage, params->img.resNum);
assert(iwiz);
- uint8 *rmap = _vm->findWrappedBlock(MKID_BE('RMAP'), iwiz, st, 0) ;
+ uint8 *rmap = _vm->findWrappedBlock(MKID_BE('RMAP'), iwiz, st, 0);
assert(rmap);
WRITE_BE_UINT32(rmap, 0x01234567);
while (num--) {
diff --git a/engines/scumm/script_v4.cpp b/engines/scumm/script_v4.cpp
index b6e5834acc..98001e6854 100644
--- a/engines/scumm/script_v4.cpp
+++ b/engines/scumm/script_v4.cpp
@@ -304,7 +304,7 @@ void ScummEngine_v4::updateIQPoints() {
// merge episode and series IQ strings and calculate series IQ
seriesIQ = 0;
// iterate over puzzles
- for (int i = 0; i < NUM_PUZZLES ; ++i) {
+ for (int i = 0; i < NUM_PUZZLES; ++i) {
byte puzzleIQ = seriesIQString[i];
// if puzzle is solved copy points to episode string
if (puzzleIQ > 0)
diff --git a/engines/sword1/control.cpp b/engines/sword1/control.cpp
index 1d310d55e2..c61d0b7c85 100644
--- a/engines/sword1/control.cpp
+++ b/engines/sword1/control.cpp
@@ -122,7 +122,7 @@ ControlButton::ControlButton(uint16 x, uint16 y, uint32 resId, uint8 id, uint8 f
_width = (_width > SCREEN_WIDTH) ? SCREEN_WIDTH : _width;
_height = _resMan->getUint16(tmp->height);
if ((x == 0) && (y == 0)) { // center the frame (used for panels);
- _x = (((640 - _width) / 2) < 0)? 0 : ((640 - _width) / 2) ;
+ _x = (((640 - _width) / 2) < 0)? 0 : ((640 - _width) / 2);
_y = (((480 - _height) / 2) < 0)? 0 : ((480 - _height) / 2);
}
_dstBuf = screenBuf + _y * SCREEN_WIDTH + _x;
diff --git a/engines/sword1/mouse.cpp b/engines/sword1/mouse.cpp
index 3df55fc7d2..cdc60d7634 100644
--- a/engines/sword1/mouse.cpp
+++ b/engines/sword1/mouse.cpp
@@ -313,7 +313,7 @@ void Mouse::animate() {
void Mouse::fnNoHuman() {
if (Logic::_scriptVars[MOUSE_STATUS] & 2) // locked, can't do anything
- return ;
+ return;
Logic::_scriptVars[MOUSE_STATUS] = 0; // off & unlocked
setLuggage(0, 0);
setPointer(0, 0);
@@ -321,7 +321,7 @@ void Mouse::fnNoHuman() {
void Mouse::fnAddHuman() {
if (Logic::_scriptVars[MOUSE_STATUS] & 2) // locked, can't do anything
- return ;
+ return;
Logic::_scriptVars[MOUSE_STATUS] = 1;
Logic::_scriptVars[SPECIAL_ITEM] = 0;
_getOff = SCR_std_off;
diff --git a/engines/sword1/music.cpp b/engines/sword1/music.cpp
index 23cc30e4b1..d860e1c69d 100644
--- a/engines/sword1/music.cpp
+++ b/engines/sword1/music.cpp
@@ -306,7 +306,7 @@ void Music::startMusic(int32 tuneId, int32 loopFlag) {
/* The handle will load the music file now. It can take a while, so unlock
the mutex before, to have the soundthread playing normally.
As the corresponding _converter is NULL, the handle will be ignored by the playing thread */
- if (SwordEngine::isPsx()) { ;
+ if (SwordEngine::isPsx()) {
if (_handles[newStream].playPSX(tuneId, loopFlag != 0)) {
_mutex.lock();
_converter[newStream] = Audio::makeRateConverter(_handles[newStream].getRate(), _mixer->getOutputRate(), _handles[newStream].isStereo(), false);
diff --git a/engines/sword1/router.cpp b/engines/sword1/router.cpp
index 84cc81cd0e..9ff5ae0c8e 100644
--- a/engines/sword1/router.cpp
+++ b/engines/sword1/router.cpp
@@ -783,7 +783,7 @@ void Router::slidyWalkAnimator(WalkData *walkAnim) {
stepCount += 1;
step += 1;
module += 1;
- } while ( module < moduleEnd) ;
+ } while ( module < moduleEnd);
stepX = _modX[_modularPath[p].dir];
stepY = _modY[_modularPath[p].dir];
errorX = _modularPath[p].x - moduleX;
@@ -1238,7 +1238,7 @@ int32 Router::solidWalkAnimator(WalkData *walkAnim) {
stepCount += 1;
module += 1;
step += 1;
- } while ( module < moduleEnd) ;
+ } while ( module < moduleEnd);
errorX = _modularPath[p].x - moduleX;
errorX = errorX * _modX[_modularPath[p].dir];
errorY = _modularPath[p].y - moduleY;
@@ -1951,8 +1951,8 @@ int32 Router::LoadWalkResources(Object *megaObject, int32 x, int32 y, int32 dir)
//ResClose(megaObject->o_mega_resource); // mouse wiggle
_resMan->resClose(megaObject->o_mega_resource);
- _diagonalx = _modX[3] ;//36
- _diagonaly = _modY[3] ;//8
+ _diagonalx = _modX[3]; //36
+ _diagonaly = _modY[3]; //8
// mega data ready
diff --git a/engines/sword1/screen.cpp b/engines/sword1/screen.cpp
index 9c8d352fda..031ab74d9a 100644
--- a/engines/sword1/screen.cpp
+++ b/engines/sword1/screen.cpp
@@ -760,7 +760,7 @@ void Screen::drawPsxFullShrinkedSprite(uint8 *sprData, uint16 sprX, uint16 sprY,
uint8 *dest = _screenBuf + (sprY * _scrnSizeX) + sprX;
for (uint16 cnty = 0; cnty < sprHeight; cnty++) {
- for (uint16 cntx = 0; cntx < sprWidth ; cntx++)
+ for (uint16 cntx = 0; cntx < sprWidth; cntx++)
if (sprData[cntx]) {
dest[cntx * 3] = sprData[cntx]; //In these sprites we need to double vertical lines too...
dest[cntx * 3 + 1] = sprData[cntx];
diff --git a/engines/sword1/sound.cpp b/engines/sword1/sound.cpp
index 92bed1b624..ff2f1060ee 100644
--- a/engines/sword1/sound.cpp
+++ b/engines/sword1/sound.cpp
@@ -130,7 +130,7 @@ void Sound::checkSpeechFileEndianness() {
else
size /= 2;
int16 prev_be_value = (int16)SWAP_BYTES_16(*((uint16*)(data)));
- for (uint32 i = 1 ; i < size ; ++i) {
+ for (uint32 i = 1; i < size; ++i) {
le_diff_sum += fabs((double)(data[i] - data[i-1]));
int16 be_value = (int16)SWAP_BYTES_16(*((uint16*)(data + i)));
be_diff_sum += fabs((double)(be_value - prev_be_value));
@@ -209,7 +209,7 @@ void Sound::fnStopFx(int32 fxNo) {
if (cnt != _endOfQueue-1)
_fxQueue[cnt] = _fxQueue[_endOfQueue-1];
_endOfQueue--;
- return ;
+ return;
}
debug(8, "fnStopFx: id not found in queue");
}
diff --git a/engines/sword2/function.cpp b/engines/sword2/function.cpp
index dc8c42c16a..5bc82b5f9e 100644
--- a/engines/sword2/function.cpp
+++ b/engines/sword2/function.cpp
@@ -1292,7 +1292,7 @@ int32 Logic::fnSpeechProcess(int32 *params) {
obSpeech.setCommand(0);
obSpeech.setWaitState(1);
- return IR_REPEAT ;
+ return IR_REPEAT;
case INS_sort:
fnSortSprite(params); // ob_graphic
diff --git a/engines/teenagent/teenagent.cpp b/engines/teenagent/teenagent.cpp
index 73f3716a47..523c0e1700 100644
--- a/engines/teenagent/teenagent.cpp
+++ b/engines/teenagent/teenagent.cpp
@@ -277,7 +277,8 @@ int TeenAgentEngine::skipEvents() const {
case Common::EVENT_KEYDOWN:
if (event.kbd.ascii)
return 1;
- default: ;
+ default:
+ break;
}
}
return 0;
diff --git a/engines/tinsel/events.h b/engines/tinsel/events.h
index c585365d4f..a491f1e036 100644
--- a/engines/tinsel/events.h
+++ b/engines/tinsel/events.h
@@ -75,7 +75,7 @@ enum PLR_EVENT {
PLR_SRIGHT = PLR_LOOK,
PLR_DRIGHT = PLR_NOEVENT,
PLR_UNKNOWN = PLR_NOEVENT
-} ;
+};
diff --git a/engines/tinsel/palette.cpp b/engines/tinsel/palette.cpp
index 438f077f4f..7cc6564832 100644
--- a/engines/tinsel/palette.cpp
+++ b/engines/tinsel/palette.cpp
@@ -631,7 +631,7 @@ void DimPartPalette(SCNHANDLE hDimPal, int startColour, int length, int brightne
if (startColour + length > pPalQ->numColours)
error("DimPartPalette(): colour overrun");
- for (iColour = startColour ; iColour < startColour + length; iColour++) {
+ for (iColour = startColour; iColour < startColour + length; iColour++) {
pPalQ->palRGB[iColour] = DimColour(pDimPal->palRGB[iColour], brightness);
}
diff --git a/engines/tinsel/sched.cpp b/engines/tinsel/sched.cpp
index 939b5f4245..427e28826f 100644
--- a/engines/tinsel/sched.cpp
+++ b/engines/tinsel/sched.cpp
@@ -288,7 +288,8 @@ void Scheduler::giveWay(PPROCESS pReSchedProc) {
PPROCESS pEnd;
// Find the last process in the list.
- for (pEnd = pCurrent; pEnd->pNext != NULL; pEnd = pEnd->pNext) ;
+ for (pEnd = pCurrent; pEnd->pNext != NULL; pEnd = pEnd->pNext)
+ ;
assert(pEnd->pNext == NULL);
diff --git a/engines/toon/movie.h b/engines/toon/movie.h
index 7dc4568042..2a9173850f 100644
--- a/engines/toon/movie.h
+++ b/engines/toon/movie.h
@@ -36,7 +36,7 @@ public:
ToonstruckSmackerDecoder(Audio::Mixer *mixer, Audio::Mixer::SoundType soundType = Audio::Mixer::kSFXSoundType);
virtual ~ToonstruckSmackerDecoder() {}
void handleAudioTrack(byte track, uint32 chunkSize, uint32 unpackedSize);
- bool loadFile(const Common::String &filename, int forcedflags) ;
+ bool loadFile(const Common::String &filename, int forcedflags);
bool isLowRes() { return _lowRes; }
protected:
bool _lowRes;
diff --git a/engines/toon/toon.h b/engines/toon/toon.h
index 0627674cd6..f3370aed5e 100644
--- a/engines/toon/toon.h
+++ b/engines/toon/toon.h
@@ -179,8 +179,8 @@ public:
Common::String getSavegameName(int nr);
bool loadGame(int32 slot);
bool saveGame(int32 slot, Common::String saveGameDesc);
- void fadeIn(int32 numFrames) ;
- void fadeOut(int32 numFrames) ;
+ void fadeIn(int32 numFrames);
+ void fadeOut(int32 numFrames);
void initCharacter(int32 characterId, int32 animScriptId, int32 animToPlayId, int32 sceneAnimationId);
int32 handleInventoryOnFlux(int32 itemId);
int32 handleInventoryOnInventory(int32 itemDest, int32 itemSrc);