From 96e13149eac8e9b3d47111c582cdd75a731f52e4 Mon Sep 17 00:00:00 2001 From: fig02 Date: Tue, 11 Feb 2025 17:33:09 -0500 Subject: [PATCH] Name Actor_DrawAll (#2464) --- include/z64actor.h | 2 +- src/code/z_actor.c | 15 ++++++++++++++- src/code/z_play.c | 2 +- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/include/z64actor.h b/include/z64actor.h index 38132540ab..40cafd9440 100644 --- a/include/z64actor.h +++ b/include/z64actor.h @@ -850,7 +850,7 @@ void Actor_DisableLens(struct PlayState* play); void Actor_InitContext(struct PlayState* play, ActorContext* actorCtx, struct ActorEntry* playerEntry); void Actor_UpdateAll(struct PlayState* play, ActorContext* actorCtx); s32 Actor_CullingVolumeTest(struct PlayState* play, Actor* actor, Vec3f* projPos, f32 projW); -void func_800315AC(struct PlayState* play, ActorContext* actorCtx); +void Actor_DrawAll(struct PlayState* play, ActorContext* actorCtx); void Actor_KillAllWithMissingObject(struct PlayState* play, ActorContext* actorCtx); void func_80031B14(struct PlayState* play, ActorContext* actorCtx); void func_80031C3C(ActorContext* actorCtx, struct PlayState* play); diff --git a/src/code/z_actor.c b/src/code/z_actor.c index f13360af6c..d8e1c2ae9c 100644 --- a/src/code/z_actor.c +++ b/src/code/z_actor.c @@ -2835,7 +2835,20 @@ s32 Actor_CullingVolumeTest(PlayState* play, Actor* actor, Vec3f* projPos, f32 p return false; } -void func_800315AC(PlayState* play, ActorContext* actorCtx) { +/** + * Iterates through all category lists to draw every actor. + * + * In addition to actors, this function also draws: + * - Effects + * - EffectSs + * - Title Cards + * - Farores Wind Pointer + * - Light glow + * - Actor Collision (debug only) + * + * Note: If an actor is made visible by Lens of Truth, it will be drawn by `Actor_DrawLensActors` instead. + */ +void Actor_DrawAll(PlayState* play, ActorContext* actorCtx) { s32 invisibleActorCounter; Actor* invisibleActors[INVISIBLE_ACTOR_MAX]; ActorListEntry* actorListEntry; diff --git a/src/code/z_play.c b/src/code/z_play.c index d531a79110..ac271a93e8 100644 --- a/src/code/z_play.c +++ b/src/code/z_play.c @@ -1294,7 +1294,7 @@ void Play_Draw(PlayState* this) { } if (!DEBUG_FEATURES || (R_HREG_MODE != HREG_MODE_PLAY) || R_PLAY_DRAW_ACTORS) { - func_800315AC(this, &this->actorCtx); + Actor_DrawAll(this, &this->actorCtx); } if (!DEBUG_FEATURES || (R_HREG_MODE != HREG_MODE_PLAY) || R_PLAY_DRAW_LENS_FLARES) {