goombario data

This commit is contained in:
Alex Bates 2020-12-23 12:07:47 +00:00
parent baf842d8f6
commit 7aca81daad
5 changed files with 61 additions and 7 deletions

View File

@ -1,4 +1,5 @@
#include "common.h"
#include "sprite/npc/world_goombario.h"
#include "goombario.h"
extern s32** D_802BDF64;
@ -23,6 +24,7 @@ void world_goombario_init(Npc* npc) {
INCLUDE_ASM(ApiStatus, "world/partner/goombario", func_802BD188, ScriptInstance* script, s32 isInitialCall);
// uses rodata f64(?) at 802BDE80 = 0.8
INCLUDE_ASM(ApiStatus, "world/partner/goombario", func_802BD1D0, ScriptInstance* script, s32 isInitialCall);
INCLUDE_ASM(s32, "world/partner/goombario", func_802BD564);
@ -44,7 +46,8 @@ s32 world_goombario_can_pause(Npc* partner) {
INCLUDE_ASM(s32, "world/partner/goombario", world_goombario_can_pause, Npc* partner);
#endif
// Returns on SI_VAR(0)
// get message for tattle routine
// has big jumptable at rodata 802BDE88
INCLUDE_ASM(ApiStatus, "world/partner/goombario", func_802BD5D8, ScriptInstance* script, s32 isInitialCall);
INCLUDE_ASM(ApiStatus, "world/partner/goombario", func_802BDB30, ScriptInstance* script, s32 isInitialCall);
@ -76,3 +79,51 @@ void world_goombario_pre_battle(s32 arg0) {
#else
INCLUDE_ASM(void, "world/partner/goombario", world_goombario_pre_battle, s32 arg0);
#endif
s32 func_802BD5D8_data[] = {
0x00000015, 0x001B0000, 0x00000018, 0x001B0000, 0x00000016, 0x001B0001, 0x00000019, 0x001B0001,
0x00000017, 0x001B0003, 0x0000001A, 0x001B0003, 0x0000000D, 0x001B0005, 0x0000000E, 0x001B0005,
0x0000000F, 0x001B0006, 0x00000010, 0x001B0006, 0x0000000B, 0x001B0007, 0x0000000C, 0x001B0008,
0x00000014, 0x001B0009, 0x0000002E, 0x001B000A, 0x0000002F, 0x001B000A, 0x00000007, 0x001B000B,
0x00000008, 0x001B000B, 0x00000009, 0x001B000C, 0x0000000A, 0x001B000E, 0x0000002B, 0x001B0010,
0x00000003, 0x001B0011, 0x00000004, 0x001B0011, 0x00000005, 0x001B0011, 0x00000006, 0x001B0011,
0x00000033, 0x001B0012, 0x00000034, 0x001B0013, 0x00000026, 0x001B0014, 0x00000032, 0x001B0015,
0x00000024, 0x001B0017, 0x00000025, 0x001B001A, 0x00000031, 0x001B001D, 0x00000035, 0x001B001F,
0x00000036, 0x001B0020, 0x00000038, 0x001B0021, 0x00000037, 0x001B0022, 0x0000003A, 0x001B0023,
0x00000039, 0x001B0024, 0xFFFFFFFF
};
Script world_goombario_take_out = SCRIPT({
func_802BD188()
});
s32 unk_802BDD88 = 0x802BDF40;
Script world_goombario_update = SCRIPT({
func_802BD1D0()
});
Script world_goombario_use_ability = SCRIPT({
func_802BD5D8() // returns tattle message id on SI_VAR(0), and something else on SI_VAR(1)
if SI_VAR(0) == -1 {
return
}
if SI_VAR(0) == 0 {
func_802BDB30()
return
}
if SI_VAR(1) == 0 {
SpeakToPlayer(NpcId_PARTNER, NPC_ANIM(world_goombario, normal, talk), NPC_ANIM(world_goombario, normal, idle), 0, SI_VAR(0))
}
sleep 1
func_802BDB30()
});
Script world_goombario_put_away = SCRIPT({
func_802BDB84()
});

View File

@ -9,6 +9,9 @@ s32 world_goombario_can_pause(Npc* partner);
ApiStatus func_802BDB84(ScriptInstance* script, s32 isInitialCall);
void world_goombario_pre_battle(s32 arg0);
extern Script world_goombario_take_out;
Script world_goombario_take_out;
Script world_goombario_update;
Script world_goombario_use_ability;
Script world_goombario_put_away;
#endif

View File

@ -38,9 +38,9 @@ WorldPartner gWorldPartners[] = {
.isFlying = FALSE,
.init = world_goombario_init,
.takeOut = world_goombario_take_out,
.update = 0x802BDD8C,
.useAbility = 0x802BDDA8,
.putAway = 0x802BDE60,
.update = world_goombario_update,
.useAbility = world_goombario_use_ability,
.putAway = world_goombario_put_away,
.idle = NPC_ANIM(world_goombario, normal, idle),
.canUseAbility = world_goombario_can_pause,
.canPlayerPause = world_goombario_can_pause,

View File

@ -412,7 +412,8 @@ segments:
vram: 0x802BD100
files:
- [0x317020, c, world/partner/goombario]
- [0x317b60, bin]
- [0x317b60, .data, world/partner/goombario]
- [0x317DA0, bin, world/partner/goombario] # rodata containing a double and a jumptable
- type: code
ld_name: world_partner_bombette
start: 0x317e50

View File

@ -333,5 +333,4 @@ D_80078DB4 = 0x80078DB4;
gSongsUsingVariationFlag = 0x8014F720;
D_8014F738 = 0x8014F738;
world_goombario_take_out = 0x802BDD6C;
D_802BDF64 = 0x802BDF64;