aboutsummaryrefslogtreecommitdiff
path: root/engines/cruise
diff options
context:
space:
mode:
authorTorbjörn Andersson2007-04-28 04:29:05 +0000
committerTorbjörn Andersson2007-04-28 04:29:05 +0000
commit6ba72121ad547a5bacaa2c89215ca6f48653f46a (patch)
treec30ac6c7e8de7117b925b062ce27afaf30e27084 /engines/cruise
parent32dbf6ae52a2c3938d7c77a5edd80980e62f9826 (diff)
downloadscummvm-rg350-6ba72121ad547a5bacaa2c89215ca6f48653f46a.tar.gz
scummvm-rg350-6ba72121ad547a5bacaa2c89215ca6f48653f46a.tar.bz2
scummvm-rg350-6ba72121ad547a5bacaa2c89215ca6f48653f46a.zip
Changed abs() to ABS()
svn-id: r26639
Diffstat (limited to 'engines/cruise')
-rw-r--r--engines/cruise/actor.cpp2
-rw-r--r--engines/cruise/ctp.cpp5
-rw-r--r--engines/cruise/function.cpp5
-rw-r--r--engines/cruise/perso.cpp5
-rw-r--r--engines/cruise/polys.cpp16
5 files changed, 18 insertions, 15 deletions
diff --git a/engines/cruise/actor.cpp b/engines/cruise/actor.cpp
index 29c818d15f..505817282f 100644
--- a/engines/cruise/actor.cpp
+++ b/engines/cruise/actor.cpp
@@ -717,7 +717,7 @@ int16 computePathfinding(int16 *pSolution, int16 _X, int16 _Y, int16 destX,
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)
diff --git a/engines/cruise/ctp.cpp b/engines/cruise/ctp.cpp
index f916a3f8a2..a3acbef944 100644
--- a/engines/cruise/ctp.cpp
+++ b/engines/cruise/ctp.cpp
@@ -23,6 +23,7 @@
*/
#include "cruise/cruise_main.h"
+#include "common/util.h"
namespace Cruise {
@@ -44,8 +45,8 @@ int ctpVarUnk;
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;
diff --git a/engines/cruise/function.cpp b/engines/cruise/function.cpp
index f07c8b5a92..1acf330638 100644
--- a/engines/cruise/function.cpp
+++ b/engines/cruise/function.cpp
@@ -24,6 +24,7 @@
#include "cruise/cruise_main.h"
#include "cruise/cell.h"
+#include "common/util.h"
namespace Cruise {
@@ -857,7 +858,7 @@ int16 Op_InitializeStateB(void) {
int sign;
if (di) {
- sign = di / (abs(di));
+ sign = di / (ABS(di));
} else {
sign = 0;
}
@@ -1180,7 +1181,7 @@ int16 Op_AddAnimation(void) {
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);
diff --git a/engines/cruise/perso.cpp b/engines/cruise/perso.cpp
index b1b5ab4068..60867a6dec 100644
--- a/engines/cruise/perso.cpp
+++ b/engines/cruise/perso.cpp
@@ -23,6 +23,7 @@
*/
#include "cruise/cruise_main.h"
+#include "common/util.h"
namespace Cruise {
@@ -62,9 +63,9 @@ int direction(int x1, int y1, int x2, int y2, int inc_jo1, int inc_jo2) {
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)
diff --git a/engines/cruise/polys.cpp b/engines/cruise/polys.cpp
index 98d64cdeba..f3860e6b90 100644
--- a/engines/cruise/polys.cpp
+++ b/engines/cruise/polys.cpp
@@ -50,8 +50,8 @@ void vline(int x, int y1, int y2, char c) {
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_1(int x1, int y1, int x2, int y2, char c) {
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 @@ void bsubline_3(int x1, int y1, int x2, int y2, char c) {
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 @@ void bsubline_4(int x1, int y1, int x2, int y2, char c) {
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;