aboutsummaryrefslogtreecommitdiff
path: root/engines/toltecs/segmap.cpp
diff options
context:
space:
mode:
authorJohannes Schickel2012-09-26 04:17:31 +0200
committerJohannes Schickel2012-09-26 04:17:55 +0200
commit89abab97e3124fa25eb4c7d3e8b38501747a8d17 (patch)
treed60a833c9ed352fbe44c0b9a6b8ff43fcbc29419 /engines/toltecs/segmap.cpp
parenta6c6c74350bb673c178d9756a1625ca128d24f21 (diff)
downloadscummvm-rg350-89abab97e3124fa25eb4c7d3e8b38501747a8d17.tar.gz
scummvm-rg350-89abab97e3124fa25eb4c7d3e8b38501747a8d17.tar.bz2
scummvm-rg350-89abab97e3124fa25eb4c7d3e8b38501747a8d17.zip
JANITORIAL: Remove trailing whitespaces.
Powered by: git ls-files "*.cpp" "*.h" "*.m" "*.mm" | xargs sed -i -e 's/[ \t]*$//'
Diffstat (limited to 'engines/toltecs/segmap.cpp')
-rw-r--r--engines/toltecs/segmap.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/engines/toltecs/segmap.cpp b/engines/toltecs/segmap.cpp
index f7d806c67b..b06c0af675 100644
--- a/engines/toltecs/segmap.cpp
+++ b/engines/toltecs/segmap.cpp
@@ -48,7 +48,7 @@ void SegmentMap::load(byte *source) {
uint16 maskRectCount = READ_LE_UINT16(source);
source += 2;
uint16 maskRectDataSize = maskRectCount * 12 + 2;
-
+
debug(0, "SegmentMap::load() maskRectCount = %d", maskRectCount);
for (uint16 i = 0; i < maskRectCount; i++) {
@@ -74,25 +74,25 @@ void SegmentMap::load(byte *source) {
// Load path rects
source += 2; // skip rects array size
-
+
uint16 pathRectCount = READ_LE_UINT16(source);
source += 2;
-
+
debug(0, "SegmentMap::load() pathRectCount = %d", pathRectCount);
-
+
for (uint16 i = 0; i < pathRectCount; i++) {
SegmapPathRect pathRect;
pathRect.y1 = READ_LE_UINT16(source);
pathRect.x1 = READ_LE_UINT16(source + 2);
pathRect.y2 = pathRect.y1 + READ_LE_UINT16(source + 4);
pathRect.x2 = pathRect.x1 + READ_LE_UINT16(source + 6);
-
+
debug(0, "SegmentMap::load() (%d, %d, %d, %d)", pathRect.x1, pathRect.y1, pathRect.x2, pathRect.y2);
source += 8;
_pathRects.push_back(pathRect);
}
-
+
// Load info rects
source += 2; // skip rects array size
@@ -141,7 +141,7 @@ void SegmentMap::adjustPathPoint(int16 &x, int16 &y) {
uint32 minDistance = 0xFFFFFFFF, distance;
int16 adjustedX = 0, adjustedY = 0, x2, y2;
-
+
for (int16 rectIndex = 0; rectIndex < (int16)_pathRects.size(); rectIndex++) {
if (x >= _pathRects[rectIndex].x1 && x < _pathRects[rectIndex].x2) {
@@ -174,7 +174,7 @@ void SegmentMap::adjustPathPoint(int16 &x, int16 &y) {
}
}
-
+
x = adjustedX;
y = adjustedY;
@@ -318,7 +318,7 @@ void SegmentMap::findPath(int16 *pointsArray, int16 destX, int16 destY, int16 so
pointsArray[0] = 0;
pointsArray[1] = TO_LE_16(_pathNodesCount + 1);
}
-
+
debug(0, "SegmentMap::findPath() count = %d", FROM_LE_16(pointsArray[1]));
#if 0 // DEBUG: Draw the path we found
@@ -335,7 +335,7 @@ void SegmentMap::findPath(int16 *pointsArray, int16 destX, int16 destY, int16 so
sy = y;
}
#endif
-
+
}
int8 SegmentMap::getScalingAtPoint(int16 x, int16 y) {