aboutsummaryrefslogtreecommitdiff
path: root/engines/cruise
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/cruise
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/cruise')
-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
13 files changed, 75 insertions, 75 deletions
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();
* }