mirror of
https://github.com/zeldaret/mm.git
synced 2026-06-02 01:59:49 -04:00
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
This commit is contained in:
+4
-8
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user