blob: 8c8c08e677a5ef2143213a54a3b700f737afc4c7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
#include "global.h"
#include "item.h"
#include "physics.h"
#include "playeritem.h"
void sub_08076C98(ItemBehavior*, u32);
void sub_08076CBC(ItemBehavior*, u32);
void ItemPacciCane(ItemBehavior* this, u32 index) {
static void (*const stateFuncs[])(ItemBehavior*, u32) = {
sub_08076C98,
sub_08076CBC,
};
stateFuncs[this->stateID](this, index);
}
void sub_08076C98(ItemBehavior* this, u32 index) {
this->priority |= 0xf;
sub_08077D38(this, index);
sub_0806F948(&gPlayerEntity.base);
sub_08077BB8(this);
}
void sub_08076CBC(ItemBehavior* this, u32 index) {
if ((this->playerFrame & 0x80) != 0) {
DeleteItemBehavior(this, index);
} else {
if ((this->playerFrame & 0x40) != 0) {
CreatePlayerItemWithParent(this, PLAYER_ITEM_PACCI_CANE_PROJECTILE);
}
UpdateItemAnim(this);
}
}
|