aboutsummaryrefslogtreecommitdiff
path: root/engines/sword1
diff options
context:
space:
mode:
authorTorbjörn Andersson2010-10-12 04:19:58 +0000
committerTorbjörn Andersson2010-10-12 04:19:58 +0000
commit54b2a8c98df204dfe64a27fc830936ec62e3f9ed (patch)
tree731b870d395e797886b9d184ff709782632cc1bd /engines/sword1
parent8388e0dfea4ae0d80e51368acd12685c740c5bb5 (diff)
downloadscummvm-rg350-54b2a8c98df204dfe64a27fc830936ec62e3f9ed.tar.gz
scummvm-rg350-54b2a8c98df204dfe64a27fc830936ec62e3f9ed.tar.bz2
scummvm-rg350-54b2a8c98df204dfe64a27fc830936ec62e3f9ed.zip
JANITORIAL: Cleanup (mostly whitespace)
svn-id: r53161
Diffstat (limited to 'engines/sword1')
-rw-r--r--engines/sword1/router.cpp20
-rw-r--r--engines/sword1/screen.cpp6
-rw-r--r--engines/sword1/text.cpp6
3 files changed, 16 insertions, 16 deletions
diff --git a/engines/sword1/router.cpp b/engines/sword1/router.cpp
index 0da1cef6fe..84cc81cd0e 100644
--- a/engines/sword1/router.cpp
+++ b/engines/sword1/router.cpp
@@ -845,7 +845,7 @@ void Router::slidyWalkAnimator(WalkData *walkAnim) {
do {
walkAnim[frame].frame += 104;//turning left
frame += 1;
- } while (frame < lastCount );
+ } while (frame < lastCount);
}
if (((lastDir == 1) || (lastDir == -7)) || ((lastDir == 2) || (lastDir == -6))) {
// turn at the end of the current walk
@@ -853,7 +853,7 @@ void Router::slidyWalkAnimator(WalkData *walkAnim) {
do {
walkAnim[frame].frame += 200; //was 60 now 116
frame += 1;
- } while (frame < lastCount );
+ } while (frame < lastCount);
}
lastDir = currentDir;
}
@@ -1272,7 +1272,7 @@ int32 Router::solidWalkAnimator(WalkData *walkAnim) {
do {
walkAnim[frame].frame += 104;//turning left
frame += 1;
- } while (frame < lastCount );
+ } while (frame < lastCount);
}
if (((lastDir == 1) || (lastDir == -7)) || ((lastDir == 2) || (lastDir == -6))) {
// turn at the end of the current walk
@@ -1280,7 +1280,7 @@ int32 Router::solidWalkAnimator(WalkData *walkAnim) {
do {
walkAnim[frame].frame += 200; //was 60 now 116
frame += 1;
- } while (frame < lastCount );
+ } while (frame < lastCount);
}
}
// all turns checked
@@ -1305,7 +1305,7 @@ int32 Router::solidWalkAnimator(WalkData *walkAnim) {
do {
walkAnim[frame].frame += 278;//stopping right
frame += 1;
- } while (frame < lastCount );
+ } while (frame < lastCount);
walkAnim[stepCount].frame = 308;
walkAnim[stepCount].step = 7;
walkAnim[stepCount].dir = currentDir;
@@ -1316,7 +1316,7 @@ int32 Router::solidWalkAnimator(WalkData *walkAnim) {
do {
walkAnim[frame].frame += 279;//stopping right
frame += 1;
- } while (frame < lastCount );
+ } while (frame < lastCount);
walkAnim[stepCount].frame = 315;
walkAnim[stepCount].step = 7;
walkAnim[stepCount].dir = currentDir;
@@ -1332,7 +1332,7 @@ int32 Router::solidWalkAnimator(WalkData *walkAnim) {
do {
walkAnim[frame].frame += 244;//stopping left
frame += 1;
- } while (frame < lastCount );
+ } while (frame < lastCount);
walkAnim[stepCount].frame = 322;
walkAnim[stepCount].step = 7;
walkAnim[stepCount].dir = currentDir;
@@ -1343,7 +1343,7 @@ int32 Router::solidWalkAnimator(WalkData *walkAnim) {
do {
walkAnim[frame].frame += 245;//stopping left
frame += 1;
- } while (frame < lastCount );
+ } while (frame < lastCount);
walkAnim[stepCount].frame = 329;
walkAnim[stepCount].step = 7;
walkAnim[stepCount].dir = currentDir;
@@ -2097,9 +2097,9 @@ int whatTarget(int32 startX, int32 startY, int32 destX, int32 destY) {
int signY = (deltaY > 0);
int slope;
- if ((ABS(deltaY) * DIAGONALX ) < (ABS(deltaX) * DIAGONALY / 2))
+ if ((ABS(deltaY) * DIAGONALX) < (ABS(deltaX) * DIAGONALY / 2))
slope = 0;// its flat
- else if ((ABS(deltaY) * DIAGONALX / 2) > (ABS(deltaX) * DIAGONALY ) )
+ else if ((ABS(deltaY) * DIAGONALX / 2) > (ABS(deltaX) * DIAGONALY))
slope = 2;// its vertical
else
slope = 1;// its diagonal
diff --git a/engines/sword1/screen.cpp b/engines/sword1/screen.cpp
index 024b681acb..b07acf9a0b 100644
--- a/engines/sword1/screen.cpp
+++ b/engines/sword1/screen.cpp
@@ -366,7 +366,7 @@ void Screen::draw() {
if (_currentScreen == 54) {
// rm54 has a BACKGROUND parallax layer in parallax[0]
- if (_parallax[0] && !SwordEngine::isPsx() ) //Avoid drawing this parallax on PSX edition, it gets occluded by background
+ if (_parallax[0] && !SwordEngine::isPsx()) //Avoid drawing this parallax on PSX edition, it gets occluded by background
renderParallax(_parallax[0]);
uint8 *src = _layerBlocks[0];
uint8 *dest = _screenBuf;
@@ -539,7 +539,7 @@ void Screen::processImage(uint32 id) {
|| (compact->o_resource == LVSFLY) || (!(compact->o_resource == GEORGE_MEGA) && (sprSizeX < 260))))
drawSprite(sprData + incr, spriteX, spriteY, sprSizeX, sprSizeY, sprPitch);
else if (((sprSizeX >= 260) && (sprSizeX < 450)) || ((compact->o_resource == GMWRITH) && (sprSizeX < 515)) // a psx shrinked sprite (1/2 width)
- || ((compact->o_resource == GMPOWER) && (sprSizeX < 515)) ) // some needs to be hardcoded, headers don't give useful infos
+ || ((compact->o_resource == GMPOWER) && (sprSizeX < 515))) // some needs to be hardcoded, headers don't give useful infos
drawPsxHalfShrinkedSprite(sprData + incr, spriteX, spriteY, sprSizeX / 2, sprSizeY, sprPitch / 2);
else if (sprSizeX >= 450) // A PSX double shrinked sprite (1/3 width)
drawPsxFullShrinkedSprite(sprData + incr, spriteX, spriteY, sprSizeX / 3, sprSizeY, sprPitch / 3);
@@ -1187,7 +1187,7 @@ void Screen::spriteClipAndSet(uint16 *pSprX, uint16 *pSprY, uint16 *pSprWidth, u
gridW *= 2; // and masking problems when sprites are stretched in width
uint16 bottomSprPos = (*pSprY + (*pSprHeight) * 2); //Position of bottom line of sprite
- if ( bottomSprPos > _scrnSizeY ) { //Check that resized psx sprite isn't drawn outside of screen boundaries
+ if (bottomSprPos > _scrnSizeY) { //Check that resized psx sprite isn't drawn outside of screen boundaries
uint16 outScreen = bottomSprPos - _scrnSizeY;
*pSprHeight -= (outScreen % 2) ? (outScreen + 1) / 2 : outScreen / 2;
}
diff --git a/engines/sword1/text.cpp b/engines/sword1/text.cpp
index e8a20ec2b7..ef3e07fe74 100644
--- a/engines/sword1/text.cpp
+++ b/engines/sword1/text.cpp
@@ -49,7 +49,7 @@ Text::Text(ObjectMan *pObjMan, ResMan *pResMan, bool czechVersion) {
_fontId = (czechVersion) ? CZECH_GAME_FONT : GAME_FONT;
_font = (uint8*)_resMan->openFetchRes(_fontId);
- _joinWidth = charWidth( SPACE ) - 2 * OVERLAP;
+ _joinWidth = charWidth(SPACE) - 2 * OVERLAP;
_charHeight = _resMan->getUint16(_resMan->fetchFrame(_font, 0)->height); // all chars have the same height
for (int i = 0; i < MAX_TEXT_OBS; i++)
_textBlocks[i] = NULL;
@@ -145,12 +145,12 @@ uint16 Text::analyzeSentence(uint8 *text, uint16 maxWidth, LineInfo *line) {
// (with a separating space character - also overlapped)
uint16 spaceNeeded = _joinWidth + wordWidth;
- if (line[lineNo].width + spaceNeeded <= maxWidth ) {
+ if (line[lineNo].width + spaceNeeded <= maxWidth) {
line[lineNo].width += spaceNeeded;
line[lineNo].length += 1 + wordLength; // NB. space+word characters
} else { // put word (without separating SPACE) at start of next line
lineNo++;
- assert( lineNo < MAX_LINES );
+ assert(lineNo < MAX_LINES);
line[lineNo].width = wordWidth;
line[lineNo].length = wordLength;
}