aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/saga/events.cpp2
-rw-r--r--engines/saga/isomap.cpp76
-rw-r--r--engines/saga/puzzle.cpp22
3 files changed, 50 insertions, 50 deletions
diff --git a/engines/saga/events.cpp b/engines/saga/events.cpp
index b7c3fa4d6e..912e62d492 100644
--- a/engines/saga/events.cpp
+++ b/engines/saga/events.cpp
@@ -176,7 +176,7 @@ int Events::handleContinuous(Event *event) {
rect.setWidth(w);
rect.setHeight(h);
- _vm->_render->getBackGroundSurface()->transitionDissolve( maskBuffer, rect, 1, event_pc);
+ _vm->_render->getBackGroundSurface()->transitionDissolve(maskBuffer, rect, 1, event_pc);
_vm->_render->setFullRefresh(true);
break;
default:
diff --git a/engines/saga/isomap.cpp b/engines/saga/isomap.cpp
index afbe68c240..768fbd22ff 100644
--- a/engines/saga/isomap.cpp
+++ b/engines/saga/isomap.cpp
@@ -443,7 +443,7 @@ void IsoMap::drawTiles(const Location *location) {
if (uc != u2 || vc != v2) {
metaTileIndex = 0;
- switch ( _tileMap.edgeType) {
+ switch (_tileMap.edgeType) {
case kEdgeTypeBlack:
continue;
case kEdgeTypeFill0:
@@ -487,7 +487,7 @@ void IsoMap::drawTiles(const Location *location) {
if (uc != u2 || vc != v2) {
metaTileIndex = 0;
- switch ( _tileMap.edgeType) {
+ switch (_tileMap.edgeType) {
case kEdgeTypeBlack:
continue;
case kEdgeTypeFill0:
@@ -1005,7 +1005,7 @@ int16 IsoMap::getTileIndex(int16 u, int16 v, int16 z) {
if ((uc != mtileU) || (vc != mtileV)) {
metaTileIndex = 0;
- switch ( _tileMap.edgeType) {
+ switch (_tileMap.edgeType) {
case kEdgeTypeBlack:
return 0;
case kEdgeTypeFill0:
@@ -1183,7 +1183,7 @@ void IsoMap::placeOnTileMap(const Location &start, Location &result, int16 dista
_platformHeight = _vm->_actor->_protagonist->_location.z / 8;
- memset( &_searchArray, 0, sizeof(_searchArray));
+ memset(&_searchArray, 0, sizeof(_searchArray));
for (ActorDataArray::const_iterator actor = _vm->_actor->_actors.begin(); actor != _vm->_actor->_actors.end(); ++actor) {
if (!actor->_inScene) continue;
@@ -1238,7 +1238,7 @@ void IsoMap::placeOnTileMap(const Location &start, Location &result, int16 dista
}
}
- pushPoint(tilePoint.u + tdir->u,tilePoint.v + tdir->v, tilePoint.cost + tdir->cost, dir);
+ pushPoint(tilePoint.u + tdir->u, tilePoint.v + tdir->v, tilePoint.cost + tdir->cost, dir);
}
}
@@ -1253,35 +1253,35 @@ bool IsoMap::findNearestChasm(int16 &u0, int16 &v0, uint16 &direction) {
v = v0;
for (i = 1; i < 5; i++) {
- if (getTile( u - i, v, 6) == NULL) {
+ if (getTile(u - i, v, 6) == NULL) {
u0 = u - i - 1;
v0 = v;
direction = kDirDownLeft;
return true;
}
- if (getTile( u, v - i, 6) == NULL) {
+ if (getTile(u, v - i, 6) == NULL) {
u0 = u;
v0 = v - i - 1;
direction = kDirDownRight;
return true;
}
- if (getTile( u - i, v - i, 6) == NULL) {
+ if (getTile(u - i, v - i, 6) == NULL) {
u0 = u - i - 1;
v0 = v - i - 1;
direction = kDirDown;
return true;
}
- if (getTile( u + i, v - i, 6) == NULL) {
+ if (getTile(u + i, v - i, 6) == NULL) {
u0 = u + i + 1;
v0 = v - i - 1;
direction = kDirDownRight;
return true;
}
- if (getTile( u - i, v + i, 6) == NULL) {
+ if (getTile(u - i, v + i, 6) == NULL) {
u0 = u + i + 1;
v0 = v - i - 1;
direction = kDirLeft;
@@ -1290,21 +1290,21 @@ bool IsoMap::findNearestChasm(int16 &u0, int16 &v0, uint16 &direction) {
}
for (i = 1; i < 5; i++) {
- if (getTile( u + i, v, 6) == NULL) {
+ if (getTile(u + i, v, 6) == NULL) {
u0 = u + i + 1;
v0 = v;
direction = kDirUpRight;
return true;
}
- if (getTile( u, v + i, 6) == NULL) {
+ if (getTile(u, v + i, 6) == NULL) {
u0 = u;
v0 = v + i + 1;
direction = kDirUpLeft;
return true;
}
- if (getTile( u + i, v + i, 6) == NULL) {
+ if (getTile(u + i, v + i, 6) == NULL) {
u0 = u + i + 1;
v0 = v + i + 1;
direction = kDirUp;
@@ -1314,7 +1314,7 @@ bool IsoMap::findNearestChasm(int16 &u0, int16 &v0, uint16 &direction) {
return false;
}
-void IsoMap::findDragonTilePath(ActorData* actor,const Location &start, const Location &end, uint16 initialDirection) {
+void IsoMap::findDragonTilePath(ActorData* actor, const Location &start, const Location &end, uint16 initialDirection) {
byte *res;
int i;
int16 u;
@@ -1350,7 +1350,7 @@ void IsoMap::findDragonTilePath(ActorData* actor,const Location &start, const Lo
_platformHeight = _vm->_actor->_protagonist->_location.z / 8;
- memset( &_dragonSearchArray, 0, sizeof(_dragonSearchArray));
+ memset(&_dragonSearchArray, 0, sizeof(_dragonSearchArray));
for (u = 0; u < SAGA_DRAGON_SEARCH_DIAMETER; u++) {
for (v = 0; v < SAGA_DRAGON_SEARCH_DIAMETER; v++) {
@@ -1380,7 +1380,7 @@ void IsoMap::findDragonTilePath(ActorData* actor,const Location &start, const Lo
first = true;
_queueCount = _readCount = 0;
- pushDragonPoint( SAGA_DRAGON_SEARCH_CENTER, SAGA_DRAGON_SEARCH_CENTER, initialDirection);
+ pushDragonPoint(SAGA_DRAGON_SEARCH_CENTER, SAGA_DRAGON_SEARCH_CENTER, initialDirection);
while (_queueCount != _readCount) {
@@ -1404,40 +1404,40 @@ void IsoMap::findDragonTilePath(ActorData* actor,const Location &start, const Lo
switch (tilePoint->direction) {
case kDirUpRight:
- if (checkDragonPoint( tilePoint->u + 1, tilePoint->v + 0, kDirUpRight)) {
- pushDragonPoint( tilePoint->u + 2, tilePoint->v + 0, kDirUpRight);
- pushDragonPoint( tilePoint->u + 1, tilePoint->v + 1, kDirUpLeft);
- pushDragonPoint( tilePoint->u + 1, tilePoint->v - 1, kDirDownRight);
+ if (checkDragonPoint(tilePoint->u + 1, tilePoint->v + 0, kDirUpRight)) {
+ pushDragonPoint(tilePoint->u + 2, tilePoint->v + 0, kDirUpRight);
+ pushDragonPoint(tilePoint->u + 1, tilePoint->v + 1, kDirUpLeft);
+ pushDragonPoint(tilePoint->u + 1, tilePoint->v - 1, kDirDownRight);
}
break;
case kDirDownRight:
- if (checkDragonPoint( tilePoint->u + 0, tilePoint->v - 1, kDirDownRight)) {
- pushDragonPoint( tilePoint->u + 0, tilePoint->v - 2, kDirDownRight);
- pushDragonPoint( tilePoint->u + 1, tilePoint->v - 1, kDirUpRight);
- pushDragonPoint( tilePoint->u - 1, tilePoint->v - 1, kDirDownLeft);
+ if (checkDragonPoint(tilePoint->u + 0, tilePoint->v - 1, kDirDownRight)) {
+ pushDragonPoint(tilePoint->u + 0, tilePoint->v - 2, kDirDownRight);
+ pushDragonPoint(tilePoint->u + 1, tilePoint->v - 1, kDirUpRight);
+ pushDragonPoint(tilePoint->u - 1, tilePoint->v - 1, kDirDownLeft);
}
break;
case kDirDownLeft:
- if (checkDragonPoint( tilePoint->u - 1, tilePoint->v + 0, kDirDownLeft)) {
- pushDragonPoint( tilePoint->u - 2, tilePoint->v + 0, kDirDownLeft);
- pushDragonPoint( tilePoint->u - 1, tilePoint->v - 1, kDirDownRight);
- pushDragonPoint( tilePoint->u - 1, tilePoint->v + 1, kDirUpLeft);
+ if (checkDragonPoint(tilePoint->u - 1, tilePoint->v + 0, kDirDownLeft)) {
+ pushDragonPoint(tilePoint->u - 2, tilePoint->v + 0, kDirDownLeft);
+ pushDragonPoint(tilePoint->u - 1, tilePoint->v - 1, kDirDownRight);
+ pushDragonPoint(tilePoint->u - 1, tilePoint->v + 1, kDirUpLeft);
}
break;
case kDirUpLeft:
- if (checkDragonPoint( tilePoint->u + 0, tilePoint->v + 1, kDirUpLeft)) {
- pushDragonPoint( tilePoint->u + 0, tilePoint->v + 2, kDirUpLeft);
- pushDragonPoint( tilePoint->u - 1, tilePoint->v + 1, kDirDownLeft);
- pushDragonPoint( tilePoint->u + 1, tilePoint->v + 1, kDirUpRight);
+ if (checkDragonPoint(tilePoint->u + 0, tilePoint->v + 1, kDirUpLeft)) {
+ pushDragonPoint(tilePoint->u + 0, tilePoint->v + 2, kDirUpLeft);
+ pushDragonPoint(tilePoint->u - 1, tilePoint->v + 1, kDirDownLeft);
+ pushDragonPoint(tilePoint->u + 1, tilePoint->v + 1, kDirUpRight);
}
break;
}
if (first && (_queueCount == _readCount)) {
- pushDragonPoint( tilePoint->u + 1, tilePoint->v + 0, kDirUpRight);
- pushDragonPoint( tilePoint->u + 0, tilePoint->v - 1, kDirDownRight);
- pushDragonPoint( tilePoint->u - 1, tilePoint->v + 0, kDirDownLeft);
- pushDragonPoint( tilePoint->u + 0, tilePoint->v + 1, kDirUpLeft);
+ pushDragonPoint(tilePoint->u + 1, tilePoint->v + 0, kDirUpRight);
+ pushDragonPoint(tilePoint->u + 0, tilePoint->v - 1, kDirDownRight);
+ pushDragonPoint(tilePoint->u - 1, tilePoint->v + 0, kDirDownLeft);
+ pushDragonPoint(tilePoint->u + 0, tilePoint->v + 1, kDirUpLeft);
}
first = false;
}
@@ -1507,7 +1507,7 @@ void IsoMap::findTilePath(ActorData* actor, const Location &start, const Locatio
- memset( &_searchArray, 0, sizeof(_searchArray));
+ memset(&_searchArray, 0, sizeof(_searchArray));
if (!(actor->_actorFlags & kActorNoCollide) &&
(_vm->_scene->currentSceneResourceId() != ITE_SCENE_OVERMAP)) {
@@ -1648,7 +1648,7 @@ bool IsoMap::nextTileTarget(ActorData* actor) {
void IsoMap::screenPointToTileCoords(const Point &position, Location &location) {
Point mPos(position);
- int x,y;
+ int x, y;
if (_vm->_scene->currentSceneResourceId() == ITE_SCENE_OVERMAP){
if (mPos.y < 16) {
diff --git a/engines/saga/puzzle.cpp b/engines/saga/puzzle.cpp
index 1d014052ed..77090860aa 100644
--- a/engines/saga/puzzle.cpp
+++ b/engines/saga/puzzle.cpp
@@ -93,25 +93,25 @@ Puzzle::Puzzle(SagaEngine *vm) : _vm(vm), _solved(false), _active(false) {
_hintSpeaker = 0;
_slidePointX = _slidePointY = 0;
- initPieceInfo( 0, 268, 18, 0, 0, 0 + PUZZLE_X_OFFSET, 0 + PUZZLE_Y_OFFSET, 0, 3,
- Point(0, 1), Point(0, 62), Point(15, 31), Point(0, 0), Point(0, 0), Point(0,0));
- initPieceInfo( 1, 270, 52, 0, 0, 0 + PUZZLE_X_OFFSET, 32 + PUZZLE_Y_OFFSET, 0, 4,
+ initPieceInfo(0, 268, 18, 0, 0, 0 + PUZZLE_X_OFFSET, 0 + PUZZLE_Y_OFFSET, 0, 3,
+ Point(0, 1), Point(0, 62), Point(15, 31), Point(0, 0), Point(0, 0), Point(0, 0));
+ initPieceInfo(1, 270, 52, 0, 0, 0 + PUZZLE_X_OFFSET, 32 + PUZZLE_Y_OFFSET, 0, 4,
Point(0, 31), Point(0, 47), Point(39, 47), Point(15, 1), Point(0, 0), Point(0, 0));
- initPieceInfo( 2, 19, 51, 0, 0, 0 + PUZZLE_X_OFFSET, 0 + PUZZLE_Y_OFFSET, 0, 4,
+ initPieceInfo(2, 19, 51, 0, 0, 0 + PUZZLE_X_OFFSET, 0 + PUZZLE_Y_OFFSET, 0, 4,
Point(0, 0), Point(23, 46), Point(39, 15), Point(31, 0), Point(0, 0), Point(0, 0));
- initPieceInfo( 3, 73, 0, 0, 0, 32 + PUZZLE_X_OFFSET, 0 + PUZZLE_Y_OFFSET, 0, 6,
+ initPieceInfo(3, 73, 0, 0, 0, 32 + PUZZLE_X_OFFSET, 0 + PUZZLE_Y_OFFSET, 0, 6,
Point(0, 0), Point(8, 16), Point(0, 31), Point(31, 31), Point(39, 15), Point(31, 0));
- initPieceInfo( 4, 0, 35, 0, 0, 64 + PUZZLE_X_OFFSET, 16 + PUZZLE_Y_OFFSET, 0, 4,
+ initPieceInfo(4, 0, 35, 0, 0, 64 + PUZZLE_X_OFFSET, 16 + PUZZLE_Y_OFFSET, 0, 4,
Point(0, 15), Point(15, 46), Point(23, 32), Point(7, 1), Point(0, 0), Point(0, 0));
- initPieceInfo( 5, 215, 0, 0, 0, 24 + PUZZLE_X_OFFSET, 32 + PUZZLE_Y_OFFSET, 0, 6,
+ initPieceInfo(5, 215, 0, 0, 0, 24 + PUZZLE_X_OFFSET, 32 + PUZZLE_Y_OFFSET, 0, 6,
Point(0, 15), Point(8, 31), Point(39, 31), Point(47, 16), Point(39, 0), Point(8, 0));
- initPieceInfo( 6, 159, 0, 0, 0, 32 + PUZZLE_X_OFFSET, 48 + PUZZLE_Y_OFFSET, 0, 5,
+ initPieceInfo(6, 159, 0, 0, 0, 32 + PUZZLE_X_OFFSET, 48 + PUZZLE_Y_OFFSET, 0, 5,
Point(0, 16), Point(8, 31), Point(55, 31), Point(39, 1), Point(32, 15), Point(0, 0));
- initPieceInfo( 7, 9, 70, 0, 0, 80 + PUZZLE_X_OFFSET, 32 + PUZZLE_Y_OFFSET, 0, 5,
+ initPieceInfo(7, 9, 70, 0, 0, 80 + PUZZLE_X_OFFSET, 32 + PUZZLE_Y_OFFSET, 0, 5,
Point(0, 31), Point(8, 47), Point(23, 47), Point(31, 31), Point(15, 1), Point(0, 0));
- initPieceInfo( 8, 288, 18, 0, 0, 96 + PUZZLE_X_OFFSET, 0 + PUZZLE_Y_OFFSET, 0, 4,
+ initPieceInfo(8, 288, 18, 0, 0, 96 + PUZZLE_X_OFFSET, 0 + PUZZLE_Y_OFFSET, 0, 4,
Point(0, 31), Point(15, 62), Point(31, 32), Point(15, 1), Point(0, 0), Point(0, 0));
- initPieceInfo( 9, 112, 0, 0, 0, 112 + PUZZLE_X_OFFSET, 0 + PUZZLE_Y_OFFSET, 0, 4,
+ initPieceInfo(9, 112, 0, 0, 0, 112 + PUZZLE_X_OFFSET, 0 + PUZZLE_Y_OFFSET, 0, 4,
Point(0, 0), Point(16, 31), Point(47, 31), Point(31, 0), Point(0, 0), Point(0, 0));
initPieceInfo(10, 27, 89, 0, 0, 104 + PUZZLE_X_OFFSET, 32 + PUZZLE_Y_OFFSET, 0, 4,
Point(0, 47), Point(31, 47), Point(31, 0), Point(24, 0), Point(0, 0), Point(0, 0));