mirror of
https://github.com/zeldaret/tmc
synced 2026-06-23 09:20:02 -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;
|
||||
|
||||
@@ -48,7 +48,7 @@ const struct_0811F960 gUnk_0811F960[] = {
|
||||
{0x5, 0x1, 0x00, SFX_NONE},
|
||||
{0x0, 0x0, 0x00, SFX_164},
|
||||
{0x0, 0x1, 0x14, SFX_1A8},
|
||||
{0x0, 0x1, 0x10, SFX_88},
|
||||
{0x0, 0x1, 0x10, SFX_GRAB},
|
||||
{0x0, 0x0, 0x00, SFX_NONE},
|
||||
{0x0, 0x0, 0x00, SFX_NONE},
|
||||
{0x0, 0x0, 0x00, SFX_NONE},
|
||||
@@ -87,9 +87,9 @@ const struct_0811F960 gUnk_0811F960[] = {
|
||||
{0x0, 0x1, 0x00, SFX_1B4},
|
||||
{0x0, 0x1, 0x13, SFX_164},
|
||||
{0x0, 0x1, 0x00, SFX_NONE},
|
||||
{0x0, 0x1, 0x10, SFX_88},
|
||||
{0x0, 0x1, 0x10, SFX_88},
|
||||
{0x0, 0x1, 0x10, SFX_88},
|
||||
{0x0, 0x1, 0x10, SFX_GRAB},
|
||||
{0x0, 0x1, 0x10, SFX_GRAB},
|
||||
{0x0, 0x1, 0x10, SFX_GRAB},
|
||||
{0x0, 0x1, 0x00, SFX_NONE},
|
||||
{0x0, 0x1, 0x00, SFX_NONE},
|
||||
{0x0, 0x0, 0x00, SFX_11D},
|
||||
|
||||
+23
-23
@@ -196,7 +196,7 @@ static EntityAction sub_08072F94;
|
||||
static EntityAction sub_08073094;
|
||||
|
||||
// PLAYER_USEENTRANCE
|
||||
static EntityAction sub_080731D8;
|
||||
static EntityAction PlayerUseStairs;
|
||||
static EntityAction sub_080732D0;
|
||||
static EntityAction sub_0807332C;
|
||||
static EntityAction sub_080733BC;
|
||||
@@ -396,7 +396,7 @@ static void PlayerNormal(Entity* this) {
|
||||
if ((this->animationState >> 1) + 92 == this->animIndex && (u16)this->spriteIndex == 2)
|
||||
UpdateAnimationSingleFrame(&gPlayerEntity);
|
||||
else
|
||||
gPlayerState.animation = ANIM_TRAPPED_BY_GHINI;
|
||||
gPlayerState.animation = ANIM_TRAPPED;
|
||||
sub_0806F948(&gPlayerEntity);
|
||||
ResetActiveItems();
|
||||
UpdateActiveItems(this);
|
||||
@@ -981,7 +981,7 @@ static void sub_080712F0(Entity* this) {
|
||||
temp = TRUE;
|
||||
} else if ((this->frame & ANIM_DONE) != 0) {
|
||||
if (this->animIndex != 0xce)
|
||||
gPlayerState.animation = ANIM_DROWN_END;
|
||||
gPlayerState.animation = ANIM_DROWN_RESPAWN;
|
||||
else
|
||||
temp = TRUE;
|
||||
}
|
||||
@@ -1080,7 +1080,7 @@ static void PortalStandUpdate(Entity* this) {
|
||||
this->action = PLAYER_MINISH;
|
||||
this->subAction = 7;
|
||||
this->subtimer = 0;
|
||||
gPlayerState.animation = (gPlayerState.flags & PL_NO_CAP) ? ANIM_PORTAL_LEAVE_NOCAP : ANIM_PORTAL_LEAVE;
|
||||
gPlayerState.animation = (gPlayerState.flags & PL_NO_CAP) ? ANIM_HOP_NOCAP : ANIM_HOP;
|
||||
gPlayerState.flags &= ~PL_USE_PORTAL;
|
||||
return;
|
||||
}
|
||||
@@ -1460,7 +1460,7 @@ static void PlayerPushEnd(Entity* this) {
|
||||
PlayerWaitForScroll(this);
|
||||
// Final push?
|
||||
this->subtimer = 6;
|
||||
if ((gPlayerState.flags & PL_MINISH) == 0) {
|
||||
if (!(gPlayerState.flags & PL_MINISH)) {
|
||||
gPlayerState.animation = ANIM_WALK;
|
||||
this->spriteIndex = 3;
|
||||
InitAnimationForceUpdate(this, (this->animationState >> 1) + 0x3c);
|
||||
@@ -1664,7 +1664,7 @@ static void PlayerEmptyBottleInit(Entity* this) {
|
||||
gPlayerState.animation = ANIM_BOTTLE_DRINK;
|
||||
break;
|
||||
default:
|
||||
gPlayerState.animation = ANIM_BOTTLE_EMPTY;
|
||||
gPlayerState.animation = ANIM_BOTTLE_POUR;
|
||||
SetInventoryValue(gPlayerState.field_0x38, 2);
|
||||
break;
|
||||
}
|
||||
@@ -1836,7 +1836,7 @@ static void sub_08072214(Entity* this) {
|
||||
this->timer = gPlayerState.field_0x38;
|
||||
this->direction = Direction8FromAnimationState(AnimationStateFlip180(this->animationState));
|
||||
if ((gPlayerState.flags & PL_NO_CAP) == 0) {
|
||||
gPlayerState.animation = ANIM_PULL;
|
||||
gPlayerState.animation = ANIM_PULL2;
|
||||
} else {
|
||||
gPlayerState.animation = ANIM_PULL_NOCAP;
|
||||
}
|
||||
@@ -1851,7 +1851,7 @@ static void sub_08072260(Entity* this) {
|
||||
if (--this->timer == 0) {
|
||||
gPlayerState.flags &= ~PL_BUSY;
|
||||
if ((gPlayerState.flags & PL_NO_CAP) == 0) {
|
||||
gPlayerState.animation = ANIM_PULL;
|
||||
gPlayerState.animation = ANIM_PULL2;
|
||||
} else {
|
||||
gPlayerState.animation = ANIM_PULL_NOCAP;
|
||||
}
|
||||
@@ -1945,7 +1945,7 @@ static void sub_08072454(Entity* this) {
|
||||
static void sub_0807246C(Entity* this) {
|
||||
this->subAction = 1;
|
||||
this->timer = gPlayerState.field_0x38;
|
||||
gPlayerState.animation = ANIM_3C0;
|
||||
gPlayerState.animation = ANIM_LAUNCHED;
|
||||
SoundReq(SFX_PLY_VO7);
|
||||
}
|
||||
|
||||
@@ -2202,7 +2202,7 @@ static void PlayerInHoleUpdate(Entity* this) {
|
||||
this->subAction = 3;
|
||||
this->timer = 40;
|
||||
this->spritePriority.b1 = 1;
|
||||
gPlayerState.animation = ANIM_ROLL_IN_HOLE;
|
||||
gPlayerState.animation = ANIM_SPRING_JUMP;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2310,7 +2310,7 @@ static void sub_08072CC0(Entity* this) {
|
||||
this->subtimer = (gPlayerState.field_0x3a >> 2) + 1;
|
||||
this->direction = gPlayerState.field_0x39;
|
||||
this->speed = 0x400;
|
||||
gPlayerState.animation = ANIM_524;
|
||||
gPlayerState.animation = ANIM_GUSTJAR_524;
|
||||
gPlayerState.heldObject = 0;
|
||||
}
|
||||
|
||||
@@ -2561,7 +2561,7 @@ static void sub_08073094(Entity* this) {
|
||||
|
||||
static void PlayerUseEntrance(Entity* this) {
|
||||
static EntityAction* const sPlayerUseEntranceStates[] = {
|
||||
sub_080731D8,
|
||||
PlayerUseStairs,
|
||||
sub_080732D0,
|
||||
sub_0807332C,
|
||||
sub_080733BC,
|
||||
@@ -2572,7 +2572,7 @@ static void PlayerUseEntrance(Entity* this) {
|
||||
sPlayerUseEntranceStates[this->subAction](this);
|
||||
}
|
||||
|
||||
static void sub_080731D8(Entity* this) {
|
||||
static void PlayerUseStairs(Entity* this) {
|
||||
COLLISION_OFF(this);
|
||||
this->speed = 0x40;
|
||||
this->animationState = IdleNorth;
|
||||
@@ -2700,7 +2700,7 @@ static void PlayerParachute(Entity* this) {
|
||||
}
|
||||
|
||||
static void sub_08073468(Entity* this) {
|
||||
gPlayerState.animation = ANIM_PARACHUTE;
|
||||
gPlayerState.animation = ANIM_PARACHUTE_ACTIVATE;
|
||||
gPlayerState.jump_status = 0;
|
||||
this->zVelocity = Q_16_16(-1.0);
|
||||
this->subAction++;
|
||||
@@ -2730,7 +2730,7 @@ static void sub_08073504(Entity* this) {
|
||||
*((u32*)&this->field_0x80.HWORD) = this->direction << 8;
|
||||
this->field_0x86.HALF.HI = 0;
|
||||
this->field_0x86.HALF.LO = 0;
|
||||
gPlayerState.animation = ANIM_PARACHUTE2;
|
||||
gPlayerState.animation = ANIM_PARACHUTE;
|
||||
if (gPlayerState.field_0x38 == 1) {
|
||||
COLLISION_OFF(this);
|
||||
this->subAction = 6;
|
||||
@@ -2960,13 +2960,13 @@ static void sub_08073968(Entity* this) {
|
||||
CheckPlayerVelocity();
|
||||
if ((gPlayerState.heldObject | gPlayerState.keepFacing) == 0) {
|
||||
if (gPlayerState.flags & PL_NO_CAP) {
|
||||
gPlayerState.animation = ANIM_PORTAL_LEAVE_NOCAP;
|
||||
gPlayerState.animation = ANIM_HOP_NOCAP;
|
||||
} else {
|
||||
if ((gPlayerState.flags & PL_MINISH) == 0) {
|
||||
if (gPlayerState.flags & PL_ENTER_MINECART) {
|
||||
gPlayerState.animation = ANIM_JUMP;
|
||||
} else {
|
||||
gPlayerState.animation = ANIM_PORTAL_LEAVE;
|
||||
gPlayerState.animation = ANIM_HOP;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3229,7 +3229,7 @@ static void sub_08073F4C(Entity* this) {
|
||||
*(u32*)&this->cutsceneBeh.HWORD = 1152;
|
||||
this->spriteRendering.b0 = 3;
|
||||
sub_08074018(this);
|
||||
gPlayerState.animation = ANIM_73C;
|
||||
gPlayerState.animation = ANIM_GROW;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3272,7 +3272,7 @@ static void sub_08074060(Entity* this) {
|
||||
this->subtimer = 0;
|
||||
this->subAction++;
|
||||
this->zVelocity = Q_16_16(2.0);
|
||||
gPlayerState.animation = ANIM_PORTAL_LEAVE;
|
||||
gPlayerState.animation = ANIM_HOP;
|
||||
sub_0805EC60(this);
|
||||
} else {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
@@ -3859,9 +3859,9 @@ void sub_08074D34(Entity* this, ScriptExecutionContext* ctx) {
|
||||
break;
|
||||
case 0x8:
|
||||
if (gPlayerState.flags & PL_NO_CAP)
|
||||
gPlayerState.animation = ANIM_PORTAL_LEAVE_NOCAP;
|
||||
gPlayerState.animation = ANIM_HOP_NOCAP;
|
||||
else
|
||||
gPlayerState.animation = ANIM_PORTAL_LEAVE;
|
||||
gPlayerState.animation = ANIM_HOP;
|
||||
this->zVelocity = Q_16_16(1.5);
|
||||
break;
|
||||
case 0x10:
|
||||
@@ -3972,9 +3972,9 @@ void sub_0807501C(Entity* this) {
|
||||
if (--this->timer == 0) {
|
||||
this->animationState = gPlayerState.field_0x3a;
|
||||
if (!gPlayerState.field_0x39) {
|
||||
gPlayerState.animation = ANIM_PORTAL_LEAVE_NOCAP;
|
||||
gPlayerState.animation = ANIM_HOP_NOCAP;
|
||||
} else {
|
||||
gPlayerState.animation = ANIM_PORTAL_LEAVE;
|
||||
gPlayerState.animation = ANIM_HOP;
|
||||
}
|
||||
this->spritePriority.b1 = 1;
|
||||
this->direction = Direction8FromAnimationState(this->animationState);
|
||||
|
||||
+30
-29
@@ -495,7 +495,7 @@ Entity* sub_08077CF8(u32 id, u32 type, u32 type2, u32 unk) {
|
||||
}
|
||||
|
||||
void sub_08077D38(ItemBehavior* this, u32 index) {
|
||||
u32 r6;
|
||||
u32 anim;
|
||||
ItemDefinition* ptr;
|
||||
|
||||
gPlayerState.field_0xa |= 8 >> index;
|
||||
@@ -510,16 +510,16 @@ void sub_08077D38(ItemBehavior* this, u32 index) {
|
||||
if ((gPlayerState.flags & PL_NO_CAP)) {
|
||||
switch (this->behaviorId) {
|
||||
case 0x1b:
|
||||
r6 = 0x948;
|
||||
anim = ANIM_GRAB_NOCAP;
|
||||
break;
|
||||
case 1:
|
||||
r6 = 0x408;
|
||||
anim = ANIM_SWORD_NOCAP;
|
||||
break;
|
||||
case 0xd:
|
||||
r6 = 0x40c;
|
||||
anim = ANIM_SHIELD_PULLOUT_NOCAP;
|
||||
break;
|
||||
}
|
||||
SetItemAnim(this, r6);
|
||||
SetItemAnim(this, anim);
|
||||
} else {
|
||||
SetItemAnim(this, ptr->frameIndex);
|
||||
}
|
||||
@@ -588,8 +588,8 @@ void DeleteItemBehavior(ItemBehavior* this, u32 index) {
|
||||
}
|
||||
|
||||
bool32 sub_08077EC8(ItemBehavior* this) {
|
||||
if ((gPlayerState.sword_state & 8) != 0) {
|
||||
SetItemAnim(this, 0x170);
|
||||
if (gPlayerState.sword_state & 8) {
|
||||
SetItemAnim(this, ANIM_SWORD_CHARGE_BUMP);
|
||||
this->timer = 0x28;
|
||||
this->stateID = 7;
|
||||
this->animPriority = 6;
|
||||
@@ -1868,12 +1868,12 @@ void sub_080797EC(void) {
|
||||
if (gPlayerState.heldObject != 0) {
|
||||
animation = ANIM_CARRY_NOCAP;
|
||||
} else if (gPlayerState.shield_status != 0) {
|
||||
animation = ANIM_SHIELD_NOCAP;
|
||||
animation = ANIM_SHIELD_WALK_NOCAP;
|
||||
} else if (gPlayerState.bow_state == 0) {
|
||||
if (gPlayerState.swim_state != 0) {
|
||||
animation = ANIM_SWIM;
|
||||
animation = ANIM_SWIM_MOVE;
|
||||
} else {
|
||||
animation = ANIM_SWORD_CHARGE;
|
||||
animation = ANIM_SWORD_CHARGE_WALK;
|
||||
if ((gPlayerState.sword_state & 0x48) != 0) {
|
||||
gPlayerState.prevAnim = 0x6c;
|
||||
return;
|
||||
@@ -1883,7 +1883,7 @@ void sub_080797EC(void) {
|
||||
}
|
||||
animation = ANIM_WALK_NOCAP;
|
||||
} else {
|
||||
animation = ANIM_SWORD_CHARGE;
|
||||
animation = ANIM_SWORD_CHARGE_WALK;
|
||||
if (sub_080793E4(0)) {
|
||||
if (sub_080B1B44(GetPlayerTilePos(), gPlayerEntity.collisionLayer) != 0xff) {
|
||||
gPlayerState.sword_state &= ~8;
|
||||
@@ -1893,7 +1893,7 @@ void sub_080797EC(void) {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
animation = ANIM_BOW;
|
||||
animation = ANIM_BOW_WALK;
|
||||
}
|
||||
} else {
|
||||
if (gPlayerState.field_0x1c != 0) {
|
||||
@@ -1905,19 +1905,19 @@ void sub_080797EC(void) {
|
||||
} else if ((gPlayerState.flags & PL_IN_MINECART) != 0) {
|
||||
animation = ANIM_MINECART;
|
||||
} else if (gPlayerState.shield_status != 0) {
|
||||
animation = ANIM_SHIELD;
|
||||
animation = ANIM_SHIELD_WALK;
|
||||
} else if (gPlayerState.bow_state != 0) {
|
||||
animation = ANIM_BOW;
|
||||
animation = ANIM_BOW_WALK;
|
||||
} else {
|
||||
if (gPlayerState.swim_state != 0) {
|
||||
animation = ANIM_SWIM;
|
||||
animation = ANIM_SWIM_MOVE;
|
||||
} else {
|
||||
animation = ANIM_SWORD_CHARGE;
|
||||
animation = ANIM_SWORD_CHARGE_WALK;
|
||||
if ((gPlayerState.sword_state & 0x48) != 0) {
|
||||
gPlayerState.prevAnim = 0x6c;
|
||||
return;
|
||||
} else if (gPlayerState.sword_state != 0) {
|
||||
animation = ANIM_SWORD_CHARGE;
|
||||
animation = ANIM_SWORD_CHARGE_WALK;
|
||||
if (sub_080793E4(0)) {
|
||||
if (sub_080B1B44(GetPlayerTilePos(), (u32)gPlayerEntity.collisionLayer) != 0xff) {
|
||||
gPlayerState.sword_state &= ~8;
|
||||
@@ -1931,6 +1931,7 @@ void sub_080797EC(void) {
|
||||
if ((gPlayerState.flags & PL_USE_LANTERN) != 0) {
|
||||
animation = ANIM_LANTERN;
|
||||
} else {
|
||||
// Change to test animations I guess
|
||||
animation = ANIM_WALK;
|
||||
}
|
||||
}
|
||||
@@ -1950,7 +1951,7 @@ void ResolvePlayerAnimation(void) {
|
||||
u32 anim;
|
||||
if ((gPlayerState.flags & PL_NO_CAP) != 0) {
|
||||
if (gPlayerState.heldObject != 0) {
|
||||
anim = ANIM_CARRY_END_NOCAP;
|
||||
anim = ANIM_CARRY_STAND_NOCAP;
|
||||
} else {
|
||||
if ((gPlayerState.field_0x1c | gPlayerState.moleMittsState) != 0) {
|
||||
return;
|
||||
@@ -1958,11 +1959,11 @@ void ResolvePlayerAnimation(void) {
|
||||
if ((gPlayerState.flags & PL_CONVEYOR_PUSHED) != 0) {
|
||||
anim = ANIM_JUMP;
|
||||
} else if (gPlayerState.shield_status != 0) {
|
||||
anim = ANIM_SHIELD_END_NOCAP;
|
||||
anim = ANIM_SHIELD_NOCAP;
|
||||
} else if (gPlayerState.bow_state != 0) {
|
||||
anim = ANIM_BOW_END;
|
||||
anim = ANIM_BOW_CHARGE;
|
||||
} else if (gPlayerState.swim_state != 0) {
|
||||
anim = ANIM_SWIM_END;
|
||||
anim = ANIM_SWIM_STILL;
|
||||
} else {
|
||||
if ((gPlayerState.sword_state & 0x48) != 0) {
|
||||
return;
|
||||
@@ -1987,13 +1988,13 @@ void ResolvePlayerAnimation(void) {
|
||||
anim = ANIM_DEFAULT_NOCAP;
|
||||
}
|
||||
} else {
|
||||
anim = ANIM_SWORD_CHARGE_END;
|
||||
anim = ANIM_SWORD_CHARGE;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (gPlayerState.heldObject != 0) {
|
||||
anim = ANIM_CARRY_END;
|
||||
anim = ANIM_CARRY_STAND;
|
||||
} else {
|
||||
if ((gPlayerState.field_0x1c | gPlayerState.moleMittsState) != 0) {
|
||||
return;
|
||||
@@ -2005,13 +2006,13 @@ void ResolvePlayerAnimation(void) {
|
||||
} else if (gPlayerState.dash_state != 0) {
|
||||
anim = ANIM_DASH;
|
||||
} else if ((gPlayerState.flags & PL_IN_MINECART) != 0) {
|
||||
anim = ANIM_MINECART_END;
|
||||
anim = ANIM_MINECART_PAUSE;
|
||||
} else if (gPlayerState.shield_status != 0) {
|
||||
anim = ANIM_SHIELD_END;
|
||||
anim = ANIM_SHIELD;
|
||||
} else if (gPlayerState.bow_state != 0) {
|
||||
anim = ANIM_BOW_END;
|
||||
anim = ANIM_BOW_CHARGE;
|
||||
} else if (gPlayerState.swim_state != 0) {
|
||||
anim = ANIM_SWIM_END;
|
||||
anim = ANIM_SWIM_STILL;
|
||||
} else {
|
||||
if ((gPlayerState.sword_state & 0x48) != 0) {
|
||||
return;
|
||||
@@ -2020,7 +2021,7 @@ void ResolvePlayerAnimation(void) {
|
||||
anim = (gArea.portal_type == PT_JAR) ? ANIM_IN_POT : ANIM_PORTAL;
|
||||
} else {
|
||||
if (gPlayerState.sword_state != 0) {
|
||||
anim = ANIM_SWORD_CHARGE_END;
|
||||
anim = ANIM_SWORD_CHARGE;
|
||||
} else {
|
||||
if (gPlayerState.attack_status != 0) {
|
||||
return;
|
||||
@@ -2029,7 +2030,7 @@ void ResolvePlayerAnimation(void) {
|
||||
if (gActiveItems[ACTIVE_ITEM_LANTERN].animPriority != 0) {
|
||||
return;
|
||||
}
|
||||
anim = ANIM_LANTERN_END;
|
||||
anim = ANIM_LANTERN_ON;
|
||||
} else {
|
||||
anim = ANIM_DEFAULT;
|
||||
}
|
||||
|
||||
+2
-2
@@ -1598,9 +1598,9 @@ void sub_0807F1E8(Entity* entity, ScriptExecutionContext* context) {
|
||||
|
||||
void sub_0807F210(Entity* entity, ScriptExecutionContext* context) {
|
||||
if (gPlayerState.flags & PL_NO_CAP) {
|
||||
gPlayerState.animation = ANIM_PORTAL_LEAVE_NOCAP;
|
||||
gPlayerState.animation = ANIM_HOP_NOCAP;
|
||||
} else {
|
||||
gPlayerState.animation = ANIM_PORTAL_LEAVE;
|
||||
gPlayerState.animation = ANIM_HOP;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -958,7 +958,7 @@ const Song gSongTable[] = {
|
||||
[SFX_FALL_HOLE] = { &sfxFallHole, MUSIC_PLAYER_04, MUSIC_PLAYER_04 },
|
||||
[SFX_86] = { &sfx86, MUSIC_PLAYER_0F, MUSIC_PLAYER_0F },
|
||||
[SFX_PLY_DIE] = { &sfxPlyDie, MUSIC_PLAYER_1D, MUSIC_PLAYER_1D },
|
||||
[SFX_88] = { &sfx88, MUSIC_PLAYER_1C, MUSIC_PLAYER_1C },
|
||||
[SFX_GRAB] = { &sfx88, MUSIC_PLAYER_1C, MUSIC_PLAYER_1C },
|
||||
[SFX_BARREL_RELEASE] = { &sfxBarrelRelease, MUSIC_PLAYER_1B, MUSIC_PLAYER_1B },
|
||||
[SFX_BARREL_ENTER] = { &sfxBarrelEnter, MUSIC_PLAYER_1A, MUSIC_PLAYER_1A },
|
||||
[SFX_BARREL_ROLL] = { &sfxBarrelRoll, MUSIC_PLAYER_19, MUSIC_PLAYER_19 },
|
||||
@@ -1089,7 +1089,7 @@ const Song gSongTable[] = {
|
||||
[SFX_PLACE_OBJ] = { &sfx104, MUSIC_PLAYER_0D, MUSIC_PLAYER_0D },
|
||||
[SFX_105] = { &sfx105, MUSIC_PLAYER_1E, MUSIC_PLAYER_1E },
|
||||
[SFX_106] = { &sfx106, MUSIC_PLAYER_0B, MUSIC_PLAYER_0B },
|
||||
[SFX_107] = { &sfx107, MUSIC_PLAYER_0A, MUSIC_PLAYER_0A },
|
||||
[SFX_ITEM_GLOVES_AIR] = { &sfx107, MUSIC_PLAYER_0A, MUSIC_PLAYER_0A },
|
||||
[SFX_108] = { &sfx108, MUSIC_PLAYER_09, MUSIC_PLAYER_09 },
|
||||
[SFX_ITEM_GET] = { &sfx109, MUSIC_PLAYER_1E, MUSIC_PLAYER_1E },
|
||||
[SFX_10A] = { &sfx10A, MUSIC_PLAYER_08, MUSIC_PLAYER_08 },
|
||||
|
||||
Reference in New Issue
Block a user