From 4dcdde8094a343a814d2ad9562f8728670d41185 Mon Sep 17 00:00:00 2001 From: j3lee Date: Mon, 12 Oct 2026 12:14:44 +0930 Subject: [PATCH] battle2: export the floating-icon spawn helpers BattleSpawnFloatingIconAt and BattleSpawnFloatingIconAtPart are called from the Cho-Kyu and Kakusan magic overlays (by address); dropping static and declaring them in battle.h lets those overlays use a header prototype instead of a local one. No code change. --- src/battle/battle.h | 2 ++ src/battle/battle2.c | 5 ++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/battle/battle.h b/src/battle/battle.h index 3d706bad..58efcc0e 100644 --- a/src/battle/battle.h +++ b/src/battle/battle.h @@ -767,6 +767,8 @@ s32 BattleEffectRegister(void (*func)(void)); void BattleSetLoadTimToVram(u_long* addr, s16 imgXY, s16 clutX, s16 clutY); void BattleEnqueueClearImage(RECT* rect, s32 arg1, s32 arg2, s32 arg3); void* func_800D29D4(ModelRenderDesc*, u_long**, int, void*); +void BattleSpawnFloatingIconAtPart(s32 actor, s32 arg1, s32 arg2); +void BattleSpawnFloatingIconAt(void* arg0, s32 arg1, s32 arg2); // Build the model matrix for a battle effect: `scale` goes on the matrix // diagonal, `pos` is transformed into view space to become the translation, // and `depthBias` nudges it along that view vector (negative pulls it toward diff --git a/src/battle/battle2.c b/src/battle/battle2.c index fbc261a0..e2cd440f 100644 --- a/src/battle/battle2.c +++ b/src/battle/battle2.c @@ -2439,7 +2439,6 @@ void BattleKeyframeEffectTick(void) { } } -static void BattleSpawnFloatingIconAt(void* arg0, s32 arg1, s32 arg2); void func_800D4C08(SVECTOR* pos, s32 scriptAndFlags, s32 scale, s32 depthBias) { BattleKeyframeEffectSlot* slot; @@ -2451,7 +2450,7 @@ void func_800D4C08(SVECTOR* pos, s32 scriptAndFlags, s32 scale, s32 depthBias) { slot->depthBias = depthBias; } -static void BattleSpawnFloatingIconAtPart(s32 actor, s32 arg1, s32 arg2) { +void BattleSpawnFloatingIconAtPart(s32 actor, s32 arg1, s32 arg2) { SVECTOR pos; BattleGetPartPosition(actor, g_BattleModels[actor].boneIndices[0], &pos); @@ -2460,7 +2459,7 @@ static void BattleSpawnFloatingIconAtPart(s32 actor, s32 arg1, s32 arg2) { static void BattleSpawnFloatingIcon(s32 actor, s32 arg1) { BattleSpawnFloatingIconAtPart(actor, arg1, 0x1000); } -static void BattleSpawnFloatingIconAt(void* arg0, s32 arg1, s32 arg2) { func_800D4C08(arg0, arg1, 0x1000, arg2); } +void BattleSpawnFloatingIconAt(void* arg0, s32 arg1, s32 arg2) { func_800D4C08(arg0, arg1, 0x1000, arg2); } INCLUDE_ASM("asm/us/battle/nonmatchings/battle2", func_800D4D90);