mirror of
https://github.com/pmret/papermario.git
synced 2024-11-09 12:32:38 +01:00
twink data
This commit is contained in:
parent
469a170151
commit
17437b94bb
@ -1,13 +1,13 @@
|
||||
#include "common.h"
|
||||
#include "../partners.h"
|
||||
#include "twink.h"
|
||||
|
||||
// Init
|
||||
void func_802BD100_325070(Npc* npc) {
|
||||
void world_twink_init(Npc* npc) {
|
||||
npc->collisionHeight = 20;
|
||||
npc->collisionRadius = 20;
|
||||
}
|
||||
|
||||
ApiStatus func_802BD110(ScriptInstance* script, s32 isInitialCall) {
|
||||
ApiStatus TwinkTakeOut(ScriptInstance* script, s32 isInitialCall) {
|
||||
Npc* owner = script->owner2.npc;
|
||||
|
||||
if (isInitialCall) {
|
||||
@ -16,7 +16,7 @@ ApiStatus func_802BD110(ScriptInstance* script, s32 isInitialCall) {
|
||||
return func_800EECE8(owner) != 0;
|
||||
}
|
||||
|
||||
ApiStatus func_802BD148_325070(ScriptInstance* script, s32 isInitialCall) {
|
||||
ApiStatus TwinkUpdate(ScriptInstance* script, s32 isInitialCall) {
|
||||
PlayerData* playerData = &gPlayerData;
|
||||
Npc* owner = script->owner2.npc;
|
||||
|
||||
@ -31,11 +31,11 @@ ApiStatus func_802BD148_325070(ScriptInstance* script, s32 isInitialCall) {
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
|
||||
ApiStatus func_802BD1A8(ScriptInstance* script, s32 isInitialCall) {
|
||||
ApiStatus TwinkUseAbility(ScriptInstance* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_802BD1B0(ScriptInstance* script, s32 isInitialCall) {
|
||||
ApiStatus TwinkPutAway(ScriptInstance* script, s32 isInitialCall) {
|
||||
Npc* owner = script->owner2.npc;
|
||||
|
||||
if (isInitialCall) {
|
||||
@ -43,3 +43,19 @@ ApiStatus func_802BD1B0(ScriptInstance* script, s32 isInitialCall) {
|
||||
}
|
||||
return func_800EE9B8(owner) != 0;
|
||||
}
|
||||
|
||||
Script world_twink_take_out = SCRIPT({
|
||||
TwinkTakeOut()
|
||||
});
|
||||
|
||||
Script world_twink_update = SCRIPT({
|
||||
TwinkUpdate()
|
||||
});
|
||||
|
||||
Script world_twink_use_ability = SCRIPT({
|
||||
TwinkUseAbility()
|
||||
});
|
||||
|
||||
Script world_twink_put_away = SCRIPT({
|
||||
TwinkPutAway()
|
||||
});
|
||||
|
14
src/world/partner/twink.h
Normal file
14
src/world/partner/twink.h
Normal file
@ -0,0 +1,14 @@
|
||||
#ifndef _WORLD_PARTNER_TWINK_H_
|
||||
#define _WORLD_PARTNER_TWINK_H_
|
||||
|
||||
#include "common.h"
|
||||
#include "script_api/map.h"
|
||||
|
||||
void world_twink_init(Npc* partner);
|
||||
|
||||
Script world_twink_take_out;
|
||||
Script world_twink_update;
|
||||
Script world_twink_use_ability;
|
||||
Script world_twink_put_away;
|
||||
|
||||
#endif
|
@ -26,6 +26,7 @@
|
||||
#include "partner/goombaria.h"
|
||||
#include "sprite/npc/goombaria.h"
|
||||
|
||||
#include "partner/twink.h"
|
||||
#include "sprite/npc/twink.h"
|
||||
|
||||
s32 world_partner_can_use_ability_default(Npc* partner);
|
||||
@ -203,11 +204,11 @@ WorldPartner gWorldPartners[] = {
|
||||
.dmaEnd = &world_partner_twink_ROM_END,
|
||||
.dmaDest = &world_partner_twink_VRAM,
|
||||
.isFlying = TRUE,
|
||||
.init = 0x802BD100,
|
||||
.takeOut = 0x802BD1F0,
|
||||
.update = 0x802BD20C,
|
||||
.useAbility = 0x802BD228,
|
||||
.putAway = 0x802BD244,
|
||||
.init = world_twink_init,
|
||||
.takeOut = world_twink_take_out,
|
||||
.update = world_twink_update,
|
||||
.useAbility = world_twink_use_ability,
|
||||
.putAway = world_twink_put_away,
|
||||
.idle = NPC_ANIM(twink, Palette_00, Anim_1),
|
||||
.canUseAbility = world_partner_can_use_ability_default,
|
||||
.canPlayerPause = world_partner_can_use_ability_default,
|
||||
|
@ -484,7 +484,7 @@ segments:
|
||||
vram: 0x802BD100
|
||||
files:
|
||||
- [0x325070, c, world/partner/twink]
|
||||
- [0x325160, bin]
|
||||
- [0x325160, .data, world/partner/twink]
|
||||
- type: code
|
||||
start: 0x3251d0
|
||||
vram: 0x802BD100
|
||||
|
Loading…
Reference in New Issue
Block a user