diff options
| author | Zach Banks <zjbanks@gmail.com> | 2021-05-18 22:28:04 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-05-18 22:28:04 -0400 |
| commit | dea3c8fd792d29648697f697f34d3658bf3838cf (patch) | |
| tree | 44343b1d23b9eb7f9fc1598da7a7f804528db204 /src/code/z_actor.c | |
| parent | 7f1465991925a27539a1bd5361331b794772efb2 (diff) | |
Fix all warnings raised by IDO (#152)
* Fix all warnings raised by IDO, ignore trailing commas
* Set -woff=624,...; keep const in printf functions
* Remove redefined macros in irqmgr.c
* Remove DECR macro & reformat
* Address PR comments from AngheloAlf
Diffstat (limited to 'src/code/z_actor.c')
| -rw-r--r-- | src/code/z_actor.c | 12 |
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; } } |
