[Scummvm-cvs-logs] SF.net SVN: scummvm: [26639] scummvm/trunk/engines
eriktorbjorn at users.sourceforge.net
eriktorbjorn at users.sourceforge.net
Sat Apr 28 06:29:06 CEST 2007
Revision: 26639
http://scummvm.svn.sourceforge.net/scummvm/?rev=26639&view=rev
Author: eriktorbjorn
Date: 2007-04-27 21:29:05 -0700 (Fri, 27 Apr 2007)
Log Message:
-----------
Changed abs() to ABS()
Modified Paths:
--------------
scummvm/trunk/engines/agi/motion.cpp
scummvm/trunk/engines/agi/op_cmd.cpp
scummvm/trunk/engines/cruise/actor.cpp
scummvm/trunk/engines/cruise/ctp.cpp
scummvm/trunk/engines/cruise/function.cpp
scummvm/trunk/engines/cruise/perso.cpp
scummvm/trunk/engines/cruise/polys.cpp
scummvm/trunk/engines/parallaction/intro.cpp
Modified: scummvm/trunk/engines/agi/motion.cpp
===================================================================
--- scummvm/trunk/engines/agi/motion.cpp 2007-04-28 04:22:23 UTC (rev 26638)
+++ scummvm/trunk/engines/agi/motion.cpp 2007-04-28 04:29:05 UTC (rev 26639)
@@ -110,7 +110,7 @@
while ((v->direction = _rnd->getRandomNumber(8)) == 0) {
}
- d = (abs(egoY - objY) + abs(egoX - objX)) / 2;
+ d = (ABS(egoY - objY) + ABS(egoX - objX)) / 2;
if (d < v->stepSize) {
v->parm3 = v->stepSize;
Modified: scummvm/trunk/engines/agi/op_cmd.cpp
===================================================================
--- scummvm/trunk/engines/agi/op_cmd.cpp 2007-04-28 04:22:23 UTC (rev 26638)
+++ scummvm/trunk/engines/agi/op_cmd.cpp 2007-04-28 04:29:05 UTC (rev 26639)
@@ -1014,7 +1014,7 @@
y1 = v0->yPos;
x2 = v1->xPos + v1->xSize / 2;
y2 = v1->yPos;
- d = abs(x1 - x2) + abs(y1 - y2);
+ d = ABS(x1 - x2) + ABS(y1 - y2);
if (d > 0xfe)
d = 0xfe;
} else {
Modified: scummvm/trunk/engines/cruise/actor.cpp
===================================================================
--- scummvm/trunk/engines/cruise/actor.cpp 2007-04-28 04:22:23 UTC (rev 26638)
+++ scummvm/trunk/engines/cruise/actor.cpp 2007-04-28 04:29:05 UTC (rev 26639)
@@ -717,7 +717,7 @@
void set_anim(int ovl, int obj, int start, int x, int y, int mat, int state) {
int newf, zoom;
- newf = abs(mat) - 1;
+ newf = ABS(mat) - 1;
zoom = computeZoom(y);
if (mat < 0)
Modified: scummvm/trunk/engines/cruise/ctp.cpp
===================================================================
--- scummvm/trunk/engines/cruise/ctp.cpp 2007-04-28 04:22:23 UTC (rev 26638)
+++ scummvm/trunk/engines/cruise/ctp.cpp 2007-04-28 04:29:05 UTC (rev 26639)
@@ -23,6 +23,7 @@
*/
#include "cruise/cruise_main.h"
+#include "common/util.h"
namespace Cruise {
@@ -44,8 +45,8 @@
uint8 walkboxTable[0x12];
int ctpProc2(int varX, int varY, int paramX, int paramY) {
- int diffX = abs(paramX - varX);
- int diffY = abs(paramY - varY);
+ int diffX = ABS(paramX - varX);
+ int diffY = ABS(paramY - varY);
if (diffX > diffY) {
diffY = diffX;
Modified: scummvm/trunk/engines/cruise/function.cpp
===================================================================
--- scummvm/trunk/engines/cruise/function.cpp 2007-04-28 04:22:23 UTC (rev 26638)
+++ scummvm/trunk/engines/cruise/function.cpp 2007-04-28 04:29:05 UTC (rev 26639)
@@ -24,6 +24,7 @@
#include "cruise/cruise_main.h"
#include "cruise/cell.h"
+#include "common/util.h"
namespace Cruise {
@@ -857,7 +858,7 @@
int sign;
if (di) {
- sign = di / (abs(di));
+ sign = di / (ABS(di));
} else {
sign = 0;
}
@@ -1180,7 +1181,7 @@
si->stepX = stepX;
si->stepY = stepY;
- int newFrame = abs(actorTable1[direction].data[0]) - 1;
+ int newFrame = ABS(actorTable1[direction].data[0]) - 1;
int zoom = computeZoom(params.Y);
Modified: scummvm/trunk/engines/cruise/perso.cpp
===================================================================
--- scummvm/trunk/engines/cruise/perso.cpp 2007-04-28 04:22:23 UTC (rev 26638)
+++ scummvm/trunk/engines/cruise/perso.cpp 2007-04-28 04:29:05 UTC (rev 26639)
@@ -23,6 +23,7 @@
*/
#include "cruise/cruise_main.h"
+#include "common/util.h"
namespace Cruise {
@@ -62,9 +63,9 @@
int h, v, h1, v1;
h1 = x1 - x2;
- h = abs(h1);
+ h = ABS(h1);
v1 = y1 - y2;
- v = abs(v1);
+ v = ABS(v1);
if (v > h) {
if (h > 30)
Modified: scummvm/trunk/engines/cruise/polys.cpp
===================================================================
--- scummvm/trunk/engines/cruise/polys.cpp 2007-04-28 04:22:23 UTC (rev 26638)
+++ scummvm/trunk/engines/cruise/polys.cpp 2007-04-28 04:29:05 UTC (rev 26639)
@@ -50,8 +50,8 @@
void bsubline_1(int x1, int y1, int x2, int y2, char c) {
int x, y, ddx, ddy, e;
- ddx = abs(x2 - x1);
- ddy = abs(y2 - y1) << 1;
+ ddx = ABS(x2 - x1);
+ ddy = ABS(y2 - y1) << 1;
e = ddx - ddy;
ddx <<= 1;
@@ -76,8 +76,8 @@
void bsubline_2(int x1, int y1, int x2, int y2, char c) {
int x, y, ddx, ddy, e;
- ddx = abs(x2 - x1) << 1;
- ddy = abs(y2 - y1);
+ ddx = ABS(x2 - x1) << 1;
+ ddy = ABS(y2 - y1);
e = ddy - ddx;
ddy <<= 1;
@@ -103,8 +103,8 @@
int x, y, ddx, ddy, e;
- ddx = abs(x1 - x2) << 1;
- ddy = abs(y2 - y1);
+ ddx = ABS(x1 - x2) << 1;
+ ddy = ABS(y2 - y1);
e = ddy - ddx;
ddy <<= 1;
@@ -130,8 +130,8 @@
int x, y, ddx, ddy, e;
- ddy = abs(y2 - y1) << 1;
- ddx = abs(x1 - x2);
+ ddy = ABS(y2 - y1) << 1;
+ ddx = ABS(x1 - x2);
e = ddx - ddy;
ddx <<= 1;
Modified: scummvm/trunk/engines/parallaction/intro.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/intro.cpp 2007-04-28 04:22:23 UTC (rev 26638)
+++ scummvm/trunk/engines/parallaction/intro.cpp 2007-04-28 04:29:05 UTC (rev 26639)
@@ -210,13 +210,13 @@
_vm->_gfx->maskOpNot(oldX, oldY, unused);
_vm->_gfx->maskOpNot(newX, newY, unused);
- if (abs(dx) >= abs(dy)) {
+ if (ABS(dx) >= ABS(dy)) {
- int16 v4 = abs(dy);
+ int16 v4 = ABS(dy);
if (dx >= 0 && dy >= 0) {
for (uint16 i = 1; i < dx; i++) {
v4 += dy;
- if (abs(dx) < v4) {
+ if (ABS(dx) < v4) {
oldY++;
v4 -= dx;
}
@@ -225,22 +225,22 @@
}
if (dx < 0 && dy >= 0) {
- for (uint16 i = 1; i > abs(dx); i++) {
+ for (uint16 i = 1; i > ABS(dx); i++) {
v4 += dy;
- if (abs(dx) < v4) {
+ if (ABS(dx) < v4) {
oldY++;
- v4 -= abs(dx);
+ v4 -= ABS(dx);
}
_vm->_gfx->maskOpNot(oldX - i, oldY, unused);
}
}
if (dx < 0 && dy < 0) {
- for (uint16 i = 1; i > abs(dx); i++) {
+ for (uint16 i = 1; i > ABS(dx); i++) {
v4 += dy;
- if (abs(v4) > abs(dx)) {
+ if (ABS(v4) > ABS(dx)) {
oldY--;
- v4 -= abs(dx);
+ v4 -= ABS(dx);
}
_vm->_gfx->maskOpNot(oldX - i, oldY, unused);
}
@@ -259,9 +259,9 @@
}
- if (abs(dy) < abs(dx)) {
+ if (ABS(dy) < ABS(dx)) {
- int16 v4 = abs(dx);
+ int16 v4 = ABS(dx);
if (dx >= 0 && dy >= 0) {
for (uint16 i = 1; i < dy; i++) {
@@ -286,22 +286,22 @@
}
if (dx < 0 && dy < 0) {
- for (uint16 i = 1; i < abs(dy); i++) {
- v4 -= abs(dx);
- if (v4 > abs(dy)) {
+ for (uint16 i = 1; i < ABS(dy); i++) {
+ v4 -= ABS(dx);
+ if (v4 > ABS(dy)) {
oldX--;
- v4 -= abs(dy);
+ v4 -= ABS(dy);
}
_vm->_gfx->maskOpNot(oldX, oldY - i, unused);
}
}
if (dx >= 0 && dy < 0) {
- for (uint16 i = 1; i < abs(dy); i++) {
- v4 += abs(dx);
- if (v4 > abs(dy)) {
+ for (uint16 i = 1; i < ABS(dy); i++) {
+ v4 += ABS(dx);
+ if (v4 > ABS(dy)) {
oldX++;
- v4 -= abs(dy);
+ v4 -= ABS(dy);
}
_vm->_gfx->maskOpNot(oldX, oldY - i, unused);
}
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