diff options
author | Max Horn | 2009-01-29 05:26:12 +0000 |
---|---|---|
committer | Max Horn | 2009-01-29 05:26:12 +0000 |
commit | ac59693be26b4239aaaf380896a1e1b753172546 (patch) | |
tree | b64a9b664917ed86e78e90560b034f0b1ee49054 /engines/tinsel | |
parent | a0a82d911c77b63f2069dbc39ab26394fe4d377d (diff) | |
download | scummvm-rg350-ac59693be26b4239aaaf380896a1e1b753172546.tar.gz scummvm-rg350-ac59693be26b4239aaaf380896a1e1b753172546.tar.bz2 scummvm-rg350-ac59693be26b4239aaaf380896a1e1b753172546.zip |
A ton of code formatting fixes; also fixed warnings about single line loops like 'while(cond);' by inserting newlines
svn-id: r36127
Diffstat (limited to 'engines/tinsel')
-rw-r--r-- | engines/tinsel/coroutine.h | 6 | ||||
-rw-r--r-- | engines/tinsel/handle.cpp | 4 | ||||
-rw-r--r-- | engines/tinsel/music.cpp | 4 | ||||
-rw-r--r-- | engines/tinsel/polygons.cpp | 2 | ||||
-rw-r--r-- | engines/tinsel/rince.cpp | 4 | ||||
-rw-r--r-- | engines/tinsel/tinlib.cpp | 4 | ||||
-rw-r--r-- | engines/tinsel/tinsel.cpp | 5 |
7 files changed, 15 insertions, 14 deletions
diff --git a/engines/tinsel/coroutine.h b/engines/tinsel/coroutine.h index 30d90970b6..d2c2c21b3a 100644 --- a/engines/tinsel/coroutine.h +++ b/engines/tinsel/coroutine.h @@ -126,7 +126,7 @@ public: /** Stop the currently running coroutine */ #define CORO_KILL_SELF() \ - do { if (&coroParam != &nullContext) { coroParam->_sleep = -1; } return; } while(0) + do { if (&coroParam != &nullContext) { coroParam->_sleep = -1; } return; } while (0) /** Invoke another coroutine */ #define CORO_INVOKE_ARGS(subCoro, ARGS) \ @@ -139,7 +139,7 @@ public: coroParam->_sleep = coroParam->_subctx->_sleep;\ assert(&coroParam != &nullContext);\ return; case __LINE__:;\ - } while(1);\ + } while (1);\ } while (0) #define CORO_INVOKE_ARGS_V(subCoro, RESULT, ARGS) \ do {\ @@ -151,7 +151,7 @@ public: coroParam->_sleep = coroParam->_subctx->_sleep;\ assert(&coroParam != &nullContext);\ return RESULT; case __LINE__:;\ - } while(1);\ + } while (1);\ } while (0) #define CORO_INVOKE_0(subCoroutine) \ diff --git a/engines/tinsel/handle.cpp b/engines/tinsel/handle.cpp index b463244123..ba09675b3f 100644 --- a/engines/tinsel/handle.cpp +++ b/engines/tinsel/handle.cpp @@ -382,7 +382,7 @@ uint8 *LockMem(SCNHANDLE offset) { return (uint8 *)pH->pNode + sizeof(MEM_NODE) + (offset & OFFSETMASK); } else if (handle == cdPlayHandle) { // Must be in currently loaded/loadable range - if(offset < cdBaseHandle || offset >= cdTopHandle) + if (offset < cdBaseHandle || offset >= cdTopHandle) error("Overlapping (in time) CD-plays!"); if (pH->pNode->pBaseAddr && (pH->filesize & fLoaded)) @@ -394,7 +394,7 @@ uint8 *LockMem(SCNHANDLE offset) { MemoryReAlloc(pH->pNode, cdTopHandle-cdBaseHandle, DWM_MOVEABLE | DWM_DISCARDABLE); - if(pH->pNode->pBaseAddr == NULL) + if (pH->pNode->pBaseAddr == NULL) error("Out of memory"); LoadCDGraphData(pH); diff --git a/engines/tinsel/music.cpp b/engines/tinsel/music.cpp index 670d87f021..657e0cbf92 100644 --- a/engines/tinsel/music.cpp +++ b/engines/tinsel/music.cpp @@ -801,7 +801,7 @@ bool PCMMusicPlayer::getNextChunk() { // Set parameters for this chunk of music id = _scriptNum; - while(id--) + while (id--) script = scriptBuffer + FROM_LE_32(*script); snum = FROM_LE_32(script[_scriptIndex++]); @@ -849,7 +849,7 @@ bool PCMMusicPlayer::getNextChunk() { script = scriptBuffer = (int32 *) LockMem(_hScript); id = _scriptNum; - while(id--) + while (id--) script = scriptBuffer + FROM_LE_32(*script); switch (script[_scriptIndex]) { diff --git a/engines/tinsel/polygons.cpp b/engines/tinsel/polygons.cpp index 184bd24f6b..4193eaa4d8 100644 --- a/engines/tinsel/polygons.cpp +++ b/engines/tinsel/polygons.cpp @@ -1056,7 +1056,7 @@ int GetBrightness(HPOLYGON hPath, int y) { top += zlen; if (y < top) return brightness; - } while(--brightness); + } while (--brightness); return FROM_LE_32(pp.bright2); } diff --git a/engines/tinsel/rince.cpp b/engines/tinsel/rince.cpp index f92b8800db..30eee3bc8b 100644 --- a/engines/tinsel/rince.cpp +++ b/engines/tinsel/rince.cpp @@ -361,11 +361,11 @@ static void InitMover(PMOVER pMover) { pMover->Tline = 0; - if(pMover->direction != FORWARD || pMover->direction != AWAY + if (pMover->direction != FORWARD || pMover->direction != AWAY || pMover->direction != LEFTREEL || pMover->direction != RIGHTREEL) pMover->direction = FORWARD; - if(pMover->scale < 0 || pMover->scale > TOTAL_SCALES) + if (pMover->scale < 0 || pMover->scale > TOTAL_SCALES) pMover->scale = 1; pMover->brightness = BOGUS_BRIGHTNESS; // Force initial setup diff --git a/engines/tinsel/tinlib.cpp b/engines/tinsel/tinlib.cpp index 0a29a9fe82..221dde1bb1 100644 --- a/engines/tinsel/tinlib.cpp +++ b/engines/tinsel/tinlib.cpp @@ -386,7 +386,7 @@ static void ScrollMonitorProcess(CORO_PARAM, const void *param) { PlayfieldGetPos(FIELD_WORLD, &Loffset, &Toffset); - } while(Loffset != psm->x || Toffset != psm->y); + } while (Loffset != psm->x || Toffset != psm->y); CORO_END_CODE; } @@ -2152,7 +2152,7 @@ static void PrintObj(CORO_PARAM, const SCNHANDLE hText, const INV_OBJECT *pinvo, // Carry on until the cursor leaves this icon GetCursorXY(&x, &y, false); - } while(InvItemId(x, y) == pinvo->id); + } while (InvItemId(x, y) == pinvo->id); } else { /* * PrintObj() called from other event diff --git a/engines/tinsel/tinsel.cpp b/engines/tinsel/tinsel.cpp index 9481ea4859..2524c3e6a2 100644 --- a/engines/tinsel/tinsel.cpp +++ b/engines/tinsel/tinsel.cpp @@ -323,7 +323,7 @@ static void SingleLeftProcess(CORO_PARAM, const void *) { // Timeout a double click (may not work once every 49 days!) do { CORO_SLEEP(1); - } while(DwGetCurrentTime() < _ctx->endTicks); + } while (DwGetCurrentTime() < _ctx->endTicks); if (GetProvNotProcessed()) PlayerEvent(PLR_WALKTO, clickPos); @@ -1043,7 +1043,8 @@ Common::Error TinselEngine::go() { continue; // run flat-out #endif // Loop processing events while there are any pending - while (pollEvent()); + while (pollEvent()) + ; DoCdChange(); |