summaryrefslogtreecommitdiff
path: root/src/code/z_actor.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/code/z_actor.c')
-rw-r--r--src/code/z_actor.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/code/z_actor.c b/src/code/z_actor.c
index 1049911a9..a7578a4df 100644
--- a/src/code/z_actor.c
+++ b/src/code/z_actor.c
@@ -1,10 +1,6 @@
#include <ultra64.h>
#include <global.h>
-// From OOT
-#define ABS(x) ((x) < 0 ? -(x) : (x))
-#define DECR(x) ((x) == 0 ? 0 : ((x) -= 1))
-
void Actor_PrintLists(ActorContext* actorCtx) {
ActorListEntry* actorList = &actorCtx->actorList[0];
Actor* actor;
@@ -526,7 +522,7 @@ s32 Actor_IsActorFacedByActor(Actor* actor, Actor* other, s16 tolerance) {
angle = Actor_YawBetweenActors(actor, other) + 0x8000;
dist = angle - other->shape.rot.y;
- if (ABS(dist) < tolerance) {
+ if (ABS_ALT(dist) < tolerance) {
return 1;
}
return 0;
@@ -536,7 +532,7 @@ s32 Actor_IsActorFacingLink(Actor* actor, s16 angle) {
s16 dist;
dist = actor->yawTowardsPlayer - actor->shape.rot.y;
- if (ABS(dist) < angle) {
+ if (ABS_ALT(dist) < angle) {
return 1;
}
return 0;
@@ -546,7 +542,7 @@ s32 Actor_IsActorFacingActor(Actor* actor, Actor* other, s16 tolerance) {
s16 dist;
dist = Actor_YawBetweenActors(actor, other) - actor->shape.rot.y;
- if (ABS(dist) < tolerance) {
+ if (ABS_ALT(dist) < tolerance) {
return 1;
}
return 0;
@@ -559,7 +555,7 @@ s32 Actor_IsActorFacingActorAndWithinRange(Actor* actor, Actor* other, f32 range
if (Actor_DistanceBetweenActors(actor, other) < range) {
dist = Actor_YawBetweenActors(actor, other) - actor->shape.rot.y;
- if (ABS(dist) < tolerance) {
+ if (ABS_ALT(dist) < tolerance) {
return 1;
}
}