[Scummvm-cvs-logs] SF.net SVN: scummvm:[50890] scummvm/trunk/engines
eriktorbjorn at users.sourceforge.net
eriktorbjorn at users.sourceforge.net
Wed Jul 14 19:02:14 CEST 2010
Revision: 50890
http://scummvm.svn.sourceforge.net/scummvm/?rev=50890&view=rev
Author: eriktorbjorn
Date: 2010-07-14 17:02:14 +0000 (Wed, 14 Jul 2010)
Log Message:
-----------
Changed abs() to ABS() in a few places.
Modified Paths:
--------------
scummvm/trunk/engines/draci/walking.cpp
scummvm/trunk/engines/drascula/actors.cpp
Modified: scummvm/trunk/engines/draci/walking.cpp
===================================================================
--- scummvm/trunk/engines/draci/walking.cpp 2010-07-14 16:57:16 UTC (rev 50889)
+++ scummvm/trunk/engines/draci/walking.cpp 2010-07-14 17:02:14 UTC (rev 50890)
@@ -324,7 +324,7 @@
}
int WalkingMap::pointsBetween(const Common::Point &p1, const Common::Point &p2) {
- return MAX(abs(p2.x - p1.x), abs(p2.y - p1.y));
+ return MAX(ABS(p2.x - p1.x), ABS(p2.y - p1.y));
}
Common::Point WalkingMap::interpolate(const Common::Point &p1, const Common::Point &p2, int i, int n) {
@@ -636,7 +636,7 @@
Movement WalkingState::animationForDirection(const Common::Point &here, const Common::Point &there) {
const int dx = there.x - here.x;
const int dy = there.y - here.y;
- if (abs(dx) >= abs(dy)) {
+ if (ABS(dx) >= ABS(dy)) {
return dx >= 0 ? kMoveRight : kMoveLeft;
} else {
return dy >= 0 ? kMoveDown : kMoveUp;
Modified: scummvm/trunk/engines/drascula/actors.cpp
===================================================================
--- scummvm/trunk/engines/drascula/actors.cpp 2010-07-14 16:57:16 UTC (rev 50889)
+++ scummvm/trunk/engines/drascula/actors.cpp 2010-07-14 17:02:14 UTC (rev 50890)
@@ -312,9 +312,9 @@
float distanceX, distanceY;
if (currentChapter == 2)
- distanceX = abs(curX + curWidth - roomX);
+ distanceX = ABS(curX + curWidth - roomX);
else
- distanceX = abs(curX + curWidth / 2 - roomX);
+ distanceX = ABS(curX + curWidth / 2 - roomX);
distanceY = (curY + curHeight) - roomY;
@@ -354,9 +354,9 @@
float distanceX, distanceY;
if (currentChapter == 2)
- distanceX = abs(curX + curWidth - roomX);
+ distanceX = ABS(curX + curWidth - roomX);
else
- distanceX = abs(curX + curWidth / 2 - roomX);
+ distanceX = ABS(curX + curWidth / 2 - roomX);
distanceY = roomY - (curY + curHeight);
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