mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-24 16:01:26 +00:00
PlayerMeleeWeaponAnimation
enum (#1154)
* Move `PlayerSwordAnimation` from `z_en_torch2.c` to `z64player.h` * `PlayerSwordAnimation` -> `PlayerMeleeWeaponAnimation` * Add `PWMA_` prefix to `PlayerMeleeWeaponAnimation` values * Use `PlayerMeleeWeaponAnimation` enum more * Add `PWMA_MAX` * Update comments in z_en_kanban.c * Some cleanup around conditionals with `meleeWeaponAnimation` * Comment `PWMA_` index value in `D_80854190` * `PMWA_` -> `PLAYER_MWA_` * Minor fixup * Missed one spot * Run formatter
This commit is contained in:
parent
5cadc5df8a
commit
c55a8530ee
15 changed files with 174 additions and 111 deletions
|
@ -293,7 +293,7 @@ s32 EnWf_ChangeAction(GlobalContext* globalCtx, EnWf* this, s16 mustChoose) {
|
|||
playerYawDiff = ABS(playerYawDiff);
|
||||
|
||||
if (func_800354B4(globalCtx, &this->actor, 100.0f, 0x2710, 0x2EE0, this->actor.shape.rot.y)) {
|
||||
if (player->meleeWeaponAnimation == 0x11) {
|
||||
if (player->meleeWeaponAnimation == PLAYER_MWA_JUMPSLASH_START) {
|
||||
EnWf_SetupBlocking(this);
|
||||
return true;
|
||||
}
|
||||
|
@ -311,7 +311,7 @@ s32 EnWf_ChangeAction(GlobalContext* globalCtx, EnWf* this, s16 mustChoose) {
|
|||
(this->actor.xzDistToPlayer < 120.0f)) {
|
||||
EnWf_SetupSomersaultAndAttack(this);
|
||||
return true;
|
||||
} else if (player->meleeWeaponAnimation == 0x11) {
|
||||
} else if (player->meleeWeaponAnimation == PLAYER_MWA_JUMPSLASH_START) {
|
||||
EnWf_SetupBlocking(this);
|
||||
return true;
|
||||
} else if ((this->actor.xzDistToPlayer < 80.0f) && (globalCtx->gameplayFrames % 2) != 0) {
|
||||
|
@ -1024,7 +1024,7 @@ void EnWf_Blocking(EnWf* this, GlobalContext* globalCtx) {
|
|||
if ((ABS(yawDiff) <= 0x4000) && (this->actor.xzDistToPlayer < 60.0f) &&
|
||||
(ABS(this->actor.yDistToPlayer) < 50.0f)) {
|
||||
if (func_800354B4(globalCtx, &this->actor, 100.0f, 10000, 0x4000, this->actor.shape.rot.y)) {
|
||||
if (player->meleeWeaponAnimation == 0x11) {
|
||||
if (player->meleeWeaponAnimation == PLAYER_MWA_JUMPSLASH_START) {
|
||||
EnWf_SetupBlocking(this);
|
||||
} else if ((globalCtx->gameplayFrames % 2) != 0) {
|
||||
EnWf_SetupBlocking(this);
|
||||
|
@ -1047,7 +1047,7 @@ void EnWf_Blocking(EnWf* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
} else if (this->actionTimer == 0) {
|
||||
if (func_800354B4(globalCtx, &this->actor, 100.0f, 10000, 0x4000, this->actor.shape.rot.y)) {
|
||||
if (player->meleeWeaponAnimation == 0x11) {
|
||||
if (player->meleeWeaponAnimation == PLAYER_MWA_JUMPSLASH_START) {
|
||||
EnWf_SetupBlocking(this);
|
||||
} else if ((globalCtx->gameplayFrames % 2) != 0) {
|
||||
EnWf_SetupBlocking(this);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue