diff --git a/src/world/partner/goompa.c b/src/world/partner/goompa.c index 7a385c3ddb..815a915b76 100644 --- a/src/world/partner/goompa.c +++ b/src/world/partner/goompa.c @@ -1,11 +1,12 @@ #include "common.h" +#include "goompa.h" -void func_802BD100_324A10(Npc* npc) { +void world_goompa_init(Npc* npc) { npc->collisionHeight = 24; npc->collisionRadius = 20; } -ApiStatus func_802BD114(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GoompaTakeOut(ScriptInstance* script, s32 isInitialCall) { Npc* owner = script->owner2.npc; if (isInitialCall) { @@ -18,11 +19,11 @@ INCLUDE_ASM(s32, "world_goompa", func_802BD14C); INCLUDE_ASM(s32, "world_goompa", func_802BD4E0); -ApiStatus func_802BD524(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GoompaUseAbility(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -ApiStatus func_802BD52C(ScriptInstance* script, s32 isInitialCall) { +ApiStatus GoompaPutAway(ScriptInstance* script, s32 isInitialCall) { Npc* owner = script->owner2.npc; if (isInitialCall) { @@ -30,3 +31,21 @@ ApiStatus func_802BD52C(ScriptInstance* script, s32 isInitialCall) { } return func_800EE9B8(owner) != 0; } + +Script world_goompa_take_out = SCRIPT({ + GoompaTakeOut() +}); + +s32 unk = 0x802BD600; + +Script world_goompa_update = SCRIPT({ + func_802BD14C() +}); + +Script world_goompa_use_ability = SCRIPT({ + GoompaUseAbility() +}); + +Script world_goompa_put_away = SCRIPT({ + GoompaPutAway() +}); diff --git a/src/world/partner/goompa.h b/src/world/partner/goompa.h new file mode 100644 index 0000000000..01562cbda4 --- /dev/null +++ b/src/world/partner/goompa.h @@ -0,0 +1,14 @@ +#ifndef _WORLD_PARTNER_GOOMPA_H_ +#define _WORLD_PARTNER_GOOMPA_H_ + +#include "common.h" +#include "script_api/map.h" + +void world_goompa_init(Npc* partner); + +Script world_goompa_take_out; +Script world_goompa_update; +Script world_goompa_use_ability; +Script world_goompa_put_away; + +#endif diff --git a/src/world/partners.c b/src/world/partners.c index 7a2af9996b..3aba2994c4 100644 --- a/src/world/partners.c +++ b/src/world/partners.c @@ -12,6 +12,7 @@ #include "sprite/npc/world_parakarry.h" +#include "partner/goompa.h" #include "sprite/npc/goompa.h" #include "sprite/npc/world_watt.h" @@ -103,11 +104,11 @@ WorldPartner gWorldPartners[] = { .dmaEnd = &world_partner_goompa_ROM_END, .dmaDest = &world_partner_goompa_VRAM, .isFlying = FALSE, - .init = 0x802BD100, - .takeOut = 0x802BD570, - .update = 0x802BD590, - .useAbility = 0x802BD5AC, - .putAway = 0x802BD5C8, + .init = world_goompa_init, + .takeOut = world_goompa_take_out, + .update = world_goompa_update, + .useAbility = world_goompa_use_ability, + .putAway = world_goompa_put_away, .idle = NPC_ANIM(goompa, Palette_00, Anim_1), }, { diff --git a/tools/splat.yaml b/tools/splat.yaml index b3763be440..28310117e5 100644 --- a/tools/splat.yaml +++ b/tools/splat.yaml @@ -469,7 +469,8 @@ segments: vram: 0x802BD100 files: - [0x324a10, c, world/partner/goompa] - - [0x324e80, bin] + - [0x324e80, .data, world/partner/goompa] + - [0x324F00, bin, world/partner/goompa] # rodata with single f64 0.8 - type: code ld_name: world_partner_goombaria start: 0x324f10