mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-21 06:21:16 +00:00
Big cleanup (#775)
* Adult and child2 macros OK * ICHAIN cleanup * almost all overlay data * format.sh * func_8002FBAC NON_EQUIVALENT * PR fixes (MZXrules) * fix * change //@ bug to //! @bug * merge master and missed a //@bug * fix ruto * some more cleanup (#2) * more `! @bug` formatting cleanup * parenthesis cleanup * hex naviEnemyId * run formatter * replace `IS_NOT_` macros with `!IS_` * run formatter * run formatter * PR fixes (fig) * Missed something Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
This commit is contained in:
parent
17c79a8f60
commit
556cdad7eb
177 changed files with 902 additions and 862 deletions
|
@ -100,7 +100,7 @@ typedef struct {
|
|||
f32 yDist;
|
||||
} LogSpotToFromWater;
|
||||
|
||||
EnFrPointers sEnFrPointers = {
|
||||
static EnFrPointers sEnFrPointers = {
|
||||
0x00,
|
||||
{
|
||||
NULL,
|
||||
|
@ -112,12 +112,12 @@ EnFrPointers sEnFrPointers = {
|
|||
};
|
||||
|
||||
// Flags for gSaveContext.eventChkInf[13]
|
||||
u16 sSongIndex[] = {
|
||||
static u16 sSongIndex[] = {
|
||||
0x0002, 0x0004, 0x0010, 0x0008, 0x0020, 0x0040, 0x0001, 0x0000,
|
||||
};
|
||||
|
||||
// Frog to Index for Song Flag (sSongIndex) Mapping
|
||||
u8 sFrogToSongIndex[] = {
|
||||
static u8 sFrogToSongIndex[] = {
|
||||
FROG_SARIA, FROG_SUNS, FROG_SOT, FROG_ZL, FROG_EPONA,
|
||||
};
|
||||
|
||||
|
@ -397,7 +397,8 @@ void EnFr_DecrementBlinkTimerUpdate(EnFr* this) {
|
|||
|
||||
void EnFr_SetupJumpingOutOfWater(EnFr* this, GlobalContext* globalCtx) {
|
||||
if (sEnFrPointers.flags == sTimerJumpingOutOfWater[this->actor.params - 1]) {
|
||||
Animation_Change(&this->skelAnime, &D_060007BC, 1.0f, 0.0f, Animation_GetLastFrame(&D_060007BC), 2, 0.0f);
|
||||
Animation_Change(&this->skelAnime, &D_060007BC, 1.0f, 0.0f, Animation_GetLastFrame(&D_060007BC), ANIMMODE_ONCE,
|
||||
0.0f);
|
||||
EnFr_DrawActive(this);
|
||||
this->actionFunc = EnFr_JumpingOutOfWater;
|
||||
}
|
||||
|
@ -445,17 +446,20 @@ void EnFr_OrientOnLogSpot(EnFr* this, GlobalContext* globalCtx) {
|
|||
if ((rotYRemaining == 0) && (this->skelAnime.curFrame == this->skelAnime.endFrame)) {
|
||||
sEnFrPointers.flags++;
|
||||
this->actionFunc = EnFr_ChooseJumpFromLogSpot;
|
||||
Animation_Change(&this->skelAnime, &D_06001534, 1.0f, 0.0f, Animation_GetLastFrame(&D_06001534), 0, 0.0f);
|
||||
Animation_Change(&this->skelAnime, &D_06001534, 1.0f, 0.0f, Animation_GetLastFrame(&D_06001534), ANIMMODE_LOOP,
|
||||
0.0f);
|
||||
}
|
||||
}
|
||||
|
||||
void EnFr_ChooseJumpFromLogSpot(EnFr* this, GlobalContext* globalCtx) {
|
||||
if (sEnFrPointers.flags == 12) {
|
||||
this->actor.world.rot.y = ((f32)0x8000 / M_PI) * sLogSpotToFromWater[this->actor.params].yaw;
|
||||
Animation_Change(&this->skelAnime, &D_060007BC, 1.0f, 0.0f, Animation_GetLastFrame(&D_060007BC), 2, 0.0f);
|
||||
Animation_Change(&this->skelAnime, &D_060007BC, 1.0f, 0.0f, Animation_GetLastFrame(&D_060007BC), ANIMMODE_ONCE,
|
||||
0.0f);
|
||||
this->actionFunc = EnFr_JumpingBackIntoWater;
|
||||
} else if (this->isJumpingUp) {
|
||||
Animation_Change(&this->skelAnime, &D_060007BC, 1.0f, 0.0f, Animation_GetLastFrame(&D_060007BC), 2, 0.0f);
|
||||
Animation_Change(&this->skelAnime, &D_060007BC, 1.0f, 0.0f, Animation_GetLastFrame(&D_060007BC), ANIMMODE_ONCE,
|
||||
0.0f);
|
||||
this->actionFunc = EnFr_JumpingUp;
|
||||
}
|
||||
}
|
||||
|
@ -477,7 +481,8 @@ void EnFr_JumpingUp(EnFr* this, GlobalContext* globalCtx) {
|
|||
if (EnFr_IsBelowLogSpot(this, &yDistToLogSpot)) {
|
||||
this->isJumpingUp = false;
|
||||
this->actor.gravity = 0.0f;
|
||||
Animation_Change(&this->skelAnime, &D_060011C0, 1.0f, 0.0f, Animation_GetLastFrame(&D_060011C0), 0, 0.0f);
|
||||
Animation_Change(&this->skelAnime, &D_060011C0, 1.0f, 0.0f, Animation_GetLastFrame(&D_060011C0), ANIMMODE_LOOP,
|
||||
0.0f);
|
||||
this->actionFunc = EnFr_ChooseJumpFromLogSpot;
|
||||
} else if ((this->actor.velocity.y <= 0.0f) && (yDistToLogSpot < 40.0f)) {
|
||||
this->skelAnime.playSpeed = 1.0f;
|
||||
|
@ -498,7 +503,8 @@ void EnFr_JumpingBackIntoWater(EnFr* this, GlobalContext* globalCtx) {
|
|||
|
||||
// Final Spot Reached
|
||||
if ((this->actor.velocity.y < 0.0f) && (this->actor.world.pos.y < yUnderwater)) {
|
||||
Animation_Change(&this->skelAnime, &D_06001534, 1.0f, 0.0f, Animation_GetLastFrame(&D_06001534), 0, 0.0f);
|
||||
Animation_Change(&this->skelAnime, &D_06001534, 1.0f, 0.0f, Animation_GetLastFrame(&D_06001534), ANIMMODE_LOOP,
|
||||
0.0f);
|
||||
this->actionFunc = EnFr_SetupJumpingOutOfWater;
|
||||
EnFr_DrawIdle(this);
|
||||
this->isDeactivating = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue