1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-21 06:21:16 +00:00

EnZf OK and partially documented (#988)

* Match Destroy

* Matched Init

* 3 more matched

* 15 functions matched, data imported

* 16 matched

* 17 matched

* 18 matched

* formatting

* 19 matched

* Fix unk_404

* Draw matched, 20 in total

* 21 matched

* 22 matched

* 23 matched

* 24 matched

* 25 matched

* 26 matched

* 27 matched

* 28 matched

* 29 matched

* 30 matched

* 31 matched

* 33 matched

* 34 matched

* 35 matched

* 36 matched

* 17 left

* 16 left

* 15 left

* 14 left

* 13 left

* 12 left

* 11 left

* 10 left

* spec

* bss

* 9 left

* 8 left

* 7 left

* 6 left

* 5 left

* 4 left

* 1 up to regalloc, 3 left

* 2 left (+ 1 regalloc)

* More naming

* 1 + regalloc left

* Some naming

* matches but for 2 words of stack in func_80B45748

* Delete some padding in header

* Merge remote-tracking branch 'upstream/master' into Zf

* func_8003426C rename

* more failed matching attempts

* Update to new function names

* OK at last

* Actually OK this time, removed pragmas, spec

* Begin documentation

* Few more names

* Some more naming, added description to z_en_geldb.c

* Confirm platform categories

* (Badly) named floor check functions

* Make fighter actors playSpeed animation frame checks consistent (up to names)

* Action enum, lot of work on the skeleton stuff in the object

* Lot of function and animation naming

* More naming, last of the hardcoded symbols

* Some name cleanup

* Remove asm

* Format

* Bit more cleanup

* Dragorn review I

* undefined syms

* Correct limb names

* Non-control flow review suggestions

* Easy review stuff

* Some more review
This commit is contained in:
EllipticEllipsis 2021-11-06 03:47:04 +00:00 committed by GitHub
parent aa7ff4e795
commit 823a3c0754
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
67 changed files with 2603 additions and 7372 deletions

View file

@ -1,3 +1,9 @@
/*
* File: z_en_geldb.c
* Overlay: ovl_En_GeldB
* Description: Gerudo fighter
*/
#include "z_en_geldb.h"
#include "objects/object_geldb/object_geldb.h"
@ -478,12 +484,9 @@ void EnGeldB_SetupAdvance(EnGeldB* this, GlobalContext* globalCtx) {
void EnGeldB_Advance(EnGeldB* this, GlobalContext* globalCtx) {
s32 thisKeyFrame;
s32 prevKeyFrame;
s32 pad3C;
s32 playSpeed;
s16 facingAngletoLink;
Player* player = GET_PLAYER(globalCtx);
s32 pad30;
s32 pad2C;
f32 playSpeed;
if (!EnGeldB_DodgeRanged(globalCtx, this)) {
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 1, 0x2EE, 0);
@ -507,9 +510,8 @@ void EnGeldB_Advance(EnGeldB* this, GlobalContext* globalCtx) {
}
thisKeyFrame = (s32)this->skelAnime.curFrame;
SkelAnime_Update(&this->skelAnime);
playSpeed = ABS(this->skelAnime.playSpeed);
prevKeyFrame = (s32)(this->skelAnime.curFrame - playSpeed);
playSpeed = ABS(this->skelAnime.playSpeed); // yes it does this twice.
prevKeyFrame = this->skelAnime.curFrame - ABS(this->skelAnime.playSpeed);
playSpeed = (f32)ABS(this->skelAnime.playSpeed);
if (!Actor_IsFacingPlayer(&this->actor, 0x11C7)) {
if (Rand_ZeroOne() > 0.5f) {
EnGeldB_SetupCircle(this);
@ -543,10 +545,12 @@ void EnGeldB_Advance(EnGeldB* this, GlobalContext* globalCtx) {
if ((globalCtx->gameplayFrames & 0x5F) == 0) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_GERUDOFT_BREATH);
}
if ((thisKeyFrame != (s32)this->skelAnime.curFrame) &&
((prevKeyFrame < 0 && (s32)playSpeed + thisKeyFrame > 0) ||
(prevKeyFrame < 4 && (s32)playSpeed + thisKeyFrame > 4))) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_MUSI_LAND);
if (thisKeyFrame != (s32)this->skelAnime.curFrame) {
s32 temp = playSpeed + thisKeyFrame;
if (((prevKeyFrame < 0) && (temp > 0)) || ((prevKeyFrame < 4) && (temp > 4))) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_MUSI_LAND);
}
}
}
}