Files
tmc/src/item/itemBoomerang.c
T
2021-12-27 17:14:52 -08:00

37 lines
1.0 KiB
C

#include "item.h"
#include "functions.h"
extern void (*const gUnk_0811BD78[])(ItemBehavior*, u32);
extern void ResetPlayerVelocity(void);
void ItemBoomerang(ItemBehavior* this, u32 arg1) {
gUnk_0811BD78[this->stateID](this, arg1);
}
void sub_08075D2C(ItemBehavior* this, u32 arg1) {
if (((gPlayerState.field_0x3[1] & 8) == 0) && (sub_08077C94(this, this->behaviorID) == NULL)) {
this->field_0x5[4] |= 0xf;
sub_0806F948(&gPlayerEntity);
sub_08077C0C(this, 0xb);
sub_08077D38(this, arg1);
gPlayerState.field_0x3[1] |= 8;
} else {
sub_08077E78(this, arg1);
}
}
void sub_08075D88(ItemBehavior* this, u32 arg1) {
if ((gPlayerState.field_0x3[1] & 0x80) == 0) {
if (((this->behaviorID == 0xc) && ((gPlayerState.field_0xa & 0x80) != 0)) && ((this->field_0x5[9] & 2) != 0)) {
ResetPlayerVelocity();
return;
}
UpdateItemAnim(this);
if ((this->field_0x5[9] & 0x80) == 0) {
return;
}
}
sub_08077E78(this, arg1);
}