aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMax Horn2007-09-18 20:16:33 +0000
committerMax Horn2007-09-18 20:16:33 +0000
commit3abc11611e1d1d93f1cf794df28879de3571bd01 (patch)
treee1ac8a925d1388f8df010a114d7bed471fc9fe3b /engines
parentc3d3aebe87d16d4fc3b7ac8581b99fb97241c9ac (diff)
downloadscummvm-rg350-3abc11611e1d1d93f1cf794df28879de3571bd01.tar.gz
scummvm-rg350-3abc11611e1d1d93f1cf794df28879de3571bd01.tar.bz2
scummvm-rg350-3abc11611e1d1d93f1cf794df28879de3571bd01.zip
Code formatting fixes
svn-id: r28945
Diffstat (limited to 'engines')
-rw-r--r--engines/agi/op_cmd.cpp2
-rw-r--r--engines/agi/picture.cpp2
-rw-r--r--engines/agi/preagi_winnie.cpp6
-rw-r--r--engines/agos/agos.cpp2
-rw-r--r--engines/agos/items.cpp2
-rw-r--r--engines/agos/saveload.cpp4
-rw-r--r--engines/cruise/background.cpp4
-rw-r--r--engines/cruise/backgroundIncrust.cpp2
-rw-r--r--engines/cruise/cell.cpp2
-rw-r--r--engines/cruise/cruise_main.cpp26
-rw-r--r--engines/cruise/ctp.cpp8
-rw-r--r--engines/cruise/decompiler.cpp6
-rw-r--r--engines/cruise/function.cpp2
-rw-r--r--engines/cruise/gfxModule.cpp56
-rw-r--r--engines/cruise/mainDraw.cpp4
-rw-r--r--engines/cruise/menu.cpp6
-rw-r--r--engines/cruise/mouse.cpp6
-rw-r--r--engines/cruise/overlay.cpp26
-rw-r--r--engines/cruise/volume.cpp2
-rw-r--r--engines/gob/coktelvideo.cpp2
-rw-r--r--engines/gob/inter_v3.cpp2
-rw-r--r--engines/kyra/sequences_v2.cpp8
-rw-r--r--engines/queen/queen.cpp4
-rw-r--r--engines/saga/actor_walk.cpp4
-rw-r--r--engines/saga/saveload.cpp4
-rw-r--r--engines/scumm/saveload.cpp4
-rw-r--r--engines/scumm/script_v5.cpp4
-rw-r--r--engines/scumm/verbs.cpp2
-rw-r--r--engines/touche/touche.cpp2
-rw-r--r--engines/touche/ui.cpp6
30 files changed, 105 insertions, 105 deletions
diff --git a/engines/agi/op_cmd.cpp b/engines/agi/op_cmd.cpp
index 588ee1dd30..5097b43c08 100644
--- a/engines/agi/op_cmd.cpp
+++ b/engines/agi/op_cmd.cpp
@@ -994,7 +994,7 @@ cmd(version) {
/* insert our version into the other version */
len = strlen(verMsg);
gap = r - q;
- if(gap < 0)
+ if (gap < 0)
gap = 0;
else
gap = (gap - len) / 2;
diff --git a/engines/agi/picture.cpp b/engines/agi/picture.cpp
index 006348f433..7df391104d 100644
--- a/engines/agi/picture.cpp
+++ b/engines/agi/picture.cpp
@@ -99,7 +99,7 @@ void PictureMgr::drawLine(int x1, int y1, int x2, int y2) {
int i, x, y, deltaX, deltaY, stepX, stepY, errorX, errorY, detdelta;
/* CM: Do clipping */
-#define clip(x, y) if((x)>=(y)) (x)=(y)
+#define clip(x, y) if ((x)>=(y)) (x)=(y)
clip(x1, _width - 1);
clip(x2, _width - 1);
clip(y1, _height - 1);
diff --git a/engines/agi/preagi_winnie.cpp b/engines/agi/preagi_winnie.cpp
index 8d60f0861e..28ccec294e 100644
--- a/engines/agi/preagi_winnie.cpp
+++ b/engines/agi/preagi_winnie.cpp
@@ -664,14 +664,14 @@ void Winnie::incMenuSel(int *iSel, int fCanSel[]) {
do {
*iSel += 1;
if (*iSel > IDI_WTP_SEL_DROP) *iSel = IDI_WTP_SEL_OPT_1;
- } while(!fCanSel[*iSel]);
+ } while (!fCanSel[*iSel]);
}
void Winnie::decMenuSel(int *iSel, int fCanSel[]) {
do {
*iSel -= 1;
if (*iSel < IDI_WTP_SEL_OPT_1) *iSel = IDI_WTP_SEL_DROP;
- } while(!fCanSel[*iSel]);
+ } while (!fCanSel[*iSel]);
}
void Winnie::getMenuMouseSel(int *iSel, int fCanSel[], int x, int y) {
@@ -1046,7 +1046,7 @@ bool Winnie::getSelOkBack() {
}
void Winnie::clrMenuSel(int *iSel, int fCanSel[]) {
*iSel = IDI_WTP_SEL_OPT_1;
- while(!fCanSel[*iSel]) {
+ while (!fCanSel[*iSel]) {
*iSel += 1;
}
}
diff --git a/engines/agos/agos.cpp b/engines/agos/agos.cpp
index aa927b1dcd..92c6f952d6 100644
--- a/engines/agos/agos.cpp
+++ b/engines/agos/agos.cpp
@@ -969,7 +969,7 @@ int AGOSEngine::go() {
(getFeatures() & GF_DEMO)) {
int i;
- while(1) {
+ while (1) {
for (i = 0; i < 4; i++) {
setWindowImage(3, 9902 + i);
debug(0, "Displaying image %d", 9902 + i);
diff --git a/engines/agos/items.cpp b/engines/agos/items.cpp
index b2e722d681..b5fe745414 100644
--- a/engines/agos/items.cpp
+++ b/engines/agos/items.cpp
@@ -410,7 +410,7 @@ Item *AGOSEngine::findInByClass(Item *i, int16 m) {
Item *AGOSEngine::nextInByClass(Item *i, int16 m) {
i = _findNextPtr;
- while(i) {
+ while (i) {
if (i->classFlags & m) {
_findNextPtr = derefItem(i->next);
return i;
diff --git a/engines/agos/saveload.cpp b/engines/agos/saveload.cpp
index f7c2d4846f..da1aa92008 100644
--- a/engines/agos/saveload.cpp
+++ b/engines/agos/saveload.cpp
@@ -50,14 +50,14 @@ int AGOSEngine::countSaveGames() {
memset(marks, false, 256 * sizeof(bool)); //assume no savegames for this title
filenames = _saveFileMan->listSavefiles(prefix);
- for(Common::StringList::const_iterator file = filenames.begin(); file != filenames.end(); file++){
+ for (Common::StringList::const_iterator file = filenames.begin(); file != filenames.end(); file++){
//Obtain the last 3 digits of the filename, since they correspond to the save slot
slot[0] = file->c_str()[file->size()-3];
slot[1] = file->c_str()[file->size()-2];
slot[2] = file->c_str()[file->size()-1];
slotNum = atoi(slot);
- if(slotNum >= 0 && slotNum < 256)
+ if (slotNum >= 0 && slotNum < 256)
marks[slotNum] = true; //mark this slot as valid
}
diff --git a/engines/cruise/background.cpp b/engines/cruise/background.cpp
index f23c331eb8..b1ea1ed644 100644
--- a/engines/cruise/background.cpp
+++ b/engines/cruise/background.cpp
@@ -93,7 +93,7 @@ int loadBackground(char *name, int idx) {
printf("Loading BG: %s\n", name);
if (!backgroundPtrtable[idx]) {
- //if(!gfxModuleData.useEGA && !gfxModuleData.useVGA)
+ //if (!gfxModuleData.useEGA && !gfxModuleData.useVGA)
{
backgroundPtrtable[idx] =
(uint8 *) mallocAndZero(320 * 200 /*64000 */ );
@@ -174,7 +174,7 @@ int loadBackground(char *name, int idx) {
}
}
- //if(ptrToFree != gfxModuleData.pPage10)
+ //if (ptrToFree != gfxModuleData.pPage10)
// free(ptrToFree);
if (gfxModuleData.useEGA || gfxModuleData.useTandy) {
diff --git a/engines/cruise/backgroundIncrust.cpp b/engines/cruise/backgroundIncrust.cpp
index 7e79c048b1..4145ef0b44 100644
--- a/engines/cruise/backgroundIncrust.cpp
+++ b/engines/cruise/backgroundIncrust.cpp
@@ -125,7 +125,7 @@ backgroundIncrustStruct *addBackgroundIncrust(int16 overlayIdx,
(char *)filesDatabase[params.fileIdx].subData.ptr);
// ASSERT(0);
} else { // poly
- /* if(param4 == 1)
+ /* if (param4 == 1)
* {
* int var_A;
* int var_8;
diff --git a/engines/cruise/cell.cpp b/engines/cruise/cell.cpp
index d4b5aaed66..757327f1a0 100644
--- a/engines/cruise/cell.cpp
+++ b/engines/cruise/cell.cpp
@@ -37,7 +37,7 @@ void resetPtr(cellStruct *ptr) {
void freeMessageList(cellStruct *objPtr) {
/* if (objPtr) {
- if(objPtr->next)
+ if (objPtr->next)
free(objPtr->next);
free(objPtr);
diff --git a/engines/cruise/cruise_main.cpp b/engines/cruise/cruise_main.cpp
index b3b0077ee7..3558b4f18a 100644
--- a/engines/cruise/cruise_main.cpp
+++ b/engines/cruise/cruise_main.cpp
@@ -351,12 +351,12 @@ int loadFileSub1(uint8 **ptr, uint8 *name, uint8 *ptr2) {
if (!strcmp(buffer, ".SPL")) {
removeExtention((char *)name, buffer);
- // if(useH32)
+ // if (useH32)
{
strcatuint8(buffer, ".H32");
}
/* else
- * if(useAdlib)
+ * if (useAdlib)
* {
* strcatuint8(buffer,".ADL");
* }
@@ -687,7 +687,7 @@ int getCursorFromObject(int mouseX, int mouseY, int *outX, int *outY) {
di += var_10;
}
-/* if((filesDatabase[di].subData.resourceType == 8) && (filesDatabase[di].subData.ptr)) {
+/* if ((filesDatabase[di].subData.resourceType == 8) && (filesDatabase[di].subData.ptr)) {
assert(0);
}
*/
@@ -1045,7 +1045,7 @@ int processInput(void) {
int16 mouseY = 0;
int16 button = 0;
- /*if(inputSub1keyboad())
+ /*if (inputSub1keyboad())
* {
* return 1;
* } */
@@ -1327,7 +1327,7 @@ void mainLoop(void) {
// readKeyboard();
playerDontAskQuit = processInput();
- //if(enableUser)
+ //if (enableUser)
{
userEnabled = 1;
enableUser = 0;
@@ -1363,7 +1363,7 @@ void mainLoop(void) {
if (main5)
fadeVar = 0;
- /*if(fadeVar)
+ /*if (fadeVar)
* {
* // TODO!
* } */
@@ -1371,11 +1371,11 @@ void mainLoop(void) {
mainDraw(0);
flipScreen();
- /* if(userEnabled && !main7 && !main15 && currentActiveMenu == -1)
+ /* if (userEnabled && !main7 && !main15 && currentActiveMenu == -1)
* {
* getMouseStatus(&main10, &mouseX, &mouseButton, &mouseY);
*
- * if(mouseX != oldMouseX && mouseY != oldMouseY)
+ * if (mouseX != oldMouseX && mouseY != oldMouseY)
* {
* int cursorType;
* int newCursor1;
@@ -1386,12 +1386,12 @@ void mainLoop(void) {
*
* cursorType = getCursorFromObject(mouseX, mouseY, &newCursor1, &newCursor2);
*
- * if(cursorType == 9)
+ * if (cursorType == 9)
* {
* changeCursor(5);
* }
* else
- * if(cursorType == -1)
+ * if (cursorType == -1)
* {
* changeCursor(6);
* }
@@ -1422,10 +1422,10 @@ void mainLoop(void) {
// t_end = t_start+SPEED;
// t_left=t_start-Osystem_GetTicks()+SPEED;
#ifndef FASTDEBUG
- /* if(t_left>0)
- * if(t_left>SLEEP_MIN)
+ /* if (t_left>0)
+ * if (t_left>SLEEP_MIN)
* Osystem_Delay(t_left-SLEEP_GRAN);
- * while(Osystem_GetTicks()<t_end){q++;}; */
+ * while (Osystem_GetTicks()<t_end){q++;}; */
#endif
manageEvents(4);
diff --git a/engines/cruise/ctp.cpp b/engines/cruise/ctp.cpp
index 5af2cda46c..8256df3330 100644
--- a/engines/cruise/ctp.cpp
+++ b/engines/cruise/ctp.cpp
@@ -204,7 +204,7 @@ void loadCtpSub1(int boxIdx, int scale, uint16 *_walkboxTable,
var_E = 0;
si = &polyBuffer3[1];
- /* if(*si>=0)
+ /* if (*si>=0)
* {
* di = si;
* cx = var_12;
@@ -217,12 +217,12 @@ void loadCtpSub1(int boxIdx, int scale, uint16 *_walkboxTable,
* di++;
*
* var_2 = ax;
- * if(var_C < bx)
+ * if (var_C < bx)
* {
* var_C = bx;
* }
*
- * if(var_2 < var_A)
+ * if (var_2 < var_A)
* {
* var_A = var_2;
* }
@@ -232,7 +232,7 @@ void loadCtpSub1(int boxIdx, int scale, uint16 *_walkboxTable,
* *cx = var_2;
* cx++;
* var_E ++;
- * }while(di);
+ * }while (di);
*
* var_12 = cx;
* } */
diff --git a/engines/cruise/decompiler.cpp b/engines/cruise/decompiler.cpp
index b027f948aa..0099eda4bf 100644
--- a/engines/cruise/decompiler.cpp
+++ b/engines/cruise/decompiler.cpp
@@ -709,14 +709,14 @@ int decompCompare(void) {
addDecomp("sign(%s)", param);
/*
- if(!pop)
+ if (!pop)
si = 1;
- if(pop<0) {
+ if (pop<0) {
si |= 4;
}
- if(pop>0) {
+ if (pop>0) {
si |= 2;
}
diff --git a/engines/cruise/function.cpp b/engines/cruise/function.cpp
index cfb579e331..6a6f65a066 100644
--- a/engines/cruise/function.cpp
+++ b/engines/cruise/function.cpp
@@ -863,7 +863,7 @@ int16 Op_SetColor(void) {
#define convertRatio 36.571428571428571428571428571429
- for(i=startIdx; i<=endIdx; i++) {
+ for (i=startIdx; i<=endIdx; i++) {
R = (int)(colorR*convertRatio);
G = (int)(colorG*convertRatio);
B = (int)(colorB*convertRatio);
diff --git a/engines/cruise/gfxModule.cpp b/engines/cruise/gfxModule.cpp
index 9228193560..b106db558d 100644
--- a/engines/cruise/gfxModule.cpp
+++ b/engines/cruise/gfxModule.cpp
@@ -108,15 +108,15 @@ void gfxModuleData_field_60(char *sourcePtr, int width, int height,
* ax = y;
* si = 0;
*
- * if(y>199) // out of screen vertically
+ * if (y>199) // out of screen vertically
* return;
*
- * if(y<0) // cropped on the top
+ * if (y<0) // cropped on the top
* {
* cx = bx;
* bx -= ax;
* dx -= bx;
- * if(dx <= 0)
+ * if (dx <= 0)
* {
* return;
* }
@@ -130,12 +130,12 @@ void gfxModuleData_field_60(char *sourcePtr, int width, int height,
* ax += dx;
* ax--;
*
- * if(ax > di)
+ * if (ax > di)
* {
* ax -= di;
* dx -= ax;
*
- * if(dx <= 0)
+ * if (dx <= 0)
* {
* return;
* }
@@ -170,7 +170,7 @@ void gfxModuleData_field_60(char *sourcePtr, int width, int height,
* dx = ax;
* ax = tempSwap;
*
- * if(ax > di)
+ * if (ax > di)
* {
* return;
* }
@@ -183,12 +183,12 @@ void gfxModuleData_field_60(char *sourcePtr, int width, int height,
*
* dx = dx&0xFF;
*
- * if(cx<bx)
+ * if (cx<bx)
* {
* return;
* }
*
- * if(cx>di)
+ * if (cx>di)
* {
* cx -= di;
* cx >>= 3;
@@ -201,7 +201,7 @@ void gfxModuleData_field_60(char *sourcePtr, int width, int height,
* di = 0xF8F8;
* }
*
- * if(ax<bx)
+ * if (ax<bx)
* {
* ax -= bx;
* ax = -ax;
@@ -224,9 +224,9 @@ void gfxModuleData_field_60(char *sourcePtr, int width, int height,
*
* dx = loc_1064;
*
- * if(dx)
+ * if (dx)
* {
- * if(di&1)
+ * if (di&1)
* {
* loc_10C5++;
* }
@@ -235,7 +235,7 @@ void gfxModuleData_field_60(char *sourcePtr, int width, int height,
* ax--;
* loc_11DC = ax;
*
- * if(di&0x100)
+ * if (di&0x100)
* {
* bx--;
* }
@@ -283,7 +283,7 @@ void gfxModuleData_field_60(char *sourcePtr, int width, int height,
* bx = dx;
* dx = 974;
*
- * if(!bx) // no crop ?
+ * if (!bx) // no crop ?
* {
* do // for each line
* {
@@ -299,12 +299,12 @@ void gfxModuleData_field_60(char *sourcePtr, int width, int height,
*
* siPtr+=4;
* diPtr++;
- * }while(--cx);
+ * }while (--cx);
*
* diPtr += loc_1147; // interline
* siPtr += loc_114B;
* bp = bpSave;
- * }while(--bp);
+ * }while (--bp);
* }
* else // croped
* {
@@ -326,7 +326,7 @@ void gfxModuleData_field_60(char *sourcePtr, int width, int height,
* ax = bp;
* loc_12E1 = ax;
*
- * if(loc_117C == 0xF8)
+ * if (loc_117C == 0xF8)
* {
* direction = 1;
* }
@@ -335,7 +335,7 @@ void gfxModuleData_field_60(char *sourcePtr, int width, int height,
* direction = -1;
* }
*
- * if(direction == -1)
+ * if (direction == -1)
* {
* goto label_11DC;
* }
@@ -358,7 +358,7 @@ void gfxModuleData_field_60(char *sourcePtr, int width, int height,
* bx = (bx&0xFF00) | (ax&0xFF);
* ax = ((((((ax&0xFF00)>>8)&0xFF) | (ax&0xFF))<<8)&0xFF00) | (ax&0xFF);
*
- * if(ax)
+ * if (ax)
* {
* bp = dx;
* ax = (ax&0xFF00) | (*diPtr)&0xFF;
@@ -375,7 +375,7 @@ void gfxModuleData_field_60(char *sourcePtr, int width, int height,
* label_11DC:
*
* bp = loc_11DC;
- * if(bp >0)
+ * if (bp >0)
* {
* do
* {
@@ -413,7 +413,7 @@ void gfxModuleData_field_60(char *sourcePtr, int width, int height,
* ax = (ax&0xFF00) | ((ax&0xFF) | bx&0xFF);
* ax = (ax&0xFF00) | ((ax&0xFF)<<8) | (ax&0xFF);
*
- * if(ax)
+ * if (ax)
* {
* cx = dx;
* ax = (ax&0xFF00) | (*diPtr)&0xFF;
@@ -427,10 +427,10 @@ void gfxModuleData_field_60(char *sourcePtr, int width, int height,
*
* siPtr += 4;
* diPtr++;
- * }while(--bp);
+ * }while (--bp);
* }
*
- * if(loc_122B == 0xF8)
+ * if (loc_122B == 0xF8)
* {
* direction = 1;
* }
@@ -439,7 +439,7 @@ void gfxModuleData_field_60(char *sourcePtr, int width, int height,
* direction = -1;
* }
*
- * if(direction == -1)
+ * if (direction == -1)
* {
* goto label_12D9;
* }
@@ -462,7 +462,7 @@ void gfxModuleData_field_60(char *sourcePtr, int width, int height,
* bx = (bx&0xFF00) | (ax&0xFF);
* ax = ((((((ax&0xFF00)>>8)&0xFF) | (ax&0xFF))<<8)&0xFF00) | (ax&0xFF);
*
- * if(ax)
+ * if (ax)
* {
* bp = dx;
* ax = (ax&0xFF00) | (*diPtr)&0xFF;
@@ -481,7 +481,7 @@ void gfxModuleData_field_60(char *sourcePtr, int width, int height,
* siPtr+=loc_12DD;
* bp = loc_12E1;
*
- * }while(--bp);
+ * }while (--bp);
* } */
{
@@ -526,9 +526,9 @@ void gfxModuleData_field_60(char *sourcePtr, int width, int height,
int i;
int j;
- for(i=x;i<height+x;i++) {
- for(j=y;j<width*16+y;j++) {
- if(i>=0&&i<200&&j>=0&&j<320)
+ for (i=x;i<height+x;i++) {
+ for (j=y;j<width*16+y;j++) {
+ if (i>=0&&i<200&&j>=0&&j<320)
destPtr[i*320+j] = *(sourcePtr++);
}
}
diff --git a/engines/cruise/mainDraw.cpp b/engines/cruise/mainDraw.cpp
index b30dc29380..fb191ee8b2 100644
--- a/engines/cruise/mainDraw.cpp
+++ b/engines/cruise/mainDraw.cpp
@@ -930,7 +930,7 @@ void mainDraw(int16 param) {
if (newVal > currentObjPtr->animEnd) {
if (currentObjPtr->animLoop) {
newVal = currentObjPtr->animStart;
- if(currentObjPtr->animLoop>0)
+ if (currentObjPtr->animLoop>0)
currentObjPtr->animLoop--;
} else {
int16 data2;
@@ -950,7 +950,7 @@ void mainDraw(int16 param) {
}
} else {
ASSERT(0);
- /* if(currentObjPtr->field_22>newVal)
+ /* if (currentObjPtr->field_22>newVal)
* {
* } */
}
diff --git a/engines/cruise/menu.cpp b/engines/cruise/menu.cpp
index 4f828d1fd3..1a3b5c6521 100644
--- a/engines/cruise/menu.cpp
+++ b/engines/cruise/menu.cpp
@@ -221,7 +221,7 @@ int playerMenu(int menuX, int menuY) {
freeStuff2();
}
/*
- if(currentMenu) {
+ if (currentMenu) {
freeMenu(currentMenu);
currentMenu = 0;
var37 = 0;
@@ -229,7 +229,7 @@ int playerMenu(int menuX, int menuY) {
main9 = -1;
}
- if(inventoryMenu) {
+ if (inventoryMenu) {
freeMenu(inventoryMenu);
inventoryMenu = 0;
var37 = 0;
@@ -237,7 +237,7 @@ int playerMenu(int menuX, int menuY) {
main9 = -1;
}*/
-/* if(mouseVar2) {
+/* if (mouseVar2) {
free3(mouseVar2);
} */
diff --git a/engines/cruise/mouse.cpp b/engines/cruise/mouse.cpp
index a918e0536f..e7a3fc3f98 100644
--- a/engines/cruise/mouse.cpp
+++ b/engines/cruise/mouse.cpp
@@ -40,11 +40,11 @@ void getMouseStatus(int16 *pMouseVar, int16 *pMouseX, int16 *pMouseButton,
*pMouseButton = 0;
/*
- if(localStatus.left)
+ if (localStatus.left)
*pMouseButton |= 1;
- if(localStatus.right)
+ if (localStatus.right)
*pMouseButton |= 2;
- if(localStatus.middle)
+ if (localStatus.middle)
*pMouseButton |= 4;
*/
}
diff --git a/engines/cruise/overlay.cpp b/engines/cruise/overlay.cpp
index 179c53357d..4056d7bd82 100644
--- a/engines/cruise/overlay.cpp
+++ b/engines/cruise/overlay.cpp
@@ -272,7 +272,7 @@ int loadOverlay(const uint8 *scriptName) {
if (!ovlData->data3Table) {
/* releaseScript(scriptIdx,scriptName);
- if(freeIsNeeded) {
+ if (freeIsNeeded) {
freePtr(unpackedBuffer);
} */
@@ -295,7 +295,7 @@ int loadOverlay(const uint8 *scriptName) {
if (!ptr) {
/* releaseScript(scriptIdx,scriptName);
*
- * if(freeIsNeeded)
+ * if (freeIsNeeded)
* {
* freePtr(unpackedBuffer);
* } */
@@ -344,7 +344,7 @@ int loadOverlay(const uint8 *scriptName) {
if (!ptr) {
/* releaseScript(scriptIdx,scriptName);
*
- * if(freeIsNeeded)
+ * if (freeIsNeeded)
* {
* freePtr(unpackedBuffer);
* } */
@@ -375,7 +375,7 @@ int loadOverlay(const uint8 *scriptName) {
if (!ovlData->ptr8) {
/* releaseScript(scriptIdx,scriptName);
- if(freeIsNeeded) {
+ if (freeIsNeeded) {
freePtr(unpackedBuffer);
} */
@@ -395,7 +395,7 @@ int loadOverlay(const uint8 *scriptName) {
if (!ovlData->objDataTable) {
/* releaseScript(scriptIdx,scriptName);
- if(freeIsNeeded) {
+ if (freeIsNeeded) {
freePtr(unpackedBuffer);
} */
@@ -455,7 +455,7 @@ int loadOverlay(const uint8 *scriptName) {
if (!ovlData->objData2WorkTable) {
/* releaseScript(scriptIdx,scriptName);
- if(freeIsNeeded) {
+ if (freeIsNeeded) {
freePtr(unpackedBuffer);
} */
@@ -471,7 +471,7 @@ int loadOverlay(const uint8 *scriptName) {
if (!ovlData->objData2SourceTable) {
/* releaseScript(scriptIdx,scriptName);
- if(freeIsNeeded) {
+ if (freeIsNeeded) {
freePtr(unpackedBuffer);
} */
@@ -497,7 +497,7 @@ int loadOverlay(const uint8 *scriptName) {
}
}
-/* if(freeIsNeeded) {
+/* if (freeIsNeeded) {
freePtr(unpackedBuffer);
} */
@@ -571,7 +571,7 @@ int loadOverlay(const uint8 *scriptName) {
if (!ovlData->specialString1) {
/* releaseScript(scriptIdx,scriptName);
*
- * if(freeIsNeeded)
+ * if (freeIsNeeded)
* {
* freePtr(unpackedBuffer);
* } */
@@ -596,7 +596,7 @@ int loadOverlay(const uint8 *scriptName) {
if (!ovlData->specialString2) {
/* releaseScript(scriptIdx,scriptName);
*
- * if(freeIsNeeded)
+ * if (freeIsNeeded)
* {
* freePtr(unpackedBuffer);
* } */
@@ -622,7 +622,7 @@ int loadOverlay(const uint8 *scriptName) {
if (!ovlData->stringTable[i].string) {
/* releaseScript(scriptIdx,scriptName);
*
- * if(freeIsNeeded)
+ * if (freeIsNeeded)
* {
* freePtr(unpackedBuffer);
* } */
@@ -696,12 +696,12 @@ int releaseOverlay(const char *name) {
if (!ovlDataPtr)
return -4;
/*
- if(overlayTable[overlayIdx].var1E) {
+ if (overlayTable[overlayIdx].var1E) {
free(overlayTable[overlayIdx].var1E);
overlayTable[overlayIdx].var1E = NULL;
}
- if(overlayTable[overlayIdx].var16) {
+ if (overlayTable[overlayIdx].var16) {
free(overlayTable[overlayIdx].var16);
overlayTable[overlayIdx].var16 = NULL;
} */
diff --git a/engines/cruise/volume.cpp b/engines/cruise/volume.cpp
index b32ffb0ccd..5170a945fe 100644
--- a/engines/cruise/volume.cpp
+++ b/engines/cruise/volume.cpp
@@ -183,7 +183,7 @@ void freeDisk(void) {
}
/* TODO
- * if(PAL_fileHandle)
+ * if (PAL_fileHandle)
* {
* freeAllDataPtr();
* }
diff --git a/engines/gob/coktelvideo.cpp b/engines/gob/coktelvideo.cpp
index b3056a5ea3..c15ffb4a1d 100644
--- a/engines/gob/coktelvideo.cpp
+++ b/engines/gob/coktelvideo.cpp
@@ -1281,7 +1281,7 @@ void Vmd::deDPCM(byte *soundBuf, byte *dataBuf, int16 &init, uint32 n) {
int32 s = init;
for (uint32 i = 0; i < n; i++) {
- if(dataBuf[i] & 0x80)
+ if (dataBuf[i] & 0x80)
s -= _tableDPCM[dataBuf[i] & 0x7F];
else
s += _tableDPCM[dataBuf[i]];
diff --git a/engines/gob/inter_v3.cpp b/engines/gob/inter_v3.cpp
index 51413c839a..7baa451f81 100644
--- a/engines/gob/inter_v3.cpp
+++ b/engines/gob/inter_v3.cpp
@@ -735,7 +735,7 @@ bool Inter_v3::o3_getTotTextItemPart(OpFuncParams &params) {
_vm->_game->_totTextData->items[totTextItem].offset;
// Skip background rectangles
- while(((int16) READ_LE_UINT16(totData)) != -1)
+ while (((int16) READ_LE_UINT16(totData)) != -1)
totData += 9;
totData += 2;
diff --git a/engines/kyra/sequences_v2.cpp b/engines/kyra/sequences_v2.cpp
index 1c098bf887..19412f6310 100644
--- a/engines/kyra/sequences_v2.cpp
+++ b/engines/kyra/sequences_v2.cpp
@@ -83,7 +83,7 @@ void KyraEngine_v2::seq_playSequences(int startSeq, int endSeq) {
_screen->loadBitmap(sequences[i].filename, 2, 2, _screen->_currentPalette);
_screen->updateScreen();
seqDelay = sequences[i].frameDelay * _tickLength;
- } else if(sequences[i].type == 1) {
+ } else if (sequences[i].type == 1) {
seq_loadWSA(0, sequences[i].filename, sequences[i].frameDelay);
seqDelay = sequences[i].duration * _tickLength;
}
@@ -410,7 +410,7 @@ void KyraEngine_v2::seq_introOverviewOver1(int currentFrame) {
if (currentFrame == 2)
seq_waitForChatsToFinish();
- else if(currentFrame == 3)
+ else if (currentFrame == 3)
seq_playIntroChat(12);
}
@@ -419,7 +419,7 @@ void KyraEngine_v2::seq_introOverviewForest(int currentFrame) {
if (currentFrame == 11) {
seq_waitForChatsToFinish();
- } else if(currentFrame == 12) {
+ } else if (currentFrame == 12) {
delay(25);
seq_playIntroChat(2); // "...and tree by tree..."
}
@@ -430,7 +430,7 @@ void KyraEngine_v2::seq_introOverviewDragon(int currentFrame) {
if (currentFrame == 3)
seq_playIntroChat(3); // "Kyrandia ceases to exist!"
- else if(currentFrame == 11)
+ else if (currentFrame == 11)
seq_waitForChatsToFinish();
}
diff --git a/engines/queen/queen.cpp b/engines/queen/queen.cpp
index 7ba89b7af9..0c024a9eb4 100644
--- a/engines/queen/queen.cpp
+++ b/engines/queen/queen.cpp
@@ -329,13 +329,13 @@ void QueenEngine::findGameStateDescriptions(char descriptions[100][32]) {
memset(marks, false, SAVESTATE_MAX_NUM * sizeof(bool)); //assume no savegames for this title
filenames = _saveFileMan->listSavefiles(prefix);
- for(Common::StringList::const_iterator file = filenames.begin(); file != filenames.end(); file++){
+ for (Common::StringList::const_iterator file = filenames.begin(); file != filenames.end(); file++){
//Obtain the last 2 digits of the filename, since they correspond to the save slot
slot[0] = file->c_str()[file->size()-2];
slot[1] = file->c_str()[file->size()-1];
slotNum = atoi(slot);
- if(slotNum >= 0 && slotNum < SAVESTATE_MAX_NUM)
+ if (slotNum >= 0 && slotNum < SAVESTATE_MAX_NUM)
marks[slotNum] = true; //mark this slot as valid
}
diff --git a/engines/saga/actor_walk.cpp b/engines/saga/actor_walk.cpp
index 47bf804edb..5ddcae7ae6 100644
--- a/engines/saga/actor_walk.cpp
+++ b/engines/saga/actor_walk.cpp
@@ -533,7 +533,7 @@ void Actor::handleActions(int msec, bool setup) {
}
}
- if(_vm->getGameType() == GType_ITE)
+ if (_vm->getGameType() == GType_ITE)
speed = (ACTOR_LMULT * 2 * actor->_screenScale + 63) / 256;
else
speed = (ACTOR_SPEED * actor->_screenScale + 128) >> 8;
@@ -541,7 +541,7 @@ void Actor::handleActions(int msec, bool setup) {
if (speed < 1)
speed = 1;
- if(_vm->getGameType() == GType_IHNM)
+ if (_vm->getGameType() == GType_IHNM)
speed = speed / 2;
if ((actor->_actionDirection == kDirUp) || (actor->_actionDirection == kDirDown)) {
diff --git a/engines/saga/saveload.cpp b/engines/saga/saveload.cpp
index 6e731de44e..55089b4aea 100644
--- a/engines/saga/saveload.cpp
+++ b/engines/saga/saveload.cpp
@@ -128,13 +128,13 @@ void SagaEngine::fillSaveList() {
memset(_saveMarks, false, MAX_SAVES * sizeof(bool)); //assume no savegames for this title
filenames = _saveFileMan->listSavefiles(name);
- for(Common::StringList::iterator file = filenames.begin(); file != filenames.end(); file++){
+ for (Common::StringList::iterator file = filenames.begin(); file != filenames.end(); file++){
//Obtain the last 2 digits of the filename, since they correspond to the save slot
slot[0] = file->c_str()[file->size()-2];
slot[1] = file->c_str()[file->size()-1];
slotNum = atoi(slot);
- if(slotNum >= 0 && slotNum < MAX_SAVES)
+ if (slotNum >= 0 && slotNum < MAX_SAVES)
_saveMarks[slotNum] = true; //mark this slot as valid
}
diff --git a/engines/scumm/saveload.cpp b/engines/scumm/saveload.cpp
index 0e485e226a..bc18af8426 100644
--- a/engines/scumm/saveload.cpp
+++ b/engines/scumm/saveload.cpp
@@ -397,13 +397,13 @@ void ScummEngine::listSavegames(bool *marks, int num) {
memset(marks, false, num * sizeof(bool)); //assume no savegames for this title
filenames = _saveFileMan->listSavefiles(prefix);
- for(Common::StringList::const_iterator file = filenames.begin(); file != filenames.end(); file++){
+ for (Common::StringList::const_iterator file = filenames.begin(); file != filenames.end(); file++){
//Obtain the last 2 digits of the filename, since they correspond to the save slot
slot[0] = file->c_str()[file->size()-2];
slot[1] = file->c_str()[file->size()-1];
slotNum = atoi(slot);
- if(slotNum >= 0 && slotNum < num)
+ if (slotNum >= 0 && slotNum < num)
marks[slotNum] = true; //mark this slot as valid
}
}
diff --git a/engines/scumm/script_v5.cpp b/engines/scumm/script_v5.cpp
index 3cd71bac08..ab870f3f94 100644
--- a/engines/scumm/script_v5.cpp
+++ b/engines/scumm/script_v5.cpp
@@ -947,7 +947,7 @@ void ScummEngine_v5::loadVars() {
if (a == STRINGID_IQ_SERIES && b == STRINGID_IQ_SERIES) {
// Zak256 loads the IQ script-slot but does not use it -> ignore it
- if(_game.id == GID_INDY3) {
+ if (_game.id == GID_INDY3) {
loadIQPoints();
}
break;
@@ -968,7 +968,7 @@ void ScummEngine_v5::loadVars() {
if (!ptr[pos])
break;
// replace special characters
- if(ptr[pos] >= 32 && ptr[pos] <= 122 && ptr[pos] != 64)
+ if (ptr[pos] >= 32 && ptr[pos] <= 122 && ptr[pos] != 64)
slotContent[pos] = ptr[pos];
else
slotContent[pos] = '_';
diff --git a/engines/scumm/verbs.cpp b/engines/scumm/verbs.cpp
index 3c5713d241..fe9c9824de 100644
--- a/engines/scumm/verbs.cpp
+++ b/engines/scumm/verbs.cpp
@@ -564,7 +564,7 @@ void ScummEngine::checkExecVerbs() {
// like F5 (=0x8005) or joystick buttons (mask 0xFE00, e.g. SELECT=0xFE40 for the save/load menu).
// Hence the distinction with (_mouseAndKeyboardStat < MBS_MAX_KEY) between mouse- and key-events is not applicable
// to this games, so we have to remap the special keys here.
- if(_mouseAndKeyboardStat == 319) {
+ if (_mouseAndKeyboardStat == 319) {
_mouseAndKeyboardStat = 0x8005;
}
}
diff --git a/engines/touche/touche.cpp b/engines/touche/touche.cpp
index f3d1f33dfd..c276cebbe8 100644
--- a/engines/touche/touche.cpp
+++ b/engines/touche/touche.cpp
@@ -2358,7 +2358,7 @@ void ToucheEngine::removeConversationChoice(int16 num) {
for (int i = 0; i < NUM_CONVERSATION_CHOICES; ++i) {
if (_conversationChoicesTable[i].num == num) {
_conversationChoicesUpdated = true;
- for(; i < NUM_CONVERSATION_CHOICES - 1; ++i) {
+ for (; i < NUM_CONVERSATION_CHOICES - 1; ++i) {
_conversationChoicesTable[i].num = _conversationChoicesTable[i + 1].num;
_conversationChoicesTable[i].msg = _conversationChoicesTable[i + 1].msg;
}
diff --git a/engines/touche/ui.cpp b/engines/touche/ui.cpp
index 4d7100d4d0..62fcf9d4ee 100644
--- a/engines/touche/ui.cpp
+++ b/engines/touche/ui.cpp
@@ -381,19 +381,19 @@ void ToucheEngine::handleOptions(int forceDisplay) {
memset(menuData.saveLoadMarks, false, 100 * sizeof(bool)); //assume no savegames for this title
filenames = _saveFileMan->listSavefiles(gameStateFileName);
- for(Common::StringList::const_iterator file = filenames.begin(); file != filenames.end(); file++){
+ for (Common::StringList::const_iterator file = filenames.begin(); file != filenames.end(); file++){
//Obtain the last 1 or 2 digits of the filename, since they correspond to the save slot
//This engine can save games either with one or two digits, hence the additional if statement
slot[0] = file->c_str()[file->size()-2];
slot[1] = file->c_str()[file->size()-1];
- if(!atoi(&slot[0])){
+ if (!atoi(&slot[0])){
slotNum = atoi(&slot[1]);
} else {
slotNum = atoi(slot);
}
- if(slotNum >= 0 && slotNum < 100)
+ if (slotNum >= 0 && slotNum < 100)
menuData.saveLoadMarks[slotNum] = true; //mark this slot as valid
}