mirror of
https://github.com/zeldaret/tmc
synced 2026-09-06 11:05:07 -04:00
renamed and added a bunch of animations to enum
This commit is contained in:
+7
-7
@@ -4,14 +4,14 @@
|
||||
|
||||
void sub_08075DF4(ItemBehavior*, u32);
|
||||
void sub_08075E40(ItemBehavior*, u32);
|
||||
void sub_08075EC0(ItemBehavior*, u32);
|
||||
void ItemBowShoot(ItemBehavior*, u32);
|
||||
void sub_08075F38(ItemBehavior*, u32);
|
||||
void sub_08075F84(ItemBehavior*, u32);
|
||||
void sub_08075D88(ItemBehavior*, u32);
|
||||
|
||||
void ItemBow(ItemBehavior* this, u32 index) {
|
||||
static void (*const stateFuncs[])(ItemBehavior*, u32) = {
|
||||
sub_08075DF4, sub_08075E40, sub_08075EC0, sub_08075F38, sub_08075F84, sub_08075D88,
|
||||
sub_08075DF4, sub_08075E40, ItemBowShoot, sub_08075F38, sub_08075F84, sub_08075D88,
|
||||
};
|
||||
stateFuncs[this->stateID](this, index);
|
||||
}
|
||||
@@ -47,20 +47,20 @@ void sub_08075E40(ItemBehavior* this, u32 index) {
|
||||
DeleteItemBehavior(this, index);
|
||||
}
|
||||
|
||||
void sub_08075EC0(ItemBehavior* this, u32 index) {
|
||||
void ItemBowShoot(ItemBehavior* this, u32 index) {
|
||||
u8 arrowCount;
|
||||
s32 iVar2;
|
||||
s32 isShooting;
|
||||
|
||||
arrowCount = gSave.stats.arrowCount;
|
||||
iVar2 = IsItemActive(this);
|
||||
if (iVar2 != 0 && arrowCount != 0) {
|
||||
isShooting = IsItemActive(this);
|
||||
if (isShooting && arrowCount != 0) {
|
||||
if (((gPlayerState.attack_status & 0x80) != 0) || (gPlayerState.bow_state == 0)) {
|
||||
gPlayerState.bow_state = 0;
|
||||
DeleteItemBehavior(this, index);
|
||||
}
|
||||
} else {
|
||||
gPlayerState.field_0xa = (8 >> index) | gPlayerState.field_0xa;
|
||||
SetItemAnim(this, 0x27c);
|
||||
SetItemAnim(this, ANIM_BOW_SHOOT);
|
||||
this->animPriority = 0xf;
|
||||
this->priority |= 0xf;
|
||||
this->stateID = 3;
|
||||
|
||||
@@ -36,7 +36,7 @@ void sub_08076E60(ItemBehavior* this, u32 index) {
|
||||
}
|
||||
if ((this->playerFrame & 0x80) != 0) {
|
||||
this->stateID = 2;
|
||||
SetItemAnim(this, 0x504);
|
||||
SetItemAnim(this, ANIM_GUSTJAR_SUCK);
|
||||
gPlayerState.field_0xa = gPlayerState.field_0xa & ~(8 >> index);
|
||||
playerItem = CreatePlayerItem(PLAYER_ITEM_GUST, 0, 0, 0);
|
||||
if (playerItem != NULL) {
|
||||
@@ -64,12 +64,12 @@ void sub_08076EC8(ItemBehavior* this, u32 index) {
|
||||
}
|
||||
|
||||
if (gPlayerEntity.subAction == 0x1b) {
|
||||
animIndex = 0x524;
|
||||
animIndex = ANIM_GUSTJAR_524;
|
||||
} else {
|
||||
if (gPlayerState.direction & DIR_NOT_MOVING_CHECK) {
|
||||
animIndex = 0x504;
|
||||
animIndex = ANIM_GUSTJAR_SUCK;
|
||||
} else {
|
||||
animIndex = 0x518;
|
||||
animIndex = ANIM_GUSTJAR_WALK;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@ void sub_08076F64(ItemBehavior* this, u32 index) {
|
||||
gPlayerState.field_0x1c = 1;
|
||||
gPlayerState.field_0xa &= ~(8 >> index);
|
||||
this->stateID = 2;
|
||||
SetItemAnim(this, 0x504);
|
||||
SetItemAnim(this, ANIM_GUSTJAR_SUCK);
|
||||
item = CreatePlayerItem(PLAYER_ITEM_GUST, 0, 0, 0);
|
||||
if (item) {
|
||||
item->parent = player;
|
||||
@@ -108,7 +108,7 @@ void sub_08076F64(ItemBehavior* this, u32 index) {
|
||||
return;
|
||||
} else {
|
||||
gPlayerState.field_0x1c = 6;
|
||||
SetItemAnim(this, 0x510);
|
||||
SetItemAnim(this, ANIM_GUSTJAR_END);
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
@@ -155,7 +155,7 @@ void sub_08076F64(ItemBehavior* this, u32 index) {
|
||||
return;
|
||||
break;
|
||||
case 7:
|
||||
SetItemAnim(this, 0x514);
|
||||
SetItemAnim(this, ANIM_GUSTJAR_BLOW);
|
||||
gPlayerState.field_0x1c = 3;
|
||||
gPlayerState.gustJarSpeed = 0;
|
||||
return;
|
||||
@@ -163,7 +163,7 @@ void sub_08076F64(ItemBehavior* this, u32 index) {
|
||||
case 2:
|
||||
default:
|
||||
gPlayerState.field_0x1c = 3;
|
||||
SetItemAnim(this, 0x514);
|
||||
SetItemAnim(this, ANIM_GUSTJAR_BLOW);
|
||||
return;
|
||||
case 0:
|
||||
break;
|
||||
|
||||
@@ -27,7 +27,7 @@ void sub_08077534(ItemBehavior* this, u32 index) {
|
||||
this->timer = gSave.stats.bottles[tmp - ITEM_BOTTLE1];
|
||||
switch (this->timer) {
|
||||
case ITEM_BOTTLE_EMPTY:
|
||||
SetItemAnim(this, 0x614);
|
||||
SetItemAnim(this, ANIM_BOTTLE_SWING);
|
||||
return;
|
||||
case ITEM_BOTTLE_BUTTER:
|
||||
case ITEM_BOTTLE_MILK:
|
||||
@@ -43,22 +43,22 @@ void sub_08077534(ItemBehavior* this, u32 index) {
|
||||
this->stateID = 3;
|
||||
gPlayerEntity.animationState = 4;
|
||||
gPlayerEntity.spriteSettings.flipX = 0;
|
||||
SetItemAnim(this, 0x2df);
|
||||
SetItemAnim(this, ANIM_BOTTLE_DRINK);
|
||||
break;
|
||||
case BOTTLE_CHARM_NAYRU:
|
||||
case BOTTLE_CHARM_FARORE:
|
||||
case BOTTLE_CHARM_DIN:
|
||||
default:
|
||||
this->stateID = 3;
|
||||
SetItemAnim(this, 0x610);
|
||||
SetItemAnim(this, ANIM_BOTTLE_POUR);
|
||||
break;
|
||||
}
|
||||
gPlayerEntity.flags &= ~ENT_COLLIDE;
|
||||
}
|
||||
|
||||
void sub_08077618(ItemBehavior* this, u32 index) {
|
||||
if ((this->playerFrame & 0x80) != 0) {
|
||||
SetItemAnim(this, 0x618);
|
||||
if (this->playerFrame & 0x80) {
|
||||
SetItemAnim(this, ANIM_BOTTLE_SWING_END);
|
||||
this->stateID++;
|
||||
} else {
|
||||
UpdateItemAnim(this);
|
||||
|
||||
@@ -104,7 +104,7 @@ void sub_08075B54(ItemBehavior* this, u32 index) {
|
||||
object->x.HALF.HI = tmp[0] + object->x.HALF.HI;
|
||||
object->y.HALF.HI = tmp[1] + object->y.HALF.HI;
|
||||
}
|
||||
SetItemAnim(this, 0x60c);
|
||||
SetItemAnim(this, ANIM_LANTERN_BURN);
|
||||
bVar1 = (8 >> (index));
|
||||
gPlayerState.field_0xa |= bVar1;
|
||||
gPlayerState.keepFacing |= bVar1;
|
||||
|
||||
@@ -34,7 +34,7 @@ void sub_08077130(ItemBehavior* this, u32 index) {
|
||||
iVar1 = sub_080774A0();
|
||||
if (iVar1 != 0) {
|
||||
if (this->timer == 0) {
|
||||
SetItemAnim(this, 0x50c);
|
||||
SetItemAnim(this, ANIM_MOLEMITTS_DIG);
|
||||
this->stateID = 2;
|
||||
if (iVar1 == 0x56) {
|
||||
if ((gPlayerEntity.animationState & 2) != 0) {
|
||||
@@ -45,7 +45,7 @@ void sub_08077130(ItemBehavior* this, u32 index) {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
SetItemAnim(this, 0x508);
|
||||
SetItemAnim(this, ANIM_MOLEMITTS_FLOOR);
|
||||
this->stateID = 1;
|
||||
}
|
||||
} else {
|
||||
@@ -71,9 +71,9 @@ void sub_080771C8(ItemBehavior* this, u32 index) {
|
||||
}
|
||||
if ((this->playerFrame & 0x10) != 0) {
|
||||
if (sub_0800875A(&gPlayerEntity, 0xd, this) == 0) {
|
||||
SetItemAnim(this, 0x520);
|
||||
SetItemAnim(this, ANIM_MOLEMITTS_MISS);
|
||||
this->stateID = 3;
|
||||
SoundReq(SFX_107);
|
||||
SoundReq(SFX_ITEM_GLOVES_AIR);
|
||||
} else {
|
||||
if (this->subtimer != 0xff) {
|
||||
object = CreateObjectWithParent(&gPlayerEntity, OBJECT_1F, 0, this->field_0x2[1]);
|
||||
@@ -140,7 +140,7 @@ void sub_080772A8(ItemBehavior* this, u32 index) {
|
||||
SoundReq(SFX_108);
|
||||
CreateObjectWithParent(&gPlayerEntity, MOLE_MITTS_PARTICLE, this->playerFrame, 0);
|
||||
} else {
|
||||
SetItemAnim(this, 0x51c);
|
||||
SetItemAnim(this, ANIM_MOLEMITTS_CLANG);
|
||||
effect = CreateFx(&gPlayerEntity, FX_STARS_STRIKE, 0);
|
||||
if (effect != NULL) {
|
||||
effect->animationState = this->playerAnimationState;
|
||||
|
||||
@@ -104,7 +104,7 @@ void sub_08076964(ItemBehavior* this, u32 index) {
|
||||
if (HasSwordEquipped() && (gPlayerState.flags & PL_MINISH) == 0 &&
|
||||
(gPlayerState.skills & SKILL_DASH_ATTACK) != 0) {
|
||||
gPlayerState.lastSwordMove = SWORD_MOVE_DASH;
|
||||
SetItemAnim(this, 0x298);
|
||||
SetItemAnim(this, ANIM_DASH);
|
||||
entity = CreatePlayerItemWithParent(this, PLAYER_ITEM_DASH_SWORD);
|
||||
if (entity != NULL) {
|
||||
if (ItemIsSword(gSave.stats.itemButtons[SLOT_A]) != 0) {
|
||||
@@ -115,8 +115,8 @@ void sub_08076964(ItemBehavior* this, u32 index) {
|
||||
entity->field_0x68.HALF.LO = uVar3;
|
||||
return;
|
||||
}
|
||||
} else if ((gPlayerState.flags & PL_MINISH) == 0) {
|
||||
SetItemAnim(this, 0x104);
|
||||
} else if (!(gPlayerState.flags & PL_MINISH)) {
|
||||
SetItemAnim(this, ANIM_WALK);
|
||||
return;
|
||||
} else {
|
||||
gPlayerState.animation = ANIM_C10;
|
||||
|
||||
@@ -80,7 +80,7 @@ void sub_08075338(ItemBehavior* this, u32 index) {
|
||||
this->priority |= 0x80;
|
||||
gPlayerState.lastSwordMove = SWORD_MOVE_ROLL;
|
||||
gPlayerState.flags |= PL_SWORD_THRUST;
|
||||
SetItemAnim(this, 0x130);
|
||||
SetItemAnim(this, ANIM_ROLLATTACK_SLIDE);
|
||||
SoundReq(SFX_PLY_VO3);
|
||||
return;
|
||||
}
|
||||
@@ -150,7 +150,7 @@ void sub_08075580(ItemBehavior* this, u32 index) {
|
||||
} else {
|
||||
this->timer = 0x50;
|
||||
}
|
||||
SetItemAnim(this, 0x168);
|
||||
SetItemAnim(this, ANIM_SWORD_CHARGE);
|
||||
CreateObject(SWORD_PARTICLE, 0, 0);
|
||||
return;
|
||||
}
|
||||
@@ -190,10 +190,10 @@ void sub_08075694(ItemBehavior* this, u32 index) {
|
||||
if (gPlayerState.flags & PL_SWORD_THRUST) {
|
||||
gPlayerState.flags &= ~PL_SWORD_THRUST;
|
||||
gPlayerState.flags &= ~PL_ROLLING;
|
||||
SetItemAnim(this, 300);
|
||||
SetItemAnim(this, ANIM_ROLLATTACK_SPIN);
|
||||
} else {
|
||||
gPlayerState.lastSwordMove = SWORD_MOVE_SPIN;
|
||||
SetItemAnim(this, 0x124);
|
||||
SetItemAnim(this, ANIM_SPINATTACK);
|
||||
}
|
||||
gPlayerState.field_0xa = (8 >> index) | gPlayerState.field_0xa;
|
||||
this->stateID = 4;
|
||||
@@ -252,7 +252,7 @@ void sub_08075738(ItemBehavior* this, u32 index) {
|
||||
this->timer = 1;
|
||||
this->subtimer = 1;
|
||||
gPlayerState.field_0xa = gPlayerState.field_0xa & ~(8 >> index);
|
||||
SetItemAnim(this, 0x128);
|
||||
SetItemAnim(this, ANIM_GREATSPIN);
|
||||
}
|
||||
|
||||
if ((this->playerFrame & 0x80) != 0) {
|
||||
@@ -298,7 +298,7 @@ void sub_08075900(ItemBehavior* this, u32 index) {
|
||||
} else {
|
||||
if (this->timer != 0) {
|
||||
if (--this->timer == 0) {
|
||||
SetItemAnim(this, 0x134);
|
||||
SetItemAnim(this, ANIM_ROLLATTACK_END);
|
||||
}
|
||||
gPlayerEntity.direction = (gPlayerEntity.animationState >> 1) << 3;
|
||||
gPlayerEntity.speed = 0x300;
|
||||
|
||||
@@ -25,9 +25,9 @@ void sub_08076088(ItemBehavior* this, Entity* param_2, u32 param_3) {
|
||||
|
||||
this->field_0x18 = param_2;
|
||||
if ((gPlayerState.flags & PL_NO_CAP)) {
|
||||
SetItemAnim(this, 0x928);
|
||||
SetItemAnim(this, ANIM_PICKUP_NOCAP);
|
||||
} else {
|
||||
SetItemAnim(this, 0x338);
|
||||
SetItemAnim(this, ANIM_PICKUP);
|
||||
}
|
||||
gPlayerState.heldObject = 3;
|
||||
gPlayerState.framestate = 4;
|
||||
@@ -108,12 +108,12 @@ void ItemPickupCheck(ItemBehavior* this, u32 index) {
|
||||
this->animPriority = 6;
|
||||
gPlayerState.field_0xa = (8 >> index) | gPlayerState.field_0xa;
|
||||
gPlayerState.keepFacing = (8 >> index) | gPlayerState.keepFacing;
|
||||
if ((gPlayerState.flags & PL_NO_CAP) == 0) {
|
||||
SetItemAnim(this, 0x378);
|
||||
if (!(gPlayerState.flags & PL_NO_CAP)) {
|
||||
SetItemAnim(this, ANIM_GRAB);
|
||||
} else {
|
||||
SetItemAnim(this, 0x948);
|
||||
SetItemAnim(this, ANIM_GRAB_NOCAP);
|
||||
}
|
||||
SoundReq(SFX_88);
|
||||
SoundReq(SFX_GRAB);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -172,10 +172,10 @@ void sub_08076518(ItemBehavior* this, u32 index) {
|
||||
this->field_0x18 = NULL;
|
||||
this->stateID++;
|
||||
this->animPriority = 0x0f;
|
||||
if ((gPlayerState.flags & PL_NO_CAP) != 0) {
|
||||
SetItemAnim(this, 0x930);
|
||||
if (gPlayerState.flags & PL_NO_CAP) {
|
||||
SetItemAnim(this, ANIM_THROW_NOCAP);
|
||||
} else {
|
||||
SetItemAnim(this, 0x344);
|
||||
SetItemAnim(this, ANIM_THROW);
|
||||
}
|
||||
gPlayerState.field_0xa |= 8 >> index;
|
||||
gPlayerState.keepFacing |= 8 >> index;
|
||||
|
||||
Reference in New Issue
Block a user