aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/scumm/actor.cpp2
-rw-r--r--engines/scumm/he/logic_he.cpp6
-rw-r--r--engines/scumm/he/script_v90he.cpp12
-rw-r--r--engines/scumm/he/wiz_he.cpp2
4 files changed, 11 insertions, 11 deletions
diff --git a/engines/scumm/actor.cpp b/engines/scumm/actor.cpp
index 5906545917..2403d2aa40 100644
--- a/engines/scumm/actor.cpp
+++ b/engines/scumm/actor.cpp
@@ -241,7 +241,7 @@ void Actor::setActorWalkSpeed(uint newSpeedX, uint newSpeedY) {
int getAngleFromPos(int x, int y, bool useATAN) {
if (useATAN) {
double temp = atan2((double)x, (double)-y);
- return normalizeAngle((int)(temp * 180 / PI));
+ return normalizeAngle((int)(temp * 180 / M_PI));
} else {
if (ABS(y) * 2 < ABS(x)) {
if (x > 0)
diff --git a/engines/scumm/he/logic_he.cpp b/engines/scumm/he/logic_he.cpp
index ed92c33105..c088fd6e22 100644
--- a/engines/scumm/he/logic_he.cpp
+++ b/engines/scumm/he/logic_he.cpp
@@ -160,8 +160,8 @@ int32 LogicHErace::dispatch(int op, int numArgs, int32 *args) {
return res;
}
-#define RAD2DEG (180 / PI)
-#define DEG2RAD (PI / 180)
+#define RAD2DEG (180 / M_PI)
+#define DEG2RAD (M_PI / 180)
int32 LogicHErace::op_1003(int32 *args) {
int value = args[2] ? args[2] : 1;
@@ -457,7 +457,7 @@ void LogicHEfunshop::op_1004(int32 *args) {
sq = sqrt(data[i + 1] * data[i + 1] + data[i] * data[i]);
if (at <= 0)
- at += 2 * PI;
+ at += 2 * M_PI;
data[i] = cos(at + a1) * sq;
data[i + 1] = sin(at + a1) * sq;
diff --git a/engines/scumm/he/script_v90he.cpp b/engines/scumm/he/script_v90he.cpp
index 841eba960d..1a38a99f17 100644
--- a/engines/scumm/he/script_v90he.cpp
+++ b/engines/scumm/he/script_v90he.cpp
@@ -351,12 +351,12 @@ void ScummEngine_v90he::o90_max() {
}
void ScummEngine_v90he::o90_sin() {
- double a = pop() * PI / 180.;
+ double a = pop() * M_PI / 180.;
push((int)(sin(a) * 100000));
}
void ScummEngine_v90he::o90_cos() {
- double a = pop() * PI / 180.;
+ double a = pop() * M_PI / 180.;
push((int)(cos(a) * 100000));
}
@@ -372,7 +372,7 @@ void ScummEngine_v90he::o90_sqrt() {
void ScummEngine_v90he::o90_atan2() {
int y = pop();
int x = pop();
- int a = (int)(atan2((double)y, (double)x) * 180. / PI);
+ int a = (int)(atan2((double)y, (double)x) * 180. / M_PI);
if (a < 0) {
a += 360;
}
@@ -384,7 +384,7 @@ void ScummEngine_v90he::o90_getSegmentAngle() {
int x1 = pop();
int dy = y1 - pop();
int dx = x1 - pop();
- int a = (int)(atan2((double)dy, (double)dx) * 180. / PI);
+ int a = (int)(atan2((double)dy, (double)dx) * 180. / M_PI);
if (a < 0) {
a += 360;
}
@@ -2292,13 +2292,13 @@ void ScummEngine_v90he::o90_kernelGetFunctions() {
switch (args[0]) {
case 1001:
{
- double b = args[1] * PI / 180.;
+ double b = args[1] * M_PI / 180.;
push((int)(sin(b) * 100000));
}
break;
case 1002:
{
- double b = args[1] * PI / 180.;
+ double b = args[1] * M_PI / 180.;
push((int)(cos(b) * 100000));
}
break;
diff --git a/engines/scumm/he/wiz_he.cpp b/engines/scumm/he/wiz_he.cpp
index c7e6a56083..3d1aa5b048 100644
--- a/engines/scumm/he/wiz_he.cpp
+++ b/engines/scumm/he/wiz_he.cpp
@@ -111,7 +111,7 @@ void Wiz::polygonStore(int id, bool flag, int vert1x, int vert1y, int vert2x, in
}
void Wiz::polygonRotatePoints(Common::Point *pts, int num, int angle) {
- double alpha = angle * PI / 180.;
+ double alpha = angle * M_PI / 180.;
double cos_alpha = cos(alpha);
double sin_alpha = sin(alpha);