aboutsummaryrefslogtreecommitdiff
path: root/engines/saga
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/saga
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/saga')
-rw-r--r--engines/saga/actor.h4
-rw-r--r--engines/saga/interface.cpp76
-rw-r--r--engines/saga/isomap.cpp22
-rw-r--r--engines/saga/puzzle.cpp6
-rw-r--r--engines/saga/script.cpp6
5 files changed, 57 insertions, 57 deletions
diff --git a/engines/saga/actor.h b/engines/saga/actor.h
index 57d06e9e3a..2f8fdea8ec 100644
--- a/engines/saga/actor.h
+++ b/engines/saga/actor.h
@@ -451,8 +451,8 @@ public:
void cmdActorWalkTo(int argc, const char **argv);
bool validActorId(uint16 id) { return (id == ID_PROTAG) || ((id >= objectIndexToId(kGameObjectActor, 0)) && (id < objectIndexToId(kGameObjectActor, _actorsCount))); }
- int actorIdToIndex(uint16 id) { return (id == ID_PROTAG ) ? 0 : objectIdToIndex(id); }
- uint16 actorIndexToId(int index) { return (index == 0 ) ? ID_PROTAG : objectIndexToId(kGameObjectActor, index); }
+ int actorIdToIndex(uint16 id) { return (id == ID_PROTAG) ? 0 : objectIdToIndex(id); }
+ uint16 actorIndexToId(int index) { return (index == 0) ? ID_PROTAG : objectIndexToId(kGameObjectActor, index); }
ActorData *getActor(uint16 actorId);
ActorData *getFirstActor() { return _actors[0]; }
diff --git a/engines/saga/interface.cpp b/engines/saga/interface.cpp
index c4b4688785..a77ec1c140 100644
--- a/engines/saga/interface.cpp
+++ b/engines/saga/interface.cpp
@@ -1398,7 +1398,7 @@ void Interface::setSave(PanelButton *panelButton) {
char *fileName;
switch (panelButton->id) {
case kTextSave:
- if (_textInputStringLength == 0 ) {
+ if (_textInputStringLength == 0) {
break;
}
if (!_vm->isSaveListFull() && (_optionSaveFileTitleNumber == 0)) {
@@ -2166,43 +2166,43 @@ void Interface::drawButtonBox(const Rect& rect, ButtonKind kind, bool down) {
byte solidColor;
byte odl, our, idl, iur;
- switch (kind ) {
- case kSlider:
- cornerColor = 0x8b;
- frameColor = _vm->KnownColor2ColorId(kKnownColorBlack);
- fillColor = kITEColorLightBlue96;
- odl = kITEColorDarkBlue8a;
- our = kITEColorLightBlue92;
- idl = 0x89;
- iur = 0x94;
- solidColor = down ? kITEColorLightBlue94 : kITEColorLightBlue96;
- break;
- case kEdit:
- if (_vm->getGameId() == GID_ITE) {
- cornerColor = frameColor = fillColor = kITEColorLightBlue96;
- our = kITEColorDarkBlue8a;
- odl = kITEColorLightBlue94;
- solidColor = down ? kITEColorBlue : kITEColorDarkGrey0C;
- } else {
- cornerColor = frameColor = fillColor = _vm->KnownColor2ColorId(kKnownColorBlack);
- our = odl = solidColor = _vm->KnownColor2ColorId(kKnownColorBlack);
- }
- iur = 0x97;
- idl = 0x95;
- break;
- default:
- cornerColor = 0x8b;
- frameColor = _vm->KnownColor2ColorId(kKnownColorBlack);
- solidColor = fillColor = kITEColorLightBlue96;
- odl = kITEColorDarkBlue8a;
- our = kITEColorLightBlue94;
- idl = 0x97;
- iur = 0x95;
- if (down) {
- SWAP(odl, our);
- SWAP(idl, iur);
- }
- break;
+ switch (kind) {
+ case kSlider:
+ cornerColor = 0x8b;
+ frameColor = _vm->KnownColor2ColorId(kKnownColorBlack);
+ fillColor = kITEColorLightBlue96;
+ odl = kITEColorDarkBlue8a;
+ our = kITEColorLightBlue92;
+ idl = 0x89;
+ iur = 0x94;
+ solidColor = down ? kITEColorLightBlue94 : kITEColorLightBlue96;
+ break;
+ case kEdit:
+ if (_vm->getGameId() == GID_ITE) {
+ cornerColor = frameColor = fillColor = kITEColorLightBlue96;
+ our = kITEColorDarkBlue8a;
+ odl = kITEColorLightBlue94;
+ solidColor = down ? kITEColorBlue : kITEColorDarkGrey0C;
+ } else {
+ cornerColor = frameColor = fillColor = _vm->KnownColor2ColorId(kKnownColorBlack);
+ our = odl = solidColor = _vm->KnownColor2ColorId(kKnownColorBlack);
+ }
+ iur = 0x97;
+ idl = 0x95;
+ break;
+ default:
+ cornerColor = 0x8b;
+ frameColor = _vm->KnownColor2ColorId(kKnownColorBlack);
+ solidColor = fillColor = kITEColorLightBlue96;
+ odl = kITEColorDarkBlue8a;
+ our = kITEColorLightBlue94;
+ idl = 0x97;
+ iur = 0x95;
+ if (down) {
+ SWAP(odl, our);
+ SWAP(idl, iur);
+ }
+ break;
}
int x = rect.left;
diff --git a/engines/saga/isomap.cpp b/engines/saga/isomap.cpp
index 8999211f2a..f0ad9bbd5e 100644
--- a/engines/saga/isomap.cpp
+++ b/engines/saga/isomap.cpp
@@ -303,8 +303,8 @@ void IsoMap::adjustScroll(bool jump) {
_viewScroll.x = maxScrollPos.x;
}
} else {
- _viewScroll.y = smoothSlide( _viewScroll.y, minScrollPos.y, maxScrollPos.y );
- _viewScroll.x = smoothSlide( _viewScroll.x, minScrollPos.x, maxScrollPos.x );
+ _viewScroll.y = smoothSlide(_viewScroll.y, minScrollPos.y, maxScrollPos.y);
+ _viewScroll.x = smoothSlide(_viewScroll.x, minScrollPos.x, maxScrollPos.x);
}
if (_vm->_scene->currentSceneResourceId() == ITE_SCENE_OVERMAP) {
@@ -429,7 +429,7 @@ void IsoMap::drawTiles(const Location *location) {
workAreaWidth = _vm->getDisplayInfo().width + 128;
workAreaHeight = _vm->_scene->getHeight() + 128 + 80;
- for (u1 = u0, v1 = v0; metaTileY.y < workAreaHeight; u1--, v1-- ) {
+ for (u1 = u0, v1 = v0; metaTileY.y < workAreaHeight; u1--, v1--) {
metaTileX = metaTileY;
for (u2 = u1, v2 = v1; metaTileX.x < workAreaWidth; u2++, v2--, metaTileX.x += 256) {
@@ -611,7 +611,7 @@ void IsoMap::drawSpritePlatform(uint16 platformIndex, const Point &point, const
for (u = SAGA_PLATFORM_W - 1,
copyLocation.u() = location.u() - ((SAGA_PLATFORM_W - 1) << 4);
u >= 0 && s.x + 32 > _tileClip.left && s.y - SAGA_MAX_TILE_H < _tileClip.bottom;
- u--, copyLocation.u() += 16, s.x -= 16, s.y += 8 ) {
+ u--, copyLocation.u() += 16, s.x -= 16, s.y += 8) {
if (s.x < _tileClip.right && s.y > _tileClip.top) {
tileIndex = tilePlatform->tiles[u][v];
@@ -663,7 +663,7 @@ void IsoMap::drawPlatform(uint16 platformIndex, const Point &point, int16 absU,
for (u = SAGA_PLATFORM_W - 1;
u >= 0 && s.x + 32 > _tileClip.left && s.y - SAGA_MAX_TILE_H < _tileClip.bottom;
- u--, s.x -= 16, s.y += 8 ) {
+ u--, s.x -= 16, s.y += 8) {
if (s.x < _tileClip.right && s.y > _tileClip.top) {
tileIndex = tilePlatform->tiles[u][v];
@@ -955,7 +955,7 @@ void IsoMap::pushPoint(int16 u, int16 v, uint16 cost, uint16 direction) {
}
}
- if (mid < _queueCount ) {
+ if (mid < _queueCount) {
memmove(tilePoint + 1, tilePoint, (_queueCount - mid) * sizeof (*tilePoint));
}
_queueCount++;
@@ -1211,7 +1211,7 @@ void IsoMap::placeOnTileMap(const Location &start, Location &result, int16 dista
for (dir = 0; dir < 8; dir++) {
terrainMask = terraComp[dir];
- if (terrainMask & SAGA_IMPASSABLE ) {
+ if (terrainMask & SAGA_IMPASSABLE) {
continue;
}
@@ -1352,11 +1352,11 @@ void IsoMap::findDragonTilePath(ActorData* actor,const Location &start, const Lo
continue;
}
- tile = getTile(u1, v1, _platformHeight );
+ tile = getTile(u1, v1, _platformHeight);
if (tile != NULL) {
mask = tile->terrainMask;
if (((mask != 0) && (tile->GetFGDAttr() >= kTerrBlock)) ||
- ((mask != 0xFFFF) && (tile->GetBGDAttr() >= kTerrBlock)) ) {
+ ((mask != 0xFFFF) && (tile->GetBGDAttr() >= kTerrBlock))) {
pcell->visited = 1;
}
} else {
@@ -1453,7 +1453,7 @@ void IsoMap::findDragonTilePath(ActorData* actor,const Location &start, const Lo
actor->_walkStepsCount = i;
if (i) {
actor->setTileDirectionsSize(i, false);
- memcpy(actor->_tileDirections, res, i );
+ memcpy(actor->_tileDirections, res, i);
}
}
@@ -1586,7 +1586,7 @@ void IsoMap::findTilePath(ActorData* actor, const Location &start, const Locatio
actor->_walkStepsCount = i;
if (i) {
actor->setTileDirectionsSize(i, false);
- memcpy(actor->_tileDirections, res, i );
+ memcpy(actor->_tileDirections, res, i);
}
}
diff --git a/engines/saga/puzzle.cpp b/engines/saga/puzzle.cpp
index 5b13473d77..73839eb6ea 100644
--- a/engines/saga/puzzle.cpp
+++ b/engines/saga/puzzle.cpp
@@ -459,9 +459,9 @@ void Puzzle::solicitHint() {
_vm->getTimerManager()->installTimerProc(&hintTimerCallback, 50*1000000, this);
_vm->_interface->converseClear();
- _vm->_interface->converseAddText(optionsStr[_lang][kROAccept], 0, 1, 0, 0 );
- _vm->_interface->converseAddText(optionsStr[_lang][kRODecline], 0, 2, 0, 0 );
- _vm->_interface->converseAddText(optionsStr[_lang][kROLater], 0, 0, 0, 0 );
+ _vm->_interface->converseAddText(optionsStr[_lang][kROAccept], 0, 1, 0, 0);
+ _vm->_interface->converseAddText(optionsStr[_lang][kRODecline], 0, 2, 0, 0);
+ _vm->_interface->converseAddText(optionsStr[_lang][kROLater], 0, 0, 0, 0);
_vm->_interface->converseDisplayText();
break;
diff --git a/engines/saga/script.cpp b/engines/saga/script.cpp
index 5fd120ac33..b0e20da48c 100644
--- a/engines/saga/script.cpp
+++ b/engines/saga/script.cpp
@@ -1315,7 +1315,7 @@ void Script::setVerb(int verb) {
// engine did it, but it appears to work.
_pointerObject = ID_NOTHING;
- setLeftButtonVerb( verb );
+ setLeftButtonVerb(verb);
showVerb();
}
@@ -1549,7 +1549,7 @@ void Script::playfieldClick(const Point& mousePoint, bool leftButton) {
}
if (_pointerObject != ID_NOTHING) {
- hitObject( leftButton );
+ hitObject(leftButton);
} else {
_pendingObject[0] = ID_NOTHING;
_pendingObject[1] = ID_NOTHING;
@@ -1618,7 +1618,7 @@ void Script::playfieldClick(const Point& mousePoint, bool leftButton) {
_vm->_actor->actorWalkTo(ID_PROTAG, pickLocation);
} else {
if (_pendingVerb == getVerbType(kVerbLookAt)) {
- if (objectTypeId(_pendingObject[0]) != kGameObjectActor ) {
+ if (objectTypeId(_pendingObject[0]) != kGameObjectActor) {
_vm->_actor->actorWalkTo(ID_PROTAG, pickLocation);
} else {
doVerb();