[Scummvm-cvs-logs] SF.net SVN: scummvm: [22389] scummvm/trunk/engines/saga
eriktorbjorn at users.sourceforge.net
eriktorbjorn at users.sourceforge.net
Mon May 8 06:36:19 CEST 2006
Revision: 22389
Author: eriktorbjorn
Date: 2006-05-08 06:34:21 -0700 (Mon, 08 May 2006)
ViewCVS: http://svn.sourceforge.net/scummvm/?rev=22389&view=rev
Log Message:
-----------
Changed abs() to ABS()
Modified Paths:
--------------
scummvm/trunk/engines/kyra/sequences_v1.cpp
scummvm/trunk/engines/lure/hotspots.cpp
scummvm/trunk/engines/saga/actor.cpp
scummvm/trunk/engines/simon/items.cpp
Modified: scummvm/trunk/engines/kyra/sequences_v1.cpp
===================================================================
--- scummvm/trunk/engines/kyra/sequences_v1.cpp 2006-05-08 13:10:49 UTC (rev 22388)
+++ scummvm/trunk/engines/kyra/sequences_v1.cpp 2006-05-08 13:34:21 UTC (rev 22389)
@@ -1560,8 +1560,8 @@
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 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;
}
Modified: scummvm/trunk/engines/lure/hotspots.cpp
===================================================================
--- scummvm/trunk/engines/lure/hotspots.cpp 2006-05-08 13:10:49 UTC (rev 22388)
+++ scummvm/trunk/engines/lure/hotspots.cpp 2006-05-08 13:34:21 UTC (rev 22389)
@@ -348,7 +348,7 @@
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 @@
// 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 @@
// 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;
}
Modified: scummvm/trunk/engines/saga/actor.cpp
===================================================================
--- scummvm/trunk/engines/saga/actor.cpp 2006-05-08 13:10:49 UTC (rev 22388)
+++ scummvm/trunk/engines/saga/actor.cpp 2006-05-08 13:34:21 UTC (rev 22389)
@@ -2808,8 +2808,8 @@
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);
Modified: scummvm/trunk/engines/simon/items.cpp
===================================================================
--- scummvm/trunk/engines/simon/items.cpp 2006-05-08 13:10:49 UTC (rev 22388)
+++ scummvm/trunk/engines/simon/items.cpp 2006-05-08 13:34:21 UTC (rev 22389)
@@ -1465,8 +1465,8 @@
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;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list