aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorAdrian Frühwirth2018-04-22 00:49:39 +0200
committerAdrian Frühwirth2018-04-22 00:56:21 +0200
commita20f90cbb7bfd61ee32ccd32603766de02c03ac8 (patch)
tree584197b20b101d746b64a20e3f1073b4b8808bb7 /engines
parentdd425413b5c69861fffe0071e6ca74b33a78c341 (diff)
downloadscummvm-rg350-a20f90cbb7bfd61ee32ccd32603766de02c03ac8.tar.gz
scummvm-rg350-a20f90cbb7bfd61ee32ccd32603766de02c03ac8.tar.bz2
scummvm-rg350-a20f90cbb7bfd61ee32ccd32603766de02c03ac8.zip
JANITORIAL: Fix formatting
Diffstat (limited to 'engines')
-rw-r--r--engines/access/scripts.cpp2
-rw-r--r--engines/adl/graphics.cpp2
-rw-r--r--engines/avalanche/dropdown.cpp4
-rw-r--r--engines/bladerunner/script/ai/generic_walker_a.cpp3
-rw-r--r--engines/bladerunner/script/ai/generic_walker_b.cpp3
-rw-r--r--engines/bladerunner/script/ai/generic_walker_c.cpp3
-rw-r--r--engines/bladerunner/ui/ui_scroll_box.cpp3
-rw-r--r--engines/cryo/eden.cpp2
-rw-r--r--engines/cryo/video.cpp2
-rw-r--r--engines/dm/menus.cpp4
-rw-r--r--engines/hopkins/computer.cpp4
-rw-r--r--engines/hopkins/dialogs.cpp4
-rw-r--r--engines/hopkins/font.cpp4
-rw-r--r--engines/hopkins/hopkins.cpp44
-rw-r--r--engines/hopkins/objects.cpp4
-rw-r--r--engines/hopkins/talk.cpp16
-rw-r--r--engines/lilliput/script.cpp7
-rw-r--r--engines/sci/event.cpp2
-rw-r--r--engines/sherlock/sherlock.cpp4
-rw-r--r--engines/sludge/movie.cpp3
-rw-r--r--engines/supernova/state.cpp8
-rw-r--r--engines/tinsel/multiobj.cpp9
-rw-r--r--engines/tony/mpal/lzo.cpp12
-rw-r--r--engines/toon/flux.cpp3
-rw-r--r--engines/touche/touche.cpp3
-rw-r--r--engines/voyeur/files_threads.cpp2
-rw-r--r--engines/xeen/party.cpp12
27 files changed, 81 insertions, 88 deletions
diff --git a/engines/access/scripts.cpp b/engines/access/scripts.cpp
index d8f2ab492d..a0b4ef68ee 100644
--- a/engines/access/scripts.cpp
+++ b/engines/access/scripts.cpp
@@ -152,7 +152,7 @@ void Scripts::searchForSequence() {
_data->seek(0);
int sequenceId;
do {
- while (_data->readByte() != SCRIPT_START_BYTE);
+ while (_data->readByte() != SCRIPT_START_BYTE) {}
sequenceId = _data->readUint16LE();
} while (sequenceId != _sequence);
}
diff --git a/engines/adl/graphics.cpp b/engines/adl/graphics.cpp
index 0f80bac988..2fcd1473a0 100644
--- a/engines/adl/graphics.cpp
+++ b/engines/adl/graphics.cpp
@@ -350,7 +350,7 @@ void GraphicsMan_v2::fillAt(Common::Point p, const byte pattern) {
const bool stopBit = !_display.getPixelBit(p);
// Move up into the open space above p
- while (--p.y >= _bounds.top && canFillAt(p, stopBit));
+ while (--p.y >= _bounds.top && canFillAt(p, stopBit)) {}
// Then fill by moving down
while (++p.y < _bounds.bottom && canFillAt(p, stopBit))
diff --git a/engines/avalanche/dropdown.cpp b/engines/avalanche/dropdown.cpp
index 97adfc2581..ba4e452aaa 100644
--- a/engines/avalanche/dropdown.cpp
+++ b/engines/avalanche/dropdown.cpp
@@ -684,9 +684,9 @@ void DropDownMenu::update() {
Common::Point cursorPos = _vm->getMousePos();
while (!_activeMenuItem._activeNow && (cursorPos.y <= 21) && _vm->_holdLeftMouse) {
_menuBar.chooseMenuItem(cursorPos.x);
- do
+ do {
_vm->updateEvents();
- while (_vm->_holdLeftMouse && !_vm->shouldQuit());
+ } while (_vm->_holdLeftMouse && !_vm->shouldQuit());
while (!_vm->shouldQuit()) {
do {
diff --git a/engines/bladerunner/script/ai/generic_walker_a.cpp b/engines/bladerunner/script/ai/generic_walker_a.cpp
index 84f7febc05..0ba48811ed 100644
--- a/engines/bladerunner/script/ai/generic_walker_a.cpp
+++ b/engines/bladerunner/script/ai/generic_walker_a.cpp
@@ -354,8 +354,7 @@ bool AIScriptGenericWalkerA::prepareWalker() {
} else {
model = Random_Query(0, 5);
}
- }
- while (model == Global_Variable_Query(kVariableGenericWalkerBModel) || model == Global_Variable_Query(kVariableGenericWalkerCModel));
+ } while (model == Global_Variable_Query(kVariableGenericWalkerBModel) || model == Global_Variable_Query(kVariableGenericWalkerCModel));
Global_Variable_Set(kVariableGenericWalkerAModel, model);
Game_Flag_Set(kFlagGenericWalkerWaiting);
diff --git a/engines/bladerunner/script/ai/generic_walker_b.cpp b/engines/bladerunner/script/ai/generic_walker_b.cpp
index cfa9e0470e..2a6c3a1732 100644
--- a/engines/bladerunner/script/ai/generic_walker_b.cpp
+++ b/engines/bladerunner/script/ai/generic_walker_b.cpp
@@ -330,8 +330,7 @@ bool AIScriptGenericWalkerB::prepareWalker() {
} else {
model = Random_Query(0, 5);
}
- }
- while (model == Global_Variable_Query(kVariableGenericWalkerAModel) || model == Global_Variable_Query(kVariableGenericWalkerCModel));
+ } while (model == Global_Variable_Query(kVariableGenericWalkerAModel) || model == Global_Variable_Query(kVariableGenericWalkerCModel));
Global_Variable_Set(kVariableGenericWalkerBModel, model);
Game_Flag_Set(kFlagGenericWalkerWaiting);
diff --git a/engines/bladerunner/script/ai/generic_walker_c.cpp b/engines/bladerunner/script/ai/generic_walker_c.cpp
index 6979be8e1f..5c0478c645 100644
--- a/engines/bladerunner/script/ai/generic_walker_c.cpp
+++ b/engines/bladerunner/script/ai/generic_walker_c.cpp
@@ -331,9 +331,8 @@ bool AIScriptGenericWalkerC::prepareWalker() {
} else {
model = Random_Query(0, 5);
}
- }
// Here is probably bug in original code, because it not using kVariableGenericWalkerBModel but kVariableGenericWalkerCModel
- while (model == Global_Variable_Query(kVariableGenericWalkerAModel) || model == Global_Variable_Query(kVariableGenericWalkerBModel));
+ } while (model == Global_Variable_Query(kVariableGenericWalkerAModel) || model == Global_Variable_Query(kVariableGenericWalkerBModel));
Global_Variable_Set(kVariableGenericWalkerCModel, model);
diff --git a/engines/bladerunner/ui/ui_scroll_box.cpp b/engines/bladerunner/ui/ui_scroll_box.cpp
index 8621039dd6..a030e534c5 100644
--- a/engines/bladerunner/ui/ui_scroll_box.cpp
+++ b/engines/bladerunner/ui/ui_scroll_box.cpp
@@ -490,8 +490,7 @@ void UIScrollBox::draw(Graphics::Surface &surface) {
y2 += kLineHeight;
y += kLineHeight;
++i;
- }
- while (i < lastLineVisible);
+ } while (i < lastLineVisible);
}
// draw scroll up button
diff --git a/engines/cryo/eden.cpp b/engines/cryo/eden.cpp
index 220b4bbb41..7ea23143c1 100644
--- a/engines/cryo/eden.cpp
+++ b/engines/cryo/eden.cpp
@@ -2321,7 +2321,7 @@ void EdenGame::my_bulle() {
} else if (c >= 0x80 && c < 0x90)
SysBeep(1);
else if (c >= 0x90 && c < 0xA0) {
- while (*textPtr++ != 0xFF);
+ while (*textPtr++ != 0xFF) {}
textPtr--;
} else if (c >= 0xA0 && c < 0xC0)
_globals->_textToken1 = c & 0xF;
diff --git a/engines/cryo/video.cpp b/engines/cryo/video.cpp
index fe242425e5..fe8afb7ce8 100644
--- a/engines/cryo/video.cpp
+++ b/engines/cryo/video.cpp
@@ -102,7 +102,7 @@ void HnmPlayer::waitLoop() {
_nextFrameTime = _expectedFrameTime - _timeDrift;
if (_useSoundSync && _vm->_timerTicks > 1000.0 + _nextFrameTime)
_useSound = false;
- while (_vm->_timerTicks < _nextFrameTime) ; // waste time
+ while (_vm->_timerTicks < _nextFrameTime) {} // waste time
_timeDrift = _vm->_timerTicks - _nextFrameTime;
}
diff --git a/engines/dm/menus.cpp b/engines/dm/menus.cpp
index 7626cb0425..f547bbe934 100644
--- a/engines/dm/menus.cpp
+++ b/engines/dm/menus.cpp
@@ -733,9 +733,9 @@ Spell *MenuMan::getSpellFromSymbols(byte *symbols) {
if (*(symbols + 1)) {
int16 bitShiftCount = 24;
int32 curSymbols = 0;
- do
+ do {
curSymbols |= (long)*symbols++ << bitShiftCount;
- while (*symbols && ((bitShiftCount -= 8) >= 0));
+ } while (*symbols && ((bitShiftCount -= 8) >= 0));
Spell *curSpell = SpellsArray;
int16 spellIndex = 25;
while (spellIndex--) {
diff --git a/engines/hopkins/computer.cpp b/engines/hopkins/computer.cpp
index 16977e0cb8..aff3c914f6 100644
--- a/engines/hopkins/computer.cpp
+++ b/engines/hopkins/computer.cpp
@@ -918,9 +918,9 @@ void ComputerManager::getScoreName() {
char score[16];
sprintf(score, "%d", _breakoutScore);
int scoreLen = 0;
- do
+ do {
++scoreLen;
- while (score[scoreLen]);
+ } while (score[scoreLen]);
for (int i = scoreLen - 1, scorePos = 8; i >= 0; i--) {
_score[scoreLine]._score.setChar(score[i], scorePos--);
diff --git a/engines/hopkins/dialogs.cpp b/engines/hopkins/dialogs.cpp
index b8f1c73304..cabdc9e9ea 100644
--- a/engines/hopkins/dialogs.cpp
+++ b/engines/hopkins/dialogs.cpp
@@ -448,9 +448,9 @@ void DialogsManager::showInventory() {
_vm->_script->_tempObjectFl = false;
if (_vm->_soundMan->_voiceOffFl) {
- do
+ do {
_vm->_events->refreshScreenAndEvents();
- while (!_vm->_globals->_exitId && _vm->_events->getMouseButton() != 1);
+ } while (!_vm->_globals->_exitId && _vm->_events->getMouseButton() != 1);
_vm->_fontMan->hideText(9);
}
if (_vm->_globals->_exitId) {
diff --git a/engines/hopkins/font.cpp b/engines/hopkins/font.cpp
index 7d57f564a9..9d11c5a940 100644
--- a/engines/hopkins/font.cpp
+++ b/engines/hopkins/font.cpp
@@ -281,9 +281,9 @@ void FontManager::box(int idx, int messageId, const Common::String &filename, in
int ptrb = _boxWidth - 4;
for (;;) {
lineSize = curLineSize;
- do
+ do {
curChar = _tempText[tempTextIdx + curLineSize++];
- while (curChar != ' ' && curChar != '%');
+ } while (curChar != ' ' && curChar != '%');
if (curLineSize >= ptrb / _fontFixedWidth) {
if (curChar == '%')
curChar = ' ';
diff --git a/engines/hopkins/hopkins.cpp b/engines/hopkins/hopkins.cpp
index f28de39827..dd64c0cc71 100644
--- a/engines/hopkins/hopkins.cpp
+++ b/engines/hopkins/hopkins.cpp
@@ -314,9 +314,9 @@ bool HopkinsEngine::runWin95Demo() {
_graphicsMan->loadImage("ENDUK");
_graphicsMan->fadeInLong();
_events->mouseOn();
- do
+ do {
_events->refreshScreenAndEvents();
- while (_events->getMouseButton() != 1);
+ } while (_events->getMouseButton() != 1);
_graphicsMan->fadeOutLong();
restoreSystem();
} else
@@ -2047,9 +2047,9 @@ void HopkinsEngine::playUnderwaterBaseCutscene() {
_graphicsMan->fadeInLong();
_objectsMan->enableHidingBehavior();
- do
+ do {
_events->refreshScreenAndEvents();
- while (!shouldQuit() && _objectsMan->getBobAnimDataIdx(8) != 22);
+ } while (!shouldQuit() && _objectsMan->getBobAnimDataIdx(8) != 22);
if (!shouldQuit()) {
_graphicsMan->fadeOutLong();
@@ -2092,9 +2092,9 @@ void HopkinsEngine::playEnding() {
_graphicsMan->fadeInLong();
_globals->_eventMode = EVENTMODE_IGNORE;
- do
+ do {
_events->refreshScreenAndEvents();
- while (_objectsMan->getBobAnimDataIdx(6) != 54);
+ } while (_objectsMan->getBobAnimDataIdx(6) != 54);
_globals->_introSpeechOffFl = true;
_talkMan->startAnimatedCharacterDialogue("GM4.PE2");
@@ -2104,38 +2104,38 @@ void HopkinsEngine::playEnding() {
_objectsMan->setBobAnimation(9);
_objectsMan->setBobAnimation(7);
- do
+ do {
_events->refreshScreenAndEvents();
- while (_objectsMan->getBobAnimDataIdx(7) != 54);
+ } while (_objectsMan->getBobAnimDataIdx(7) != 54);
_soundMan->playSample(1);
- do
+ do {
_events->refreshScreenAndEvents();
- while (_objectsMan->getBobAnimDataIdx(7) != 65);
+ } while (_objectsMan->getBobAnimDataIdx(7) != 65);
_globals->_introSpeechOffFl = true;
_talkMan->startAnimatedCharacterDialogue("DUELB4.PE2");
_events->mouseOff();
_globals->_disableInventFl = true;
- do
+ do {
_events->refreshScreenAndEvents();
- while (_objectsMan->getBobAnimDataIdx(7) != 72);
+ } while (_objectsMan->getBobAnimDataIdx(7) != 72);
_globals->_introSpeechOffFl = true;
_talkMan->startAnimatedCharacterDialogue("DUELH1.PE2");
- do
+ do {
_events->refreshScreenAndEvents();
- while (_objectsMan->getBobAnimDataIdx(7) != 81);
+ } while (_objectsMan->getBobAnimDataIdx(7) != 81);
_globals->_introSpeechOffFl = true;
_talkMan->startAnimatedCharacterDialogue("DUELB5.PE2");
- do
+ do {
_events->refreshScreenAndEvents();
- while (_objectsMan->getBobAnimDataIdx(7) != 120);
+ } while (_objectsMan->getBobAnimDataIdx(7) != 120);
_objectsMan->stopBobAnimation(7);
if (_globals->_saveData->_data[svGameWonFl] == 1) {
@@ -2150,9 +2150,9 @@ void HopkinsEngine::playEnding() {
_events->_rateCounter = 0;
if (!_events->_escKeyFl) {
- do
+ do {
_events->refreshEvents();
- while (_events->_rateCounter < 2000 / _globals->_speed && !_events->_escKeyFl);
+ } while (_events->_rateCounter < 2000 / _globals->_speed && !_events->_escKeyFl);
}
_events->_escKeyFl = false;
_graphicsMan->fadeOutLong();
@@ -2184,15 +2184,15 @@ void HopkinsEngine::playEnding() {
_talkMan->startAnimatedCharacterDialogue("GM5.PE2");
_globals->_disableInventFl = true;
- do
+ do {
_events->refreshScreenAndEvents();
- while (_objectsMan->getBobAnimDataIdx(8) != 5);
+ } while (_objectsMan->getBobAnimDataIdx(8) != 5);
_soundMan->directPlayWav("SOUND41.WAV");
- do
+ do {
_events->refreshScreenAndEvents();
- while (_objectsMan->getBobAnimDataIdx(8) != 21);
+ } while (_objectsMan->getBobAnimDataIdx(8) != 21);
_graphicsMan->fadeOutLong();
_graphicsMan->endDisplayBob();
diff --git a/engines/hopkins/objects.cpp b/engines/hopkins/objects.cpp
index b54b21bbc9..d67cd7b60c 100644
--- a/engines/hopkins/objects.cpp
+++ b/engines/hopkins/objects.cpp
@@ -2761,9 +2761,9 @@ void ObjectsManager::handleSpecialGames() {
break;
_vm->_globals->_disableInventFl = true;
- do
+ do {
_vm->_events->refreshScreenAndEvents();
- while (getBobAnimDataIdx(8) != 3);
+ } while (getBobAnimDataIdx(8) != 3);
_vm->_globals->_introSpeechOffFl = true;
_vm->_talkMan->startAnimatedCharacterDialogue("GM3.PE2");
stopBobAnimation(8);
diff --git a/engines/hopkins/talk.cpp b/engines/hopkins/talk.cpp
index 00c4ab0332..f3cd6bd026 100644
--- a/engines/hopkins/talk.cpp
+++ b/engines/hopkins/talk.cpp
@@ -120,9 +120,9 @@ void TalkManager::startAnimatedCharacterDialogue(const Common::String &filename)
if (_vm->_globals->_introSpeechOffFl) {
int idx = 1;
int answer;
- do
+ do {
answer = dialogAnswer(idx++, false);
- while (answer != -1);
+ } while (answer != -1);
}
clearCharacterAnim();
_vm->_globals->_introSpeechOffFl = false;
@@ -208,9 +208,9 @@ void TalkManager::startStaticCharacterDialogue(const Common::String &filename) {
if (_vm->_globals->_introSpeechOffFl) {
int idx = 1;
int answer;
- do
+ do {
answer = dialogAnswer(idx++, true);
- while (answer != -1);
+ } while (answer != -1);
}
_characterBuffer = _vm->_globals->freeMemory(_characterBuffer);
@@ -879,9 +879,9 @@ void TalkManager::handleForestAnswser(int zone, int verb) {
_vm->_objectsMan->setBobAnimation(6);
_vm->_soundMan->playSample(1);
_vm->_objectsMan->showSpecialActionAnimation(_vm->_objectsMan->_forestSprite, "13,14,15,14,13,12,13,14,15,16,-1,", 4);
- do
+ do {
_vm->_events->refreshScreenAndEvents();
- while (_vm->_objectsMan->getBobAnimDataIdx(6) < 12);
+ } while (_vm->_objectsMan->getBobAnimDataIdx(6) < 12);
_vm->_objectsMan->stopBobAnimation(6);
_vm->_objectsMan->setBobAnimation(8);
@@ -927,9 +927,9 @@ void TalkManager::handleForestAnswser(int zone, int verb) {
_vm->_objectsMan->setBobAnimation(5);
_vm->_soundMan->playSample(1);
_vm->_objectsMan->showSpecialActionAnimation(_vm->_objectsMan->_forestSprite, "13,14,15,14,13,12,13,14,15,16,-1,", 4);
- do
+ do {
_vm->_events->refreshScreenAndEvents();
- while (_vm->_objectsMan->getBobAnimDataIdx(5) < 12);
+ } while (_vm->_objectsMan->getBobAnimDataIdx(5) < 12);
_vm->_objectsMan->stopBobAnimation(5);
_vm->_objectsMan->setBobAnimation(7);
switch (_vm->_globals->_screenId) {
diff --git a/engines/lilliput/script.cpp b/engines/lilliput/script.cpp
index 4202a28f14..10c41ee002 100644
--- a/engines/lilliput/script.cpp
+++ b/engines/lilliput/script.cpp
@@ -1231,8 +1231,7 @@ void LilliputScript::listAllTexts() {
warning("Text 0x%x variant %d : %s", i, j, _vm->_displayStringBuf);
do {
++it;
- }
- while (_vm->_packedStrings[index + variantCount + it] != 0x5B);
+ } while (_vm->_packedStrings[index + variantCount + it] != 0x5B);
}
} else {*/
decodePackedText(&_vm->_packedStrings[index + variantCount]);
@@ -1259,9 +1258,9 @@ void LilliputScript::startSpeech(int speechId) {
int tmpVal = _vm->_rnd->getRandomNumber(count);
if (tmpVal != 0) {
for (int j = 0; j < tmpVal; j++) {
- do
+ do {
++i;
- while (_vm->_packedStrings[index + count + i] != ']');
+ } while (_vm->_packedStrings[index + count + i] != ']');
++i;
}
}
diff --git a/engines/sci/event.cpp b/engines/sci/event.cpp
index aef84e212d..ab56311cd6 100644
--- a/engines/sci/event.cpp
+++ b/engines/sci/event.cpp
@@ -418,7 +418,7 @@ SciEvent EventManager::getSciEvent(SciEventType mask) {
void EventManager::flushEvents() {
Common::EventManager *em = g_system->getEventManager();
Common::Event event;
- while (em->pollEvent(event));
+ while (em->pollEvent(event)) {}
_events.clear();
}
diff --git a/engines/sherlock/sherlock.cpp b/engines/sherlock/sherlock.cpp
index c6b38f78d7..fcc092f017 100644
--- a/engines/sherlock/sherlock.cpp
+++ b/engines/sherlock/sherlock.cpp
@@ -137,9 +137,9 @@ Common::Error SherlockEngine::run() {
_saves->loadGame(_loadGameSlot);
_loadGameSlot = -1;
} else {
- do
+ do {
showOpening();
- while (!shouldQuit() && !_interactiveFl);
+ } while (!shouldQuit() && !_interactiveFl);
}
while (!shouldQuit()) {
diff --git a/engines/sludge/movie.cpp b/engines/sludge/movie.cpp
index 271728da75..2c43c3cceb 100644
--- a/engines/sludge/movie.cpp
+++ b/engines/sludge/movie.cpp
@@ -911,7 +911,8 @@ int playMovie(int fileNumber) {
glBindFramebuffer(GL_FRAMEBUFFER, old_fbo);
movieIsPlaying = nothing;
- for (int i = 0; i < 10; i++) Wait_Frame();
+ for (int i = 0; i < 10; i++)
+ Wait_Frame();
huntKillFreeSound(fileNumber);
if (vpx_codec_destroy(&codec))
diff --git a/engines/supernova/state.cpp b/engines/supernova/state.cpp
index 00a35055b7..f50d665000 100644
--- a/engines/supernova/state.cpp
+++ b/engines/supernova/state.cpp
@@ -876,9 +876,9 @@ void GameManager::telomat(int nr) {
_vm->renderBox(0, 0, 320, 200, kColorDarkBlue);
_vm->renderText(kStringTelomat12, 50, 80, kColorGreen);
_vm->renderText(kStringTelomat13, 50, 91, kColorGreen);
- do
+ do {
edit(input, 50, 105, 30);
- while ((_key.keycode != Common::KEYCODE_RETURN) && (_key.keycode != Common::KEYCODE_ESCAPE));
+ } while ((_key.keycode != Common::KEYCODE_RETURN) && (_key.keycode != Common::KEYCODE_ESCAPE));
if (_key.keycode == Common::KEYCODE_ESCAPE) {
_vm->renderBox(0, 0, 320, 200, kColorBlack);
@@ -966,9 +966,9 @@ void GameManager::telomat(int nr) {
_vm->renderBox(0, 0, 320, 200, kColorDarkBlue);
_vm->renderText(kStringTelomat21, 100, 90, kColorGreen);
input = "";
- do
+ do {
edit(input, 100, 105, 30);
- while ((_key.keycode != Common::KEYCODE_RETURN) && (_key.keycode != Common::KEYCODE_ESCAPE));
+ } while ((_key.keycode != Common::KEYCODE_RETURN) && (_key.keycode != Common::KEYCODE_ESCAPE));
if (_key.keycode == Common::KEYCODE_RETURN) {
_vm->renderText(kStringShipSleepCabin9, 100, 120, kColorGreen);
diff --git a/engines/tinsel/multiobj.cpp b/engines/tinsel/multiobj.cpp
index 75894aea89..2cd46ae90b 100644
--- a/engines/tinsel/multiobj.cpp
+++ b/engines/tinsel/multiobj.cpp
@@ -122,8 +122,7 @@ void MultiDeleteObject(OBJECT **pObjList, OBJECT *pMultiObj) {
// next obj in list
pMultiObj = pMultiObj->pSlave;
- }
- while (pMultiObj != NULL);
+ } while (pMultiObj != NULL);
}
/**
@@ -180,8 +179,7 @@ void MultiVerticalFlip(OBJECT *pFlipObj) {
// next obj in list
pFlipObj = pFlipObj->pSlave;
- }
- while (pFlipObj != NULL);
+ } while (pFlipObj != NULL);
}
/**
@@ -351,8 +349,7 @@ void MultiSetZPosition(OBJECT *pMultiObj, int newZ) {
// next obj in list
pMultiObj = pMultiObj->pSlave;
- }
- while (pMultiObj != NULL);
+ } while (pMultiObj != NULL);
}
/**
diff --git a/engines/tony/mpal/lzo.cpp b/engines/tony/mpal/lzo.cpp
index b9accb6c89..1bb54af1f0 100644
--- a/engines/tony/mpal/lzo.cpp
+++ b/engines/tony/mpal/lzo.cpp
@@ -94,9 +94,9 @@ int lzo1x_decompress(const byte *in, uint32 in_len, byte *out, uint32 *out_len)
if (t < 4)
goto match_next;
assert(t > 0);
- do
+ do {
*op++ = *ip++;
- while (--t > 0);
+ } while (--t > 0);
goto first_literal_run;
}
@@ -116,9 +116,9 @@ int lzo1x_decompress(const byte *in, uint32 in_len, byte *out, uint32 *out_len)
*op++ = *ip++;
*op++ = *ip++;
*op++ = *ip++;
- do
+ do {
*op++ = *ip++;
- while (--t > 0);
+ } while (--t > 0);
first_literal_run:
t = *ip++;
@@ -186,9 +186,9 @@ match:
copy_match:
*op++ = *m_pos++;
*op++ = *m_pos++;
- do
+ do {
*op++ = *m_pos++;
- while (--t > 0);
+ } while (--t > 0);
}
match_done:
diff --git a/engines/toon/flux.cpp b/engines/toon/flux.cpp
index 14218ba4ef..65ad66ffd8 100644
--- a/engines/toon/flux.cpp
+++ b/engines/toon/flux.cpp
@@ -86,8 +86,7 @@ int32 CharacterFlux::fixFacingForAnimation(int32 originalFacing, int32 animation
}
v5 >>= 1;
v6 <<= 1;
- }
- while (!facingMask);
+ } while (!facingMask);
int32 finalFacing = 0;
for (finalFacing = 0; ; ++finalFacing) {
diff --git a/engines/touche/touche.cpp b/engines/touche/touche.cpp
index 15bcbbc0fc..4414ed1918 100644
--- a/engines/touche/touche.cpp
+++ b/engines/touche/touche.cpp
@@ -1370,7 +1370,8 @@ int ToucheEngine::getStringWidth(int num) const {
debug("stringwidth: %s", str);
debugN("raw:");
const char *p = str;
- while (*p) debugN(" %02X", (unsigned char)*p++);
+ while (*p)
+ debugN(" %02X", (unsigned char)*p++);
debugN("\n");
}
return Graphics::getStringWidth16(str);
diff --git a/engines/voyeur/files_threads.cpp b/engines/voyeur/files_threads.cpp
index 9e55b99ca1..af8753c488 100644
--- a/engines/voyeur/files_threads.cpp
+++ b/engines/voyeur/files_threads.cpp
@@ -864,7 +864,7 @@ const byte *ThreadResource::cardPerform(const byte *card) {
if (cardPerform2(card, id)) {
card += subId;
card = cardPerform(card);
- while (*card++ != 61);
+ while (*card++ != 61) {}
} else {
card += subId;
while (*card != 61 && *card != 29)
diff --git a/engines/xeen/party.cpp b/engines/xeen/party.cpp
index 94ba964428..0d4cd29881 100644
--- a/engines/xeen/party.cpp
+++ b/engines/xeen/party.cpp
@@ -1202,28 +1202,28 @@ bool Party::giveTake(int takeMode, uint takeVal, int giveMode, uint giveVal, int
_questItems[giveVal - MISC_END]++;
}
if (giveVal < WEAPONS_END || giveVal >= MISC_END) {
- for (idx = 0; idx < MAX_TREASURE_ITEMS && !_treasure._weapons[idx].empty(); ++idx);
+ for (idx = 0; idx < MAX_TREASURE_ITEMS && !_treasure._weapons[idx].empty(); ++idx) {}
if (idx < MAX_TREASURE_ITEMS) {
_treasure._weapons[idx]._id = giveVal;
_treasure._hasItems = true;
return false;
}
} else if (giveVal < ARMOR_END) {
- for (idx = 0; idx < MAX_TREASURE_ITEMS && !_treasure._armor[idx].empty(); ++idx);
+ for (idx = 0; idx < MAX_TREASURE_ITEMS && !_treasure._armor[idx].empty(); ++idx) {}
if (idx < MAX_TREASURE_ITEMS) {
_treasure._armor[idx]._id = giveVal - WEAPONS_END;
_treasure._hasItems = true;
return false;
}
} else if (giveVal < ACCESSORIES_END) {
- for (idx = 0; idx < MAX_TREASURE_ITEMS && !_treasure._accessories[idx].empty(); ++idx);
+ for (idx = 0; idx < MAX_TREASURE_ITEMS && !_treasure._accessories[idx].empty(); ++idx) {}
if (idx < MAX_TREASURE_ITEMS) {
_treasure._accessories[idx]._id = giveVal - ARMOR_END;
_treasure._hasItems = true;
return false;
}
} else {
- for (idx = 0; idx < MAX_TREASURE_ITEMS && _treasure._misc[idx]._material; ++idx);
+ for (idx = 0; idx < MAX_TREASURE_ITEMS && _treasure._misc[idx]._material; ++idx) {}
if (idx < MAX_TREASURE_ITEMS) {
_treasure._accessories[idx]._material = giveVal - ACCESSORIES_END;
_treasure._hasItems = true;
@@ -1357,7 +1357,7 @@ bool Party::giveTake(int takeMode, uint takeVal, int giveMode, uint giveVal, int
Character &tempChar = _itemsCharacter;
int idx = -1;
if (scripts._itemType != 0) {
- for (idx = 0; idx < 10 && _treasure._misc[idx]._material; ++idx);
+ for (idx = 0; idx < 10 && _treasure._misc[idx]._material; ++idx) {}
if (idx == 10)
return true;
}
@@ -1368,7 +1368,7 @@ bool Party::giveTake(int takeMode, uint takeVal, int giveMode, uint giveVal, int
XeenItem *trItems = _treasure[itemCat];
// Check for a free treasure slot
- for (idx = 0; idx < 10 && trItems[idx]._id; ++idx);
+ for (idx = 0; idx < 10 && trItems[idx]._id; ++idx) {}
if (idx == 10)
return true;