goombaria data

This commit is contained in:
Alex Bates 2020-12-23 12:25:43 +00:00
parent fd7fc4c44a
commit 70cac1a479
4 changed files with 43 additions and 11 deletions

View File

@ -1,12 +1,13 @@
#include "common.h"
#include "goombaria.h"
#include "../partners.h"
void func_802BD100_324F10(Npc* npc) {
void world_goombaria_init(Npc* npc) {
npc->collisionHeight = 24;
npc->collisionRadius = 20;
}
ApiStatus func_802BD114_324F10(ScriptInstance* script, s32 isInitialCall) {
ApiStatus GoombariaTakeOut(ScriptInstance* script, s32 isInitialCall) {
Npc* owner = script->owner2.npc;
if (isInitialCall) {
@ -15,7 +16,7 @@ ApiStatus func_802BD114_324F10(ScriptInstance* script, s32 isInitialCall) {
return func_800EECE8(owner) != 0;
}
ApiStatus func_802BD14C_324F10(ScriptInstance* script, s32 isInitialCall) {
ApiStatus GoombariaUpdate(ScriptInstance* script, s32 isInitialCall) {
PlayerData* playerData = &gPlayerData;
Npc* owner = script->owner2.npc;
@ -30,11 +31,11 @@ ApiStatus func_802BD14C_324F10(ScriptInstance* script, s32 isInitialCall) {
return ApiStatus_BLOCK;
}
ApiStatus func_802BD1AC_324F10(ScriptInstance* script, s32 isInitialCall) {
ApiStatus GoombariaUseAbility(ScriptInstance* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
ApiStatus func_802BD1B4(ScriptInstance* script, s32 isInitialCall) {
ApiStatus GoombariaPutAway(ScriptInstance* script, s32 isInitialCall) {
Npc* owner = script->owner2.npc;
if (isInitialCall) {
@ -42,3 +43,19 @@ ApiStatus func_802BD1B4(ScriptInstance* script, s32 isInitialCall) {
}
return func_800EE9B8(owner) != 0;
}
Script world_goombaria_take_out = SCRIPT({
GoombariaTakeOut()
});
Script world_goombaria_update = SCRIPT({
GoombariaUpdate()
});
Script world_goombaria_use_ability = SCRIPT({
GoombariaUseAbility()
});
Script world_goombaria_put_away = SCRIPT({
GoombariaPutAway()
});

View File

@ -0,0 +1,14 @@
#ifndef _WORLD_PARTNER_GOOMBARIA_H_
#define _WORLD_PARTNER_GOOMBARIA_H_
#include "common.h"
#include "script_api/map.h"
void world_goombaria_init(Npc* partner);
Script world_goombaria_take_out;
Script world_goombaria_update;
Script world_goombaria_use_ability;
Script world_goombaria_put_away;
#endif

View File

@ -23,6 +23,7 @@
#include "sprite/npc/world_bow.h"
#include "partner/goombaria.h"
#include "sprite/npc/goombaria.h"
#include "sprite/npc/twink.h"
@ -184,11 +185,11 @@ WorldPartner gWorldPartners[] = {
.dmaEnd = &world_partner_goombaria_ROM_END,
.dmaDest = &world_partner_goombaria_VRAM,
.isFlying = FALSE,
.init = 0x802BD100,
.takeOut = 0x802BD1F0,
.update = 0x802BD20C,
.useAbility = 0x802BD228,
.putAway = 0x802BD244,
.init = world_goombaria_init,
.takeOut = world_goombaria_take_out,
.update = world_goombaria_update,
.useAbility = world_goombaria_use_ability,
.putAway = world_goombaria_put_away,
.idle = NPC_ANIM(goombaria, Palette_00, Anim_1),
.canUseAbility = 0x800EA514,
.canPlayerPause = 0x800EA514,

View File

@ -477,7 +477,7 @@ segments:
vram: 0x802BD100
files:
- [0x324f10, c, world/partner/goombaria]
- [0x325000, bin]
- [0x325000, .data, world/partner/goombaria]
- type: code
ld_name: world_partner_twink
start: 0x325070