diff options
author | Johannes Schickel | 2016-02-02 18:43:36 +0100 |
---|---|---|
committer | Johannes Schickel | 2016-02-02 20:15:18 +0100 |
commit | 6778175f6d2ba33565b15d3b94c8eea4b0ec3215 (patch) | |
tree | 9bd26262ae254315531c61cb055e0a238b79cfa1 /engines/agi/checks.cpp | |
parent | 9ad3712aa30944fa3bdc5e03eb87499daf626592 (diff) | |
download | scummvm-rg350-6778175f6d2ba33565b15d3b94c8eea4b0ec3215.tar.gz scummvm-rg350-6778175f6d2ba33565b15d3b94c8eea4b0ec3215.tar.bz2 scummvm-rg350-6778175f6d2ba33565b15d3b94c8eea4b0ec3215.zip |
AGI: Fix formatting.
This mostly enforces tabs for indentation and spaces for formatting. But also
fixes spaces on empty lines, some extra/missing spaces.
astyle + manual fixup
Diffstat (limited to 'engines/agi/checks.cpp')
-rw-r--r-- | engines/agi/checks.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/engines/agi/checks.cpp b/engines/agi/checks.cpp index a3698c34ea..1e1670f674 100644 --- a/engines/agi/checks.cpp +++ b/engines/agi/checks.cpp @@ -58,7 +58,7 @@ bool AgiEngine::checkPosition(ScreenObjEntry *screenObj) { if (!result) { debugC(4, kDebugLevelSprites, "check position failed: x=%d, y=%d, h=%d, w=%d", - screenObj->xPos, screenObj->yPos, screenObj->xSize, screenObj->ySize); + screenObj->xPos, screenObj->yPos, screenObj->xSize, screenObj->ySize); } return result; } @@ -95,12 +95,12 @@ bool AgiEngine::checkCollision(ScreenObjEntry *screenObj) { // Crossed the baseline, return error! if ((screenObj->yPos > checkObj->yPos && screenObj->yPos_prev < checkObj->yPos_prev) || - (screenObj->yPos < checkObj->yPos && screenObj->yPos_prev > checkObj->yPos_prev)) { + (screenObj->yPos < checkObj->yPos && screenObj->yPos_prev > checkObj->yPos_prev)) { debugC(4, kDebugLevelSprites, "check returns 1 (object %d)", screenObj->objectNr); return true; } } - + return false; } @@ -128,15 +128,15 @@ bool AgiEngine::checkPriority(ScreenObjEntry *screenObj) { for (celX = 0; celX < screenObj->xSize; celX++, curX++) { screenPriority = _gfx->getPriority(curX, curY); - if (screenPriority == 0) { // unconditional black. no go at all! + if (screenPriority == 0) { // unconditional black. no go at all! touchedControl = 0; break; } - if (screenPriority != 3) { // not water surface + if (screenPriority != 3) { // not water surface touchedWater = false; - if (screenPriority == 1) { // conditional blue + if (screenPriority == 1) { // conditional blue if (!(screenObj->flags & fIgnoreBlocks)) { debugC(4, kDebugLevelSprites, "Blocks observed!"); touchedControl = false; @@ -313,26 +313,26 @@ void AgiEngine::fixPosition(ScreenObjEntry *screenObj) { while (!checkPosition(screenObj) || checkCollision(screenObj) || !checkPriority(screenObj)) { switch (dir) { - case 0: // west + case 0: // west screenObj->xPos--; if (--count) continue; dir = 1; break; - case 1: // south + case 1: // south screenObj->yPos++; if (--count) continue; dir = 2; size++; break; - case 2: // east + case 2: // east screenObj->xPos++; if (--count) continue; dir = 3; break; - case 3: // north + case 3: // north screenObj->yPos--; if (--count) continue; |