renamed and added a bunch of animations to enum

This commit is contained in:
Reinmmar 2023-09-19 21:23:45 +02:00
parent 20483c258a
commit 0fdb9c5ac2
15 changed files with 169 additions and 132 deletions

View File

@ -285,11 +285,18 @@ typedef enum {
typedef enum {
ANIM_DEFAULT = 0x100,
ANIM_WALK = 0x104,
ANIM_SWORD = 0x108,
ANIM_BOUNCE = 0x114,
ANIM_SHIELD = 0x160,
ANIM_SHIELD_END = 0x164,
ANIM_SWORD_CHARGE_END = 0x168,
ANIM_SWORD_CHARGE = 0x16c,
ANIM_SPINATTACK = 0x124,
ANIM_GREATSPIN = 0x128,
ANIM_ROLLATTACK_SPIN = 0x12c,
ANIM_ROLLATTACK_SLIDE = 0x130,
ANIM_ROLLATTACK_END = 0x134,
ANIM_SHIELD_PULLOUT = 0x158,
ANIM_SHIELD_WALK = 0x160,
ANIM_SHIELD = 0x164,
ANIM_SWORD_CHARGE = 0x168,
ANIM_SWORD_CHARGE_WALK = 0x16c,
ANIM_SWORD_CHARGE_BUMP = 0x170,
ANIM_DOWN_THRUST = 0x174,
ANIM_FALL = 0x1b8,
@ -297,21 +304,24 @@ typedef enum {
ANIM_FALL_MINISH = 0x1ba,
ANIM_DIE1 = 0x1bc,
ANIM_GET_WHITE_SWORD = 0x1e2,
ANIM_TRAPPED_BY_GHINI = 0x25c,
ANIM_BOW_END = 0x280,
ANIM_BOW = 0x284,
ANIM_BOW_PULLOUT = 0x21c,
ANIM_TRAPPED = 0x25c,
ANIM_BOW_SHOOT = 0x27c,
ANIM_BOW_CHARGE = 0x280,
ANIM_BOW_WALK = 0x284,
ANIM_ROCS_CAPE = 0x288,
ANIM_SWIM_END = 0x28c,
ANIM_SWIM = 0x290,
ANIM_SWIM_STILL = 0x28c,
ANIM_SWIM_MOVE = 0x290,
ANIM_FROZEN = 0x294,
ANIM_DASH = 0x298,
ANIM_ELECTROCUTED = 0x29c,
ANIM_ROLL = 0x2ac,
ANIM_DIE2 = 0x2bd,
ANIM_DIVE = 0x2be,
ANIM_IN_LAVA = 0x2c1,
ANIM_PORTAL = 0x2c2,
ANIM_PORTAL_SHRINK = 0x2c3,
ANIM_DROWN_END = 0x2ce,
ANIM_DROWN_RESPAWN = 0x2ce,
ANIM_CLIMB1_UP = 0x2cf,
ANIM_CLIMB2_UP = 0x2d0,
ANIM_CLIMB1_DOWN = 0x2d1,
@ -322,12 +332,16 @@ typedef enum {
ANIM_CLIMB_TO_TOP = 0x2d6,
ANIM_BOTTLE_DRINK = 0x2df,
ANIM_GET_ITEM_SMALL = 0x2e0,
ANIM_PICKUP = 0x338,
ANIM_PUSH = 0x33c,
ANIM_PULL = 0x34c,
ANIM_PULL = 0x340,
ANIM_THROW = 0x344,
ANIM_CARRY = 0x348,
ANIM_CARRY_END = 0x350,
ANIM_PULL2 = 0x34c,
ANIM_CARRY_STAND = 0x350,
ANIM_GRAB = 0x378,
ANIM_FALL_ON_BACK = 0x3a0,
ANIM_3C0 = 0x3c0,
ANIM_LAUNCHED = 0x3c0,
ANIM_EZLO_SEARCH = 0x3c5,
ANIM_EZLO_APPEAR_LEFT = 0x3c6,
ANIM_EZLO_EYES_UP = 0x3c7,
@ -338,9 +352,12 @@ typedef enum {
ANIM_EZLO_LEAVE_RIGHT = 0x3cd,
ANIM_DEFAULT_NOCAP = 0x400,
ANIM_WALK_NOCAP = 0x404,
ANIM_SHIELD_NOCAP = 0x410,
ANIM_SHIELD_END_NOCAP = 0x414,
ANIM_PORTAL_LEAVE_NOCAP = 0x41c,
ANIM_SWORD_NOCAP = 0x408,
ANIM_SHIELD_PULLOUT_NOCAP = 0x40c,
ANIM_SHIELD_WALK_NOCAP = 0x410,
ANIM_SHIELD_NOCAP = 0x414,
ANIM_BOUNCE_NOCAP = 0x418,
ANIM_HOP_NOCAP = 0x41c,
ANIM_JUMP_NOCAP = 0x420,
ANIM_LAND_NOCAP = 0x424,
ANIM_ROLL_NOCAP = 0x438,
@ -351,19 +368,33 @@ typedef enum {
ANIM_GET_ITEM_BIG_NOCAP = 0x45b,
ANIM_GET_ITEM_SMALL_NOCAP = 0x45e,
ANIM_GET_ITEM_SWORD = 0x45f,
ANIM_524 = 0x524,
ANIM_GUSTJAR_PULLOUT = 0x500,
ANIM_GUSTJAR_SUCK = 0x504,
ANIM_MOLEMITTS_FLOOR = 0x508,
ANIM_MOLEMITTS_DIG = 0x50c,
ANIM_GUSTJAR_END = 0x510,
ANIM_GUSTJAR_BLOW = 0x514,
ANIM_GUSTJAR_WALK = 0x518,
ANIM_MOLEMITTS_CLANG = 0x51c,
ANIM_MOLEMITTS_MISS = 0x520,
ANIM_GUSTJAR_524 = 0x524,
ANIM_ENTER_POT = 0x52c,
ANIM_IN_POT = 0x530,
ANIM_LANTERN_END = 0x604,
ANIM_LANTERN_LIGHT = 0x600,
ANIM_LANTERN_ON = 0x604,
ANIM_LANTERN = 0x608,
ANIM_BOTTLE_EMPTY = 0x610,
ANIM_LANTERN_BURN = 0x60c,
ANIM_BOTTLE_POUR = 0x610,
ANIM_BOTTLE_SWING = 0x614,
ANIM_BOTTLE_SWING_END = 0x618,
ANIM_FALL_IN_HOLE = 0x61c,
ANIM_IN_HOLE = 0x620,
ANIM_ROLL_IN_HOLE = 0x624,
ANIM_PARACHUTE = 0x700,
ANIM_PARACHUTE2 = 0x708,
ANIM_MINECART_END = 0x70c,
ANIM_SPRING_JUMP = 0x624,
ANIM_CANE = 0x628,
ANIM_PARACHUTE_ACTIVATE = 0x700,
ANIM_BOOMERANG_MAGIC = 0x704,
ANIM_PARACHUTE = 0x708,
ANIM_MINECART_PAUSE = 0x70c,
ANIM_MINECART = 0x710,
ANIM_DROWN = 0x72c,
ANIM_PARACHUTE_FALL = 0x730,
@ -373,18 +404,23 @@ typedef enum {
ANIM_PORTAL_ACTIVATE = 0x738,
ANIM_SLEEP_NOCAP = 0x73a,
ANIM_WAKEUP_NOCAP = 0x73b,
ANIM_73C = 0x73c,
ANIM_PORTAL_LEAVE = 0x80c,
ANIM_GROW = 0x73c,
ANIM_HOP = 0x80c,
ANIM_JUMP = 0x810,
ANIM_BOOMERANG = 0x818,
ANIM_LAND = 0x820,
ANIM_MOLDWORM_CAPTURED = 0x8b0,
ANIM_GET_NEW_SWORD = 0x8bf,
ANIM_OCARINA = 0x8e1,
ANIM_GET_LAST_SWORD = 0x8e3,
ANIM_GET_NEWCAP = 0x8e4,
ANIM_CARRY_END_NOCAP = 0x92c,
ANIM_PICKUP_NOCAP = 0x928,
ANIM_CARRY_STAND_NOCAP = 0x92c,
ANIM_THROW_NOCAP = 0x930,
ANIM_CARRY_NOCAP = 0x934,
ANIM_PUSH_NOCAP = 0x93c,
ANIM_PULL_NOCAP = 0x944,
ANIM_GRAB_NOCAP = 0x948,
ANIM_FALL_IN_HOLE_NOCAP = 0x950,
ANIM_IN_HOLE_NOCAP = 0x954,
ANIM_SWORD_MINISH = 0xc00,

View File

@ -168,7 +168,7 @@ typedef enum {
SFX_FALL_HOLE,
SFX_86,
SFX_PLY_DIE,
SFX_88,
SFX_GRAB,
SFX_BARREL_RELEASE,
SFX_BARREL_ENTER,
SFX_BARREL_ROLL,
@ -295,7 +295,7 @@ typedef enum {
SFX_PLACE_OBJ,
SFX_105,
SFX_106,
SFX_107,
SFX_ITEM_GLOVES_AIR,
SFX_108,
SFX_ITEM_GET,
SFX_10A,

View File

@ -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;

View File

@ -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;

View File

@ -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);

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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},

View File

@ -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);

View File

@ -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;
}

View File

@ -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;
}
}

View File

@ -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 },