aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorTorbjörn Andersson2006-05-08 13:34:21 +0000
committerTorbjörn Andersson2006-05-08 13:34:21 +0000
commite2656a276afa9497750cc58536c3330605d6aeec (patch)
tree3577bbe98bb6cf19958f33738297228a110f0422 /engines
parent3f9395831cba0024e57aa19d8222845ae7778a5d (diff)
downloadscummvm-rg350-e2656a276afa9497750cc58536c3330605d6aeec.tar.gz
scummvm-rg350-e2656a276afa9497750cc58536c3330605d6aeec.tar.bz2
scummvm-rg350-e2656a276afa9497750cc58536c3330605d6aeec.zip
Changed abs() to ABS()
svn-id: r22389
Diffstat (limited to 'engines')
-rw-r--r--engines/kyra/sequences_v1.cpp8
-rw-r--r--engines/lure/hotspots.cpp10
-rw-r--r--engines/saga/actor.cpp4
-rw-r--r--engines/simon/items.cpp4
4 files changed, 13 insertions, 13 deletions
diff --git a/engines/kyra/sequences_v1.cpp b/engines/kyra/sequences_v1.cpp
index 502b2405f7..9b8c4ca7f7 100644
--- a/engines/kyra/sequences_v1.cpp
+++ b/engines/kyra/sequences_v1.cpp
@@ -1560,8 +1560,8 @@ void KyraEngine::initBeadState(int x, int y, int x2, int y2, int unk, BeadState
unk2 = -1;
}
- xDiff = abs(xDiff);
- yDiff = abs(yDiff);
+ xDiff = ABS(xDiff);
+ yDiff = ABS(yDiff);
ptr->y = 0;
ptr->x = 0;
@@ -1600,11 +1600,11 @@ int KyraEngine::processBead(int x, int y, int &x2, int &y2, BeadState *ptr) {
}
}
- int temp = abs(x - ptr->dstX);
+ int temp = ABS(x - ptr->dstX);
if (ptr->unk9 > temp) {
xPos = ptr->dstX;
}
- temp = abs(y - ptr->dstY);
+ temp = ABS(y - ptr->dstY);
if (ptr->unk9 > temp) {
yPos = ptr->dstY;
}
diff --git a/engines/lure/hotspots.cpp b/engines/lure/hotspots.cpp
index c7faa092ad..9c9ddfe156 100644
--- a/engines/lure/hotspots.cpp
+++ b/engines/lure/hotspots.cpp
@@ -348,7 +348,7 @@ void Hotspot::faceHotspot(HotspotData *hotspot) {
int xp = x() - hotspot->startX;
int yp = y() + heightCopy() - (hotspot->startY + hotspot->heightCopy);
- if (abs(yp) >= abs(xp)) {
+ if (ABS(yp) >= ABS(xp)) {
if (yp < 0) setDirection(DOWN);
else setDirection(UP);
} else {
@@ -529,8 +529,8 @@ bool Hotspot::characterWalkingCheck(HotspotData *hotspot) {
// Special handling for walking
// if (((xp >> 3) != (x() >> 3)) ||
// ((((y() + heightCopy()) >> 3) - 1) != (yp >> 3))) {
- if ((abs(xp - x()) > 8) ||
- (abs(yp - (y() + heightCopy())) > 8)) {
+ if ((ABS(xp - x()) > 8) ||
+ (ABS(yp - (y() + heightCopy())) > 8)) {
walkTo(xp, yp);
return true;
} else {
@@ -541,8 +541,8 @@ bool Hotspot::characterWalkingCheck(HotspotData *hotspot) {
// Default walking handling
// TODO: ANIM[27h] = 1 if hotspot has walk co-ordinates
- if ((abs(x() - xp) >= 8) ||
- (abs(y() + heightCopy() - yp - 1) >= 19)) {
+ if ((ABS(x() - xp) >= 8) ||
+ (ABS(y() + heightCopy() - yp - 1) >= 19)) {
walkTo(xp, yp);
return true;
}
diff --git a/engines/saga/actor.cpp b/engines/saga/actor.cpp
index 4b2f5a5cd9..9b8be7c014 100644
--- a/engines/saga/actor.cpp
+++ b/engines/saga/actor.cpp
@@ -2808,8 +2808,8 @@ int pathLine(Point *pointList, const Point &point1, const Point &point2) {
int errterm;
int i;
- delta.x = abs(point2.x - point1.x);
- delta.y = abs(point2.y - point1.y);
+ delta.x = ABS(point2.x - point1.x);
+ delta.y = ABS(point2.y - point1.y);
point = point1;
s1 = integerCompare(point2.x, point1.x);
s2 = integerCompare(point2.y, point1.y);
diff --git a/engines/simon/items.cpp b/engines/simon/items.cpp
index 700546c6a4..dd3004e113 100644
--- a/engines/simon/items.cpp
+++ b/engines/simon/items.cpp
@@ -1465,8 +1465,8 @@ void SimonEngine::o_getPathPosn() {
if (!p)
continue;
for (j = 0; readUint16Wrapper(&p[0]) != end; j++, p += 2) {
- x_diff = abs((int16)(readUint16Wrapper(&p[0]) - x));
- y_diff = abs((int16)(readUint16Wrapper(&p[1]) - 12 - y));
+ x_diff = ABS((int16)(readUint16Wrapper(&p[0]) - x));
+ y_diff = ABS((int16)(readUint16Wrapper(&p[1]) - 12 - y));
if (x_diff < y_diff) {
x_diff /= 4;