1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-20 22:11: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:
Dragorn421 2022-03-09 18:52:28 +01:00 committed by GitHub
parent 5cadc5df8a
commit c55a8530ee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 174 additions and 111 deletions

View file

@ -479,8 +479,10 @@ void func_80AFD968(EnSkb* this, GlobalContext* globalCtx) {
if (this->unk_283 == 0) {
if ((this->actor.colChkInfo.damageEffect == 0xD) ||
((this->actor.colChkInfo.damageEffect == 0xE) &&
((player->meleeWeaponAnimation >= 4 && player->meleeWeaponAnimation <= 11) ||
(player->meleeWeaponAnimation == 20 || player->meleeWeaponAnimation == 21)))) {
((player->meleeWeaponAnimation >= PLAYER_MWA_RIGHT_SLASH_1H &&
player->meleeWeaponAnimation <= PLAYER_MWA_LEFT_COMBO_2H) ||
(player->meleeWeaponAnimation == PLAYER_MWA_BACKSLASH_RIGHT ||
player->meleeWeaponAnimation == PLAYER_MWA_BACKSLASH_LEFT)))) {
BodyBreak_Alloc(&this->bodyBreak, 2, globalCtx);
this->unk_283 = 1;
}