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:
Zach Banks
2021-05-18 22:28:04 -04:00
committed by GitHub
parent 7f14659919
commit dea3c8fd79
40 changed files with 130 additions and 130 deletions
+4 -8
View File
@@ -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;
}
}
+1 -1
View File
@@ -162,7 +162,7 @@ void BgCheck_CreateVertexFromVec3f(Vec3s* vertex, Vec3f* vector) {
#pragma GLOBAL_ASM("./asm/non_matchings/code/z_bgcheck/func_800C40B4.asm")
f32 func_800C411C(CollisionContext* bgCtxt, CollisionPoly* arg1, s32* arg2, Actor* actor, Vec3f* pos) {
f32 func_800C411C(CollisionContext* bgCtxt, CollisionPoly** arg1, s32* arg2, Actor* actor, Vec3f* pos) {
return func_800C3D50(0, bgCtxt, 2, arg1, arg2, pos, actor, 28, 1.0f, 0);
}
+2 -2
View File
@@ -225,7 +225,7 @@ void EffectSS_UpdateParticle(GlobalContext* ctxt, s32 index) {
particle->pos.y += particle->velocity.y;
particle->pos.z += particle->velocity.z;
(*particle->update)(ctxt, index, particle);
particle->update(ctxt, index, particle);
}
}
@@ -250,7 +250,7 @@ void EffectSS_UpdateAllParticles(GlobalContext* ctxt) {
void EffectSS_DrawParticle(GlobalContext* ctxt, s32 index) {
EffectSs* entry = &EffectSS2Info.data_table[index];
if (entry->draw != 0) {
(*entry->draw)(ctxt, index, entry);
entry->draw(ctxt, index, entry);
}
}
+10 -3
View File
@@ -187,9 +187,16 @@ void Lights_BindDirectional(Lights* lights, LightParams* params, void* unused) {
* available in the Lights group. This is at most 7 slots for a new group, but could be less.
*/
void Lights_BindAll(Lights* lights, LightNode* listHead, Vec3f* refPos, GlobalContext* globalCtx) {
static LightsPosBindFunc posBindFuncs[] = { Lights_BindPoint, Lights_BindDirectional, Lights_BindPoint };
static LightsBindFunc dirBindFuncs[] = { Lights_BindPointWithReference, Lights_BindDirectional,
Lights_BindPointWithReference };
static LightsPosBindFunc posBindFuncs[] = {
Lights_BindPoint,
(LightsPosBindFunc)Lights_BindDirectional,
Lights_BindPoint,
};
static LightsBindFunc dirBindFuncs[] = {
Lights_BindPointWithReference,
(LightsBindFunc)Lights_BindDirectional,
Lights_BindPointWithReference,
};
if (listHead != NULL) {
if ((refPos == NULL) && (lights->enablePosLights == 1)) {
+4 -3
View File
@@ -19,8 +19,9 @@ void SkelAnime_AnimationType4Loaded(GlobalContext* globalCtx, AnimationEntryType
void SkelAnime_AnimationType5Loaded(GlobalContext* globalCtx, AnimationEntryType5* entry);
static AnimationEntryCallback sAnimationLoadDone[] = {
SkelAnime_LinkAnimetionLoaded, SkelAnime_AnimationType1Loaded, SkelAnime_AnimationType2Loaded,
SkelAnime_AnimationType3Loaded, SkelAnime_AnimationType4Loaded, SkelAnime_AnimationType5Loaded,
(AnimationEntryCallback)SkelAnime_LinkAnimetionLoaded, (AnimationEntryCallback)SkelAnime_AnimationType1Loaded,
(AnimationEntryCallback)SkelAnime_AnimationType2Loaded, (AnimationEntryCallback)SkelAnime_AnimationType3Loaded,
(AnimationEntryCallback)SkelAnime_AnimationType4Loaded, (AnimationEntryCallback)SkelAnime_AnimationType5Loaded,
};
s32 D_801F5AB0;
@@ -1240,7 +1241,7 @@ void SkelAnime_ChangeLinkAnim(GlobalContext* globalCtx, SkelAnime* skelAnime, Li
skelAnime->initialFrame = frame;
skelAnime->animCurrentFrame = frame;
skelAnime->animFrameCount = frameCount;
skelAnime->totalFrames = SkelAnime_GetTotalFrames(linkAnimetionEntrySeg);
skelAnime->totalFrames = SkelAnime_GetTotalFrames(&linkAnimetionEntrySeg->genericHeader);
skelAnime->animPlaybackSpeed = playbackSpeed;
}
+2 -2
View File
@@ -113,11 +113,11 @@ s32 func_8013A530(GlobalContext* globalCtx, Actor* actor, s32 flag, Vec3f* pos,
s16 x;
s16 y;
f32 distance;
UNK_TYPE unk1;
CollisionPoly* unk1;
Camera* camera;
Actor* actors[2];
s32 ret = 0;
UNK_TYPE unk2;
u32 unk2;
camera = ACTIVE_CAM;