mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-21 06:21:16 +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
|
@ -282,7 +282,7 @@ s32 EnGeldB_ReactToPlayer(GlobalContext* globalCtx, EnGeldB* this, s16 arg2) {
|
|||
angleToLink = ABS(angleToLink);
|
||||
|
||||
if (func_800354B4(globalCtx, thisx, 100.0f, 0x2710, 0x3E80, thisx->shape.rot.y)) {
|
||||
if (player->meleeWeaponAnimation == 0x11) {
|
||||
if (player->meleeWeaponAnimation == PLAYER_MWA_JUMPSLASH_START) {
|
||||
EnGeldB_SetupSpinDodge(this, globalCtx);
|
||||
return true;
|
||||
} else if (globalCtx->gameplayFrames & 1) {
|
||||
|
@ -296,7 +296,7 @@ s32 EnGeldB_ReactToPlayer(GlobalContext* globalCtx, EnGeldB* this, s16 arg2) {
|
|||
(thisx->xzDistToPlayer < 90.0f)) {
|
||||
EnGeldB_SetupJump(this);
|
||||
return true;
|
||||
} else if (player->meleeWeaponAnimation == 0x11) {
|
||||
} else if (player->meleeWeaponAnimation == PLAYER_MWA_JUMPSLASH_START) {
|
||||
EnGeldB_SetupSpinDodge(this, globalCtx);
|
||||
return true;
|
||||
} else if ((thisx->xzDistToPlayer < 90.0f) && (globalCtx->gameplayFrames & 1)) {
|
||||
|
@ -1141,7 +1141,7 @@ void EnGeldB_Block(EnGeldB* this, GlobalContext* globalCtx) {
|
|||
if ((ABS(angleToLink) <= 0x4000) && (this->actor.xzDistToPlayer < 40.0f) &&
|
||||
(ABS(this->actor.yDistToPlayer) < 50.0f)) {
|
||||
if (func_800354B4(globalCtx, &this->actor, 100.0f, 0x2710, 0x4000, this->actor.shape.rot.y)) {
|
||||
if (player->meleeWeaponAnimation == 0x11) {
|
||||
if (player->meleeWeaponAnimation == PLAYER_MWA_JUMPSLASH_START) {
|
||||
EnGeldB_SetupSpinDodge(this, globalCtx);
|
||||
} else if (globalCtx->gameplayFrames & 1) {
|
||||
EnGeldB_SetupBlock(this);
|
||||
|
@ -1162,7 +1162,7 @@ void EnGeldB_Block(EnGeldB* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
} else if ((this->timer == 0) &&
|
||||
func_800354B4(globalCtx, &this->actor, 100.0f, 0x2710, 0x4000, this->actor.shape.rot.y)) {
|
||||
if (player->meleeWeaponAnimation == 0x11) {
|
||||
if (player->meleeWeaponAnimation == PLAYER_MWA_JUMPSLASH_START) {
|
||||
EnGeldB_SetupSpinDodge(this, globalCtx);
|
||||
} else if (!EnGeldB_DodgeRanged(globalCtx, this)) {
|
||||
if ((globalCtx->gameplayFrames & 1)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue