From 1da87b1e7f6ca76bd4860b2f322d644be64a26a7 Mon Sep 17 00:00:00 2001 From: cadmic Date: Mon, 26 Feb 2024 18:55:30 -0800 Subject: [PATCH] Match En actors D-G (#1889) * Match entity actors D-G * Remove SET_EN_GOROIWA_SPEED * Actually match z_en_elf.c * GET_EN_GOROIWA_SPEED -> EN_GOROIWA_SPEED --- src/overlays/actors/ovl_En_Dh/z_en_dh.c | 4 +-- .../ovl_En_Diving_Game/z_en_diving_game.c | 4 ++- src/overlays/actors/ovl_En_Dns/z_en_dns.c | 2 ++ .../actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.c | 19 ++++++---- src/overlays/actors/ovl_En_Du/z_en_du.c | 18 ++++++---- .../actors/ovl_En_Dy_Extra/z_en_dy_extra.c | 2 +- src/overlays/actors/ovl_En_Eg/z_en_eg.c | 3 +- src/overlays/actors/ovl_En_Eiyer/z_en_eiyer.c | 2 +- src/overlays/actors/ovl_En_Elf/z_en_elf.c | 16 ++++++--- .../actors/ovl_En_Encount2/z_en_encount2.c | 2 +- .../actors/ovl_En_Ex_Ruppy/z_en_ex_ruppy.c | 1 + src/overlays/actors/ovl_En_Fd/z_en_fd.c | 13 +++---- .../actors/ovl_En_Firefly/z_en_firefly.c | 2 +- src/overlays/actors/ovl_En_Fish/z_en_fish.c | 6 ++-- src/overlays/actors/ovl_En_Fz/z_en_fz.c | 22 ++++++------ .../ovl_En_Ganon_Mant/z_en_ganon_mant.c | 10 +++--- src/overlays/actors/ovl_En_Gb/z_en_gb.c | 15 ++++---- src/overlays/actors/ovl_En_Ge2/z_en_ge2.c | 7 ++-- src/overlays/actors/ovl_En_GeldB/z_en_geldb.c | 32 ++++++++++------- src/overlays/actors/ovl_En_GirlA/z_en_girla.c | 9 ++--- src/overlays/actors/ovl_En_Goma/z_en_goma.c | 9 ++--- .../actors/ovl_En_Goroiwa/z_en_goroiwa.c | 23 +++++++++--- src/overlays/actors/ovl_En_Gs/z_en_gs.c | 35 ++++++++++++------- tools/disasm/gc-eu-mq/functions.txt | 2 +- 24 files changed, 160 insertions(+), 98 deletions(-) diff --git a/src/overlays/actors/ovl_En_Dh/z_en_dh.c b/src/overlays/actors/ovl_En_Dh/z_en_dh.c index 14c454455f..f5694d2bf0 100644 --- a/src/overlays/actors/ovl_En_Dh/z_en_dh.c +++ b/src/overlays/actors/ovl_En_Dh/z_en_dh.c @@ -296,8 +296,6 @@ void EnDh_SetupAttack(EnDh* this) { } void EnDh_Attack(EnDh* this, PlayState* play) { - s32 pad; - if (SkelAnime_Update(&this->skelAnime)) { this->actionState++; } else if ((this->actor.xzDistToPlayer > 100.0f) || !Actor_IsFacingPlayer(&this->actor, 60 * 0x10000 / 360)) { @@ -336,6 +334,8 @@ void EnDh_Attack(EnDh* this, PlayState* play) { break; case 3: if ((this->actor.xzDistToPlayer <= 100.0f) && (Actor_IsFacingPlayer(&this->actor, 60 * 0x10000 / 360))) { + s32 pad; + Animation_Change(&this->skelAnime, &object_dh_Anim_004658, 1.0f, 20.0f, Animation_GetLastFrame(&object_dh_Anim_004658), ANIMMODE_ONCE, -6.0f); this->actionState = 0; diff --git a/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.c b/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.c index df3e4ceab4..6e33517bf3 100644 --- a/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.c +++ b/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.c @@ -125,6 +125,8 @@ void EnDivingGame_SpawnRuppy(EnDivingGame* this, PlayState* play) { } s32 EnDivingGame_HasMinigameFinished(EnDivingGame* this, PlayState* play) { + s32 rupeesNeeded; + if ((gSaveContext.timerState == TIMER_STATE_STOP) && !Play_InCsMode(play)) { // Failed. gSaveContext.timerState = TIMER_STATE_OFF; @@ -138,7 +140,7 @@ s32 EnDivingGame_HasMinigameFinished(EnDivingGame* this, PlayState* play) { this->actionFunc = func_809EE048; return true; } else { - s32 rupeesNeeded = 5; + rupeesNeeded = 5; if (GET_EVENTCHKINF(EVENTCHKINF_38)) { rupeesNeeded = 10; diff --git a/src/overlays/actors/ovl_En_Dns/z_en_dns.c b/src/overlays/actors/ovl_En_Dns/z_en_dns.c index 233d17d613..4268bc2ba2 100644 --- a/src/overlays/actors/ovl_En_Dns/z_en_dns.c +++ b/src/overlays/actors/ovl_En_Dns/z_en_dns.c @@ -77,6 +77,7 @@ static u16 sStartingTextIds[] = { 0x10A0, 0x10A1, 0x10A2, 0x10CA, 0x10CB, 0x10CC, 0x10CD, 0x10CE, 0x10CF, 0x10DC, 0x10DD, }; +#if OOT_DEBUG static char* sItemDebugTxt[] = { "デクの実売り ", // "Deku Nuts" "デクの棒売り ", // "Deku Sticks" @@ -90,6 +91,7 @@ static char* sItemDebugTxt[] = { "デクの棒持てる数を増やす", // "Deku Stick Upgrade" "デクの実持てる数を増やす", // "Deku Nut Upgrade" }; +#endif static DnsItemEntry sItemDekuNuts = { 20, 5, GI_DEKU_NUTS_5_2, EnDns_CanBuyDekuNuts, EnDns_PayForDekuNuts }; static DnsItemEntry sItemDekuSticks = { 15, 1, GI_DEKU_STICKS_1, EnDns_CanBuyDekuSticks, EnDns_PayPrice }; diff --git a/src/overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.c b/src/overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.c index f1fefedd8b..4de5e81918 100644 --- a/src/overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.c +++ b/src/overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.c @@ -216,16 +216,23 @@ void EnDntNomal_TargetWait(EnDntNomal* this, PlayState* play) { f32 dz; Vec3f scoreAccel = { 0.0f, 0.0f, 0.0f }; Vec3f scoreVel = { 0.0f, 0.0f, 0.0f }; + s32 pad; - this->targetVtx[0].x = this->targetVtx[1].x = this->targetVtx[2].x = this->targetVtx[3].x = targetX; + this->targetVtx[0].x = targetX; + this->targetVtx[0].y = targetY - 24.0f; + this->targetVtx[0].z = targetZ + 24.0f; - this->targetVtx[1].y = this->targetVtx[0].y = targetY - 24.0f; + this->targetVtx[1].x = targetX; + this->targetVtx[1].y = targetY - 24.0f; + this->targetVtx[1].z = targetZ - 24.0f; - this->targetVtx[2].z = this->targetVtx[0].z = targetZ + 24.0f; + this->targetVtx[2].x = targetX; + this->targetVtx[2].y = targetY + 24.0f; + this->targetVtx[2].z = targetZ + 24.0f; - this->targetVtx[3].z = this->targetVtx[1].z = targetZ - 24.0f; - - this->targetVtx[3].y = this->targetVtx[2].y = targetY + 24.0f; + this->targetVtx[3].x = targetX; + this->targetVtx[3].y = targetY + 24.0f; + this->targetVtx[3].z = targetZ - 24.0f; SkelAnime_Update(&this->skelAnime); if ((this->targetQuad.base.acFlags & AC_HIT) || BREG(0)) { diff --git a/src/overlays/actors/ovl_En_Du/z_en_du.c b/src/overlays/actors/ovl_En_Du/z_en_du.c index ea124d0436..56ec047023 100644 --- a/src/overlays/actors/ovl_En_Du/z_en_du.c +++ b/src/overlays/actors/ovl_En_Du/z_en_du.c @@ -362,13 +362,15 @@ void func_809FE4A4(EnDu* this, PlayState* play) { void func_809FE638(EnDu* this, PlayState* play) { Player* player = GET_PLAYER(play); - if (!(player->stateFlags1 & PLAYER_STATE1_29)) { - OnePointCutscene_Init(play, 3330, -99, &this->actor, CAM_ID_MAIN); - player->actor.shape.rot.y = player->actor.world.rot.y = this->actor.world.rot.y + 0x7FFF; - Audio_PlayFanfare(NA_BGM_APPEAR); - EnDu_SetupAction(this, func_809FE6CC); - this->unk_1E2 = 0x32; + if (player->stateFlags1 & PLAYER_STATE1_29) { + return; } + + OnePointCutscene_Init(play, 3330, -99, &this->actor, CAM_ID_MAIN); + player->actor.shape.rot.y = player->actor.world.rot.y = this->actor.world.rot.y + 0x7FFF; + Audio_PlayFanfare(NA_BGM_APPEAR); + EnDu_SetupAction(this, func_809FE6CC); + this->unk_1E2 = 0x32; } void func_809FE6CC(EnDu* this, PlayState* play) { @@ -527,11 +529,13 @@ void func_809FEC14(EnDu* this, PlayState* play) { } void func_809FEC70(EnDu* this, PlayState* play) { + f32 xzRange; + if (Actor_HasParent(&this->actor, play)) { this->actor.parent = NULL; EnDu_SetupAction(this, func_809FECE4); } else { - f32 xzRange = this->actor.xzDistToPlayer + 1.0f; + xzRange = this->actor.xzDistToPlayer + 1.0f; Actor_OfferGetItem(&this->actor, play, GI_GORONS_BRACELET, xzRange, fabsf(this->actor.yDistToPlayer) + 1.0f); } diff --git a/src/overlays/actors/ovl_En_Dy_Extra/z_en_dy_extra.c b/src/overlays/actors/ovl_En_Dy_Extra/z_en_dy_extra.c index 1896074334..0f9fb333e9 100644 --- a/src/overlays/actors/ovl_En_Dy_Extra/z_en_dy_extra.c +++ b/src/overlays/actors/ovl_En_Dy_Extra/z_en_dy_extra.c @@ -93,8 +93,8 @@ void EnDyExtra_Draw(Actor* thisx, PlayState* play) { static u8 D_809FFC50[] = { 0x02, 0x01, 0x01, 0x02, 0x00, 0x00, 0x02, 0x01, 0x00, 0x02, 0x01, 0x00, 0x02, 0x01, 0x00, 0x02, 0x01, 0x00, 0x02, 0x01, 0x00, 0x02, 0x01, 0x00, 0x01, 0x02, 0x00 }; EnDyExtra* this = (EnDyExtra*)thisx; - s32 pad; GraphicsContext* gfxCtx = play->state.gfxCtx; + s32 pad; Vtx* vertices = SEGMENTED_TO_VIRTUAL(gGreatFairySpiralBeamVtx); s32 i; u8 unk[3]; diff --git a/src/overlays/actors/ovl_En_Eg/z_en_eg.c b/src/overlays/actors/ovl_En_Eg/z_en_eg.c index c53100adae..7b3940994d 100644 --- a/src/overlays/actors/ovl_En_Eg/z_en_eg.c +++ b/src/overlays/actors/ovl_En_Eg/z_en_eg.c @@ -48,7 +48,8 @@ void EnEg_Init(Actor* thisx, PlayState* play) { } void func_809FFDC8(EnEg* this, PlayState* play) { - if (!sVoided && (gSaveContext.subTimerSeconds <= 0) && Flags_GetSwitch(play, 0x36) && (kREG(0) == 0)) { + if (!sVoided && (gSaveContext.subTimerSeconds <= 0) && Flags_GetSwitch(play, 0x36) && + (!OOT_DEBUG || kREG(0) == 0)) { // Void the player out Play_TriggerRespawn(play); gSaveContext.respawnFlag = -2; diff --git a/src/overlays/actors/ovl_En_Eiyer/z_en_eiyer.c b/src/overlays/actors/ovl_En_Eiyer/z_en_eiyer.c index 6b4a7a860b..099dc5b29a 100644 --- a/src/overlays/actors/ovl_En_Eiyer/z_en_eiyer.c +++ b/src/overlays/actors/ovl_En_Eiyer/z_en_eiyer.c @@ -304,9 +304,9 @@ void EnEiyer_SetupDie(EnEiyer* this) { } void EnEiyer_SetupDead(EnEiyer* this) { - this->actor.colorFilterParams |= 0x2000; this->actor.speed = 0.0f; this->actor.velocity.y = 0.0f; + this->actor.colorFilterParams |= 0x2000; this->actionFunc = EnEiyer_Dead; } diff --git a/src/overlays/actors/ovl_En_Elf/z_en_elf.c b/src/overlays/actors/ovl_En_Elf/z_en_elf.c index fb9d118719..6de4a0c58b 100644 --- a/src/overlays/actors/ovl_En_Elf/z_en_elf.c +++ b/src/overlays/actors/ovl_En_Elf/z_en_elf.c @@ -808,7 +808,6 @@ void func_80A03AB0(EnElf* this, PlayState* play) { void EnElf_UpdateLights(EnElf* this, PlayState* play) { s16 glowLightRadius; - Player* player; glowLightRadius = 100; @@ -817,7 +816,8 @@ void EnElf_UpdateLights(EnElf* this, PlayState* play) { } if (this->fairyFlags & 0x20) { - player = GET_PLAYER(play); + Player* player = GET_PLAYER(play); + Lights_PointNoGlowSetInfo(&this->lightInfoNoGlow, player->actor.world.pos.x, (s16)(player->actor.world.pos.y) + 60.0f, player->actor.world.pos.z, 255, 255, 255, 200); @@ -1379,9 +1379,15 @@ void func_80A053F0(Actor* thisx, PlayState* play) { if (player->naviTextId == 0) { if (player->unk_664 == NULL) { +#if OOT_DEBUG if (((gSaveContext.save.info.playerData.naviTimer >= 600) && (gSaveContext.save.info.playerData.naviTimer <= 3000)) || - (nREG(89) != 0)) { + (nREG(89) != 0)) +#else + if ((gSaveContext.save.info.playerData.naviTimer >= 600) && + (gSaveContext.save.info.playerData.naviTimer <= 3000)) +#endif + { player->naviTextId = QuestHint_GetNaviTextId(play); if (player->naviTextId == 0x15F) { @@ -1417,6 +1423,7 @@ void func_80A053F0(Actor* thisx, PlayState* play) { this->actionFunc(this, play); thisx->shape.rot.y = this->unk_2BC; +#if OOT_DEBUG // `gSaveContext.save.info.sceneFlags[127].chest` (like in the debug string) instead of `HIGH_SCORE(HS_HBA)` // matches too, but, with how the `SaveContext` struct is currently defined, it is an out-of-bounds read in the // `sceneFlags` array. It is theorized the original `room_inf` (currently `sceneFlags`) was an array of length @@ -1426,6 +1433,7 @@ void func_80A053F0(Actor* thisx, PlayState* play) { if ((nREG(81) != 0) && (HIGH_SCORE(HS_HBA) != 0)) { LOG_NUM("z_common_data.memory.information.room_inf[127][ 0 ]", HIGH_SCORE(HS_HBA), "../z_en_elf.c", 2595); } +#endif if (!Play_InCsMode(play)) { if (gSaveContext.save.info.playerData.naviTimer < 25800) { @@ -1535,7 +1543,7 @@ void EnElf_Draw(Actor* thisx, PlayState* play) { gDPSetRenderMode(dListHead++, G_RM_PASS, G_RM_ZB_CLD_SURF2); } - gSPEndDisplayList(dListHead++); + gSPEndDisplayList(dListHead); gDPSetEnvColor(POLY_XLU_DISP++, (u8)this->outerColor.r, (u8)this->outerColor.g, (u8)this->outerColor.b, (u8)(envAlpha * alphaScale)); POLY_XLU_DISP = SkelAnime_Draw(play, this->skelAnime.skeleton, this->skelAnime.jointTable, diff --git a/src/overlays/actors/ovl_En_Encount2/z_en_encount2.c b/src/overlays/actors/ovl_En_Encount2/z_en_encount2.c index 7efa5a09a6..cab41eec90 100644 --- a/src/overlays/actors/ovl_En_Encount2/z_en_encount2.c +++ b/src/overlays/actors/ovl_En_Encount2/z_en_encount2.c @@ -338,9 +338,9 @@ void EnEncount2_UpdateEffects(EnEncount2* this, PlayState* play) { } void EnEncount2_DrawEffects(Actor* thisx, PlayState* play) { + GraphicsContext* gfxCtx = play->state.gfxCtx; EnEncount2* this = (EnEncount2*)thisx; EnEncount2Effect* effect = this->effects; - GraphicsContext* gfxCtx = play->state.gfxCtx; s16 i; s32 objectSlot; diff --git a/src/overlays/actors/ovl_En_Ex_Ruppy/z_en_ex_ruppy.c b/src/overlays/actors/ovl_En_Ex_Ruppy/z_en_ex_ruppy.c index 3417ca1444..f36ea32563 100644 --- a/src/overlays/actors/ovl_En_Ex_Ruppy/z_en_ex_ruppy.c +++ b/src/overlays/actors/ovl_En_Ex_Ruppy/z_en_ex_ruppy.c @@ -315,6 +315,7 @@ void EnExRuppy_WaitToBlowUp(EnExRuppy* this, PlayState* play) { f32 distToBlowUp = 50.0f; s16 explosionScale; s16 explosionScaleStep; + s32 pad; if (this->type == 2) { distToBlowUp = 30.0f; diff --git a/src/overlays/actors/ovl_En_Fd/z_en_fd.c b/src/overlays/actors/ovl_En_Fd/z_en_fd.c index 2b7f6bedde..886680a57f 100644 --- a/src/overlays/actors/ovl_En_Fd/z_en_fd.c +++ b/src/overlays/actors/ovl_En_Fd/z_en_fd.c @@ -773,11 +773,11 @@ void EnFd_Draw(Actor* thisx, PlayState* play) { if (this->actionFunc != EnFd_Reappear && !(this->fadeAlpha < 0.9f)) { if (1) {} Gfx_SetupDL_25Xlu(play->state.gfxCtx); - clampedHealth = CLAMP(thisx->colChkInfo.health - 1, 0, 23); - gDPSetPrimColor(POLY_XLU_DISP++, 0, 128, primColors[clampedHealth / 8].r, primColors[clampedHealth / 8].g, - primColors[clampedHealth / 8].b, (u8)this->fadeAlpha); - gDPSetEnvColor(POLY_XLU_DISP++, envColors[clampedHealth / 8].r, envColors[clampedHealth / 8].g, - envColors[clampedHealth / 8].b, (u8)this->fadeAlpha); + clampedHealth = CLAMP(thisx->colChkInfo.health - 1, 0, 23) / 8; + gDPSetPrimColor(POLY_XLU_DISP++, 0, 128, primColors[clampedHealth].r, primColors[clampedHealth].g, + primColors[clampedHealth].b, (u8)this->fadeAlpha); + gDPSetEnvColor(POLY_XLU_DISP++, envColors[clampedHealth].r, envColors[clampedHealth].g, + envColors[clampedHealth].b, (u8)this->fadeAlpha); gSPSegment(POLY_XLU_DISP++, 0x8, Gfx_TwoTexScroll(play->state.gfxCtx, G_TX_RENDERTILE, 0, 0, 0x20, 0x40, 1, 0, 0xFF - (u8)(frames * 6), 8, 0x40)); @@ -875,9 +875,10 @@ void EnFd_DrawEffectsFlames(EnFd* this, PlayState* play) { static void* dustTextures[] = { gDust8Tex, gDust7Tex, gDust6Tex, gDust5Tex, gDust4Tex, gDust3Tex, gDust2Tex, gDust1Tex, }; - s32 materialFlag; s16 i; s16 idx; + s16 pad; + s16 materialFlag; EnFdEffect* eff = this->effects; OPEN_DISPS(play->state.gfxCtx, "../z_en_fd.c", 1969); diff --git a/src/overlays/actors/ovl_En_Firefly/z_en_firefly.c b/src/overlays/actors/ovl_En_Firefly/z_en_firefly.c index d48103610b..5fe572eb0b 100644 --- a/src/overlays/actors/ovl_En_Firefly/z_en_firefly.c +++ b/src/overlays/actors/ovl_En_Firefly/z_en_firefly.c @@ -287,8 +287,8 @@ void EnFirefly_SetupDisturbDiveAttack(EnFirefly* this) { this->skelAnime.playSpeed = 3.0f; this->actor.shape.rot.x = 0x1554; this->actor.shape.rot.y = this->actor.yawTowardsPlayer; - this->actor.speed = 3.0f; this->timer = 50; + this->actor.speed = 3.0f; this->actionFunc = EnFirefly_DisturbDiveAttack; } diff --git a/src/overlays/actors/ovl_En_Fish/z_en_fish.c b/src/overlays/actors/ovl_En_Fish/z_en_fish.c index 051e5e1cb8..1ebc39c90a 100644 --- a/src/overlays/actors/ovl_En_Fish/z_en_fish.c +++ b/src/overlays/actors/ovl_En_Fish/z_en_fish.c @@ -472,11 +472,11 @@ void EnFish_Dropped_FlopOnGround(EnFish* this, PlayState* play) { void EnFish_Dropped_SetupSwimAway(EnFish* this) { this->actor.home.pos = this->actor.world.pos; - this->actor.flags |= ACTOR_FLAG_4; - this->timer = 200; this->actor.gravity = 0.0f; this->actor.minVelocityY = 0.0f; this->actor.shape.yOffset = 0.0f; + this->actor.flags |= ACTOR_FLAG_4; + this->timer = 200; EnFish_SetInWaterAnimation(this); this->actionFunc = EnFish_Dropped_SwimAway; this->unk_250 = UPDBGCHECKINFO_FLAG_0 | UPDBGCHECKINFO_FLAG_2; @@ -624,6 +624,8 @@ void EnFish_UpdateCutscene(EnFish* this, PlayState* play) { f32 lerp; s32 bgId; + if (play) {} + if (cue == NULL) { // "Warning : DEMO ended without dousa (action) 3 termination being called" PRINTF("Warning : dousa 3 消滅 が呼ばれずにデモが終了した(%s %d)(arg_data 0x%04x)\n", "../z_en_sakana.c", 1169, diff --git a/src/overlays/actors/ovl_En_Fz/z_en_fz.c b/src/overlays/actors/ovl_En_Fz/z_en_fz.c index 8a67e84b55..64ae25bba1 100644 --- a/src/overlays/actors/ovl_En_Fz/z_en_fz.c +++ b/src/overlays/actors/ovl_En_Fz/z_en_fz.c @@ -256,6 +256,8 @@ void EnFz_Damaged(EnFz* this, PlayState* play, Vec3f* vec, s32 numEffects, f32 u f32 scale; s32 life; + accel.x = accel.z = 0.0f; + accel.y = -1.0f; primColor.r = 155; primColor.g = 255; primColor.b = 255; @@ -263,8 +265,6 @@ void EnFz_Damaged(EnFz* this, PlayState* play, Vec3f* vec, s32 numEffects, f32 u envColor.r = 200; envColor.g = 200; envColor.b = 200; - accel.x = accel.z = 0.0f; - accel.y = -1.0f; for (i = 0; i < numEffects; i++) { scale = Rand_CenteredFloat(0.3f) + 0.6f; @@ -476,10 +476,10 @@ void EnFz_MoveTowardsPlayer(EnFz* this, PlayState* play) { void EnFz_SetupAimForFreeze(EnFz* this) { this->state = 1; - this->timer = 40; - this->actionFunc = EnFz_AimForFreeze; this->speedXZ = 0.0f; this->actor.speed = 0.0f; + this->timer = 40; + this->actionFunc = EnFz_AimForFreeze; } void EnFz_AimForFreeze(EnFz* this, PlayState* play) { @@ -547,16 +547,16 @@ void EnFz_BlowSmoke(EnFz* this, PlayState* play) { void EnFz_SetupDespawn(EnFz* this, PlayState* play) { this->state = 0; + this->speedXZ = 0.0f; + this->actor.gravity = 0.0f; + this->actor.velocity.y = 0.0f; + this->actor.speed = 0.0f; this->updateBgInfo = true; this->isFreezing = false; this->isDespawning = true; this->actor.flags &= ~ACTOR_FLAG_0; this->isActive = false; this->timer = 60; - this->speedXZ = 0.0f; - this->actor.gravity = 0.0f; - this->actor.velocity.y = 0.0f; - this->actor.speed = 0.0f; Actor_ChangeCategory(play, &play->actorCtx, &this->actor, ACTORCAT_PROP); Item_DropCollectibleRandom(play, &this->actor, &this->actor.world.pos, 0x60); this->actionFunc = EnFz_Despawn; @@ -573,9 +573,9 @@ void EnFz_SetupMelt(EnFz* this) { this->isFreezing = false; this->isDespawning = true; this->actor.flags &= ~ACTOR_FLAG_0; - this->actionFunc = EnFz_Melt; this->actor.speed = 0.0f; this->speedXZ = 0.0f; + this->actionFunc = EnFz_Melt; } void EnFz_Melt(EnFz* this, PlayState* play) { @@ -859,10 +859,10 @@ void EnFz_UpdateIceSmoke(EnFz* this, PlayState* play) { } void EnFz_DrawEffects(EnFz* this, PlayState* play) { - EnFzEffect* effect = this->effects; s16 i; GraphicsContext* gfxCtx = play->state.gfxCtx; u8 materialFlag = 0; + EnFzEffect* effect = this->effects; OPEN_DISPS(gfxCtx, "../z_en_fz.c", 1384); @@ -872,7 +872,7 @@ void EnFz_DrawEffects(EnFz* this, PlayState* play) { if (effect->type > 0) { gDPPipeSync(POLY_XLU_DISP++); - if (!materialFlag) { + if (materialFlag == 0) { gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gFreezardSteamStartDL)); materialFlag++; } diff --git a/src/overlays/actors/ovl_En_Ganon_Mant/z_en_ganon_mant.c b/src/overlays/actors/ovl_En_Ganon_Mant/z_en_ganon_mant.c index 0aea936670..2ccb862d62 100644 --- a/src/overlays/actors/ovl_En_Ganon_Mant/z_en_ganon_mant.c +++ b/src/overlays/actors/ovl_En_Ganon_Mant/z_en_ganon_mant.c @@ -391,14 +391,14 @@ void EnGanonMant_Draw(Actor* thisx, PlayState* play) { f32 diffHalfDist; f32 yDiff; f32 yaw; - Vec3f* rightPos; - Vec3f* leftPos; - s16 strandIdx; - Vec3f midpoint; - s16 nextStrandIdx; if (this->updateHasRun) { // Only run this if update has run since last draw + Vec3f* rightPos; + Vec3f* leftPos; + s16 strandIdx; + Vec3f midpoint; + s16 nextStrandIdx; // Choose endpoints if (this->attachRightArmTimer != 0.0f) { diff --git a/src/overlays/actors/ovl_En_Gb/z_en_gb.c b/src/overlays/actors/ovl_En_Gb/z_en_gb.c index 4ee2521ae9..aafcf0d06c 100644 --- a/src/overlays/actors/ovl_En_Gb/z_en_gb.c +++ b/src/overlays/actors/ovl_En_Gb/z_en_gb.c @@ -183,6 +183,8 @@ void EnGb_Init(Actor* thisx, PlayState* play) { this->actionTimer = (s16)Rand_ZeroFloat(100.0f) + 100; for (i = 0; i < ARRAY_COUNT(sCagedSoulPositions); i++) { + s32 pad; + this->cagedSouls[i].infoIdx = (s32)Rand_ZeroFloat(30.0f) % 3; this->cagedSouls[i].unk_14.x = this->cagedSouls[i].translation.x = sCagedSoulPositions[i].x + this->dyna.actor.world.pos.x; @@ -280,6 +282,8 @@ void func_80A2F83C(EnGb* this, PlayState* play) { } } if (Actor_TalkOfferAccepted(&this->dyna.actor, play)) { + s32 pad; + switch (func_8002F368(play)) { case EXCH_ITEM_NONE: func_80A2F180(this); @@ -294,9 +298,7 @@ void func_80A2F83C(EnGb* this, PlayState* play) { this->actionFunc = func_80A2FA50; break; } - return; - } - if (this->dyna.actor.xzDistToPlayer < 100.0f) { + } else if (this->dyna.actor.xzDistToPlayer < 100.0f) { Actor_OfferTalkExchangeEquiCylinder(&this->dyna.actor, play, 100.0f, EXCH_ITEM_BOTTLE_POE); } } @@ -440,7 +442,6 @@ void EnGb_Draw(Actor* thisx, PlayState* play) { void EnGb_UpdateCagedSouls(EnGb* this, PlayState* play) { f32 temp_f20; - s16 rot; s32 i; for (i = 0; i < 4; i++) { @@ -499,12 +500,14 @@ void EnGb_UpdateCagedSouls(EnGb* this, PlayState* play) { this->cagedSouls[i].translation.y = this->cagedSouls[i].unk_14.y + temp_f20; this->cagedSouls[i].translation.z = this->cagedSouls[i].unk_14.z; } else if (i == 1) { - rot = this->dyna.actor.world.rot.y - 0x4000; + s16 rot = this->dyna.actor.world.rot.y - 0x4000; + this->cagedSouls[i].translation.x = this->cagedSouls[i].unk_14.x + Math_SinS(rot) * temp_f20; this->cagedSouls[i].translation.z = this->cagedSouls[i].unk_14.z + Math_CosS(rot) * temp_f20; this->cagedSouls[i].translation.y = this->cagedSouls[i].unk_14.y; } else { - rot = this->dyna.actor.world.rot.y + 0x4000; + s16 rot = this->dyna.actor.world.rot.y + 0x4000; + this->cagedSouls[i].translation.x = this->cagedSouls[i].unk_14.x + Math_SinS(rot) * temp_f20; this->cagedSouls[i].translation.z = this->cagedSouls[i].unk_14.z + Math_CosS(rot) * temp_f20; this->cagedSouls[i].translation.y = this->cagedSouls[i].unk_14.y; diff --git a/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c b/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c index 705faf6041..e1317e5ba9 100644 --- a/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c +++ b/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c @@ -112,8 +112,8 @@ void EnGe2_ChangeAction(EnGe2* this, s32 i) { } void EnGe2_Init(Actor* thisx, PlayState* play) { - s32 pad; EnGe2* this = (EnGe2*)thisx; + s16 params = this->actor.params; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 36.0f); SkelAnime_InitFlex(play, &this->skelAnime, &gGerudoPurpleSkel, NULL, this->jointTable, this->morphTable, 22); @@ -133,7 +133,7 @@ void EnGe2_Init(Actor* thisx, PlayState* play) { this->actor.world.rot.z = 0; this->actor.shape.rot.z = 0; - switch (this->actor.params & 0xFF) { + switch (thisx->params & 0xFF) { case GE2_TYPE_PATROLLING: EnGe2_ChangeAction(this, GE2_ACTION_WALK); if (EnGe2_CheckCarpentersFreed()) { @@ -156,6 +156,7 @@ void EnGe2_Init(Actor* thisx, PlayState* play) { break; default: ASSERT(0, "0", "../z_en_ge2.c", 418); + break; } this->stateFlags = 0; @@ -165,7 +166,7 @@ void EnGe2_Init(Actor* thisx, PlayState* play) { this->actor.minVelocityY = -4.0f; this->actor.gravity = -1.0f; this->walkDirection = this->actor.world.rot.y; - this->walkDuration = ((this->actor.params & 0xFF00) >> 8) * 10; + this->walkDuration = ((thisx->params & 0xFF00) >> 8) * 10; } void EnGe2_Destroy(Actor* thisx, PlayState* play) { diff --git a/src/overlays/actors/ovl_En_GeldB/z_en_geldb.c b/src/overlays/actors/ovl_En_GeldB/z_en_geldb.c index ea9772ca03..ba58e9dbdd 100644 --- a/src/overlays/actors/ovl_En_GeldB/z_en_geldb.c +++ b/src/overlays/actors/ovl_En_GeldB/z_en_geldb.c @@ -274,7 +274,6 @@ s32 EnGeldB_ReactToPlayer(PlayState* play, EnGeldB* this, s16 arg2) { Actor* thisx = &this->actor; s16 angleToWall; s16 angleToLink; - Actor* bomb; angleToWall = thisx->wallYaw - thisx->shape.rot.y; angleToWall = ABS(angleToWall); @@ -306,22 +305,29 @@ s32 EnGeldB_ReactToPlayer(PlayState* play, EnGeldB* this, s16 arg2) { EnGeldB_SetupRollBack(this); return true; } - } else if ((bomb = Actor_FindNearby(play, thisx, -1, ACTORCAT_EXPLOSIVE, 80.0f)) != NULL) { - thisx->shape.rot.y = thisx->world.rot.y = thisx->yawTowardsPlayer; - if (((thisx->bgCheckFlags & BGCHECKFLAG_WALL) && (angleToWall < 0x2EE0)) || (bomb->id == ACTOR_EN_BOM_CHU)) { - if ((bomb->id == ACTOR_EN_BOM_CHU) && (Actor_WorldDistXYZToActor(thisx, bomb) < 80.0f) && - ((s16)(thisx->shape.rot.y - (bomb->world.rot.y - 0x8000)) < 0x3E80)) { - EnGeldB_SetupJump(this); - return true; + } else { + Actor* bomb = Actor_FindNearby(play, thisx, -1, ACTORCAT_EXPLOSIVE, 80.0f); + + if (bomb != NULL) { + thisx->shape.rot.y = thisx->world.rot.y = thisx->yawTowardsPlayer; + if (((thisx->bgCheckFlags & BGCHECKFLAG_WALL) && (angleToWall < 0x2EE0)) || + (bomb->id == ACTOR_EN_BOM_CHU)) { + if ((bomb->id == ACTOR_EN_BOM_CHU) && (Actor_WorldDistXYZToActor(thisx, bomb) < 80.0f) && + ((s16)(thisx->shape.rot.y - (bomb->world.rot.y - 0x8000)) < 0x3E80)) { + EnGeldB_SetupJump(this); + return true; + } else { + EnGeldB_SetupSidestep(this, play); + return true; + } } else { - EnGeldB_SetupSidestep(this, play); + EnGeldB_SetupRollBack(this); return true; } - } else { - EnGeldB_SetupRollBack(this); - return true; } - } else if (arg2) { + } + + if (arg2) { if (angleToLink >= 0x1B58) { EnGeldB_SetupSidestep(this, play); return true; diff --git a/src/overlays/actors/ovl_En_GirlA/z_en_girla.c b/src/overlays/actors/ovl_En_GirlA/z_en_girla.c index e05caa58fa..0f6569d869 100644 --- a/src/overlays/actors/ovl_En_GirlA/z_en_girla.c +++ b/src/overlays/actors/ovl_En_GirlA/z_en_girla.c @@ -79,6 +79,7 @@ ActorInit En_GirlA_InitVars = { /**/ NULL, }; +#if OOT_DEBUG static char* sShopItemDescriptions[] = { "デクの実×5 ", // "Deku nut x5" "矢×30 ", // "Arrow x30" @@ -131,6 +132,7 @@ static char* sShopItemDescriptions[] = { "赤クスリ ", // "Red medicine" "赤クスリ " // "Red medicine" }; +#endif static s16 sMaskShopItems[8] = { ITEM_MASK_KEATON, ITEM_MASK_SPOOKY, ITEM_MASK_SKULL, ITEM_MASK_BUNNY_HOOD, @@ -895,12 +897,11 @@ void EnGirlA_Noop(EnGirlA* this, PlayState* play) { void EnGirlA_SetItemDescription(PlayState* play, EnGirlA* this) { ShopItemEntry* tmp = &shopItemEntries[this->actor.params]; s32 params = this->actor.params; - s32 maskId; - s32 isMaskFreeToBorrow; if ((this->actor.params >= SI_KEATON_MASK) && (this->actor.params <= SI_MASK_OF_TRUTH)) { - maskId = this->actor.params - SI_KEATON_MASK; - isMaskFreeToBorrow = false; + s32 maskId = this->actor.params - SI_KEATON_MASK; + s32 isMaskFreeToBorrow = false; + switch (this->actor.params) { case SI_KEATON_MASK: if (GET_ITEMGETINF(ITEMGETINF_38)) { diff --git a/src/overlays/actors/ovl_En_Goma/z_en_goma.c b/src/overlays/actors/ovl_En_Goma/z_en_goma.c index a281827ae4..14a22e3408 100644 --- a/src/overlays/actors/ovl_En_Goma/z_en_goma.c +++ b/src/overlays/actors/ovl_En_Goma/z_en_goma.c @@ -397,13 +397,13 @@ void EnGoma_SetupDead(EnGoma* this) { } void EnGoma_Dead(EnGoma* this, PlayState* play) { - Vec3f accel; - Vec3f pos; - SkelAnime_Update(&this->skelanime); Math_ApproachZeroF(&this->actor.speed, 1.0f, 2.0f); if (this->actionTimer == 2) { + Vec3f accel; + Vec3f pos; + pos.x = this->actor.world.pos.x; pos.y = (this->actor.world.pos.y + 5.0f) - 10.0f; pos.z = this->actor.world.pos.z; @@ -604,7 +604,6 @@ void EnGoma_LookAtPlayer(EnGoma* this, PlayState* play) { } void EnGoma_UpdateHit(EnGoma* this, PlayState* play) { - static Vec3f sShieldKnockbackVel = { 0.0f, 0.0f, 20.0f }; Player* player = GET_PLAYER(play); if (this->hurtTimer != 0) { @@ -632,6 +631,8 @@ void EnGoma_UpdateHit(EnGoma* this, PlayState* play) { this->actor.velocity.y = 0.0f; this->actor.speed = -5.0f; } else { + static Vec3f sShieldKnockbackVel = { 0.0f, 0.0f, 20.0f }; + Matrix_RotateY(BINANG_TO_RAD_ALT(player->actor.shape.rot.y), MTXMODE_NEW); Matrix_MultVec3f(&sShieldKnockbackVel, &this->shieldKnockbackVel); this->invincibilityTimer = 5; diff --git a/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c b/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c index 7742d2f572..59068e93d6 100644 --- a/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c +++ b/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c @@ -84,7 +84,13 @@ static ColliderJntSphInit sJntSphInit = { static CollisionCheckInfoInit sColChkInfoInit = { 0, 12, 60, MASS_HEAVY }; -static f32 sUnused[] = { 10.0f, 9.2f }; +static f32 sSpeeds[] = { 10.0f, 9.2f }; + +#if OOT_DEBUG +#define EN_GOROIWA_SPEED(this) (R_EN_GOROIWA_SPEED * 0.01f) +#else +#define EN_GOROIWA_SPEED(this) sSpeeds[(this)->isInKokiri] +#endif void EnGoroiwa_UpdateCollider(EnGoroiwa* this) { static f32 yOffsets[] = { 0.0f, 59.5f }; @@ -129,10 +135,14 @@ s32 EnGoroiwa_Vec3fNormalize(Vec3f* ret, Vec3f* a) { void EnGoroiwa_SetSpeed(EnGoroiwa* this, PlayState* play) { if (play->sceneId == SCENE_KOKIRI_FOREST) { this->isInKokiri = true; +#if OOT_DEBUG R_EN_GOROIWA_SPEED = 920; +#endif } else { this->isInKokiri = false; +#if OOT_DEBUG R_EN_GOROIWA_SPEED = 1000; +#endif } } @@ -242,11 +252,13 @@ s32 EnGoroiwa_GetAscendDirection(EnGoroiwa* this, PlayState* play) { Vec3s* currentPointPos = (Vec3s*)SEGMENTED_TO_VIRTUAL(path->points) + this->currentWaypoint; if (nextPointPos->x == currentPointPos->x && nextPointPos->z == currentPointPos->z) { +#if OOT_DEBUG if (nextPointPos->y == currentPointPos->y) { // "Error: Invalid path data (points overlap)" PRINTF("Error : レールデータ不正(点が重なっている)"); PRINTF("(%s %d)(arg_data 0x%04x)\n", "../z_en_gr.c", 559, this->actor.params); } +#endif if (nextPointPos->y > currentPointPos->y) { return 1; @@ -299,7 +311,7 @@ s32 EnGoroiwa_MoveAndFall(EnGoroiwa* this, PlayState* play) { s32 pad; Vec3s* nextPointPos; - Math_StepToF(&this->actor.speed, R_EN_GOROIWA_SPEED * 0.01f, 0.3f); + Math_StepToF(&this->actor.speed, EN_GOROIWA_SPEED(this), 0.3f); Actor_UpdateVelocityXZGravity(&this->actor); path = &play->pathList[this->actor.params & 0xFF]; nextPointPos = (Vec3s*)SEGMENTED_TO_VIRTUAL(path->points) + this->nextWaypoint; @@ -322,7 +334,7 @@ s32 EnGoroiwa_Move(EnGoroiwa* this, PlayState* play) { nextPointPosF.x = nextPointPos->x; nextPointPosF.y = nextPointPos->y; nextPointPosF.z = nextPointPos->z; - Math_StepToF(&this->actor.speed, R_EN_GOROIWA_SPEED * 0.01f, 0.3f); + Math_StepToF(&this->actor.speed, EN_GOROIWA_SPEED(this), 0.3f); if (Math3D_Vec3fDistSq(&nextPointPosF, &this->actor.world.pos) < SQ(5.0f)) { Math_Vec3f_Diff(&nextPointPosF, &this->actor.world.pos, &posDiff); } else { @@ -346,7 +358,7 @@ s32 EnGoroiwa_MoveUpToNextWaypoint(EnGoroiwa* this, PlayState* play) { Path* path = &play->pathList[this->actor.params & 0xFF]; Vec3s* nextPointPos = (Vec3s*)SEGMENTED_TO_VIRTUAL(path->points) + this->nextWaypoint; - Math_StepToF(&this->actor.velocity.y, (R_EN_GOROIWA_SPEED * 0.01f) * 0.5f, 0.18f); + Math_StepToF(&this->actor.velocity.y, EN_GOROIWA_SPEED(this) * 0.5f, 0.18f); this->actor.world.pos.x = nextPointPos->x; this->actor.world.pos.z = nextPointPos->z; return Math_StepToF(&this->actor.world.pos.y, nextPointPos->y, fabsf(this->actor.velocity.y)); @@ -435,7 +447,6 @@ void EnGoroiwa_UpdateRotation(EnGoroiwa* this, PlayState* play) { Vec3f rollAxis; Vec3f unitRollAxis; MtxF mtx; - Vec3f unusedDiff; if (this->stateFlags & ENGOROIWA_RETAIN_ROT_SPEED) { rollAngleDiff = this->prevRollAngleDiff; @@ -446,6 +457,8 @@ void EnGoroiwa_UpdateRotation(EnGoroiwa* this, PlayState* play) { rollAngleDiff *= this->rollRotSpeed; rollAxisPtr = &rollAxis; if (this->stateFlags & ENGOROIWA_RETAIN_ROT_SPEED) { + Vec3f unusedDiff; + /* * EnGoroiwa_GetPrevWaypointDiff has no side effects and its result goes unused, * its result was probably meant to be used instead of the actor's velocity in the diff --git a/src/overlays/actors/ovl_En_Gs/z_en_gs.c b/src/overlays/actors/ovl_En_Gs/z_en_gs.c index 2563fd6bac..3964881ebe 100644 --- a/src/overlays/actors/ovl_En_Gs/z_en_gs.c +++ b/src/overlays/actors/ovl_En_Gs/z_en_gs.c @@ -139,9 +139,15 @@ s32 func_80A4E3EC(EnGs* this, PlayState* play) { void func_80A4E470(EnGs* this, PlayState* play) { Player* player = GET_PLAYER(play); +#if OOT_DEBUG bREG(15) = 0; +#endif + if (this->actor.xzDistToPlayer <= 100.0f) { +#if OOT_DEBUG bREG(15) = 1; +#endif + if (this->unk_19D == 0) { player->stateFlags2 |= PLAYER_STATE2_23; if (player->stateFlags2 & PLAYER_STATE2_24) { @@ -285,19 +291,6 @@ void func_80A4EB3C(EnGs* this, PlayState* play) { } void func_80A4ED34(EnGs* this, PlayState* play) { - static Color_RGBA8 flashRed = { 255, 50, 50, 0 }; - static Color_RGBA8 flashBlue = { 50, 50, 255, 0 }; - static Color_RGBA8 baseWhite = { 255, 255, 255, 0 }; - static Vec3f dustAccel = { 0.0f, -0.3f, 0.0f }; - static Color_RGBA8 dustPrim = { 200, 200, 200, 128 }; - static Color_RGBA8 dustEnv = { 100, 100, 100, 0 }; - static Vec3f bomb2Velocity = { 0.0f, 0.0f, 0.0f }; - static Vec3f bomb2Accel = { 0.0f, 0.0f, 0.0f }; - u8 i; - Vec3f dustPos; - Vec3f dustVelocity; - Vec3f bomb2Pos; - if (this->unk_19F == 0) { this->unk_200 = 40; this->unk_19F++; @@ -312,6 +305,10 @@ void func_80A4ED34(EnGs* this, PlayState* play) { } if (this->unk_19F == 2) { + static Color_RGBA8 flashRed = { 255, 50, 50, 0 }; + static Color_RGBA8 flashBlue = { 50, 50, 255, 0 }; + static Color_RGBA8 baseWhite = { 255, 255, 255, 0 }; + this->unk_200--; Color_RGBA8_Copy(&this->flashColor, &baseWhite); if ((this->unk_200 < 80) && ((this->unk_200 % 20) < 8)) { @@ -337,7 +334,15 @@ void func_80A4ED34(EnGs* this, PlayState* play) { } if (this->unk_19F == 3) { + u8 i; + for (i = 0; i < 3; i++) { + static Vec3f dustAccel = { 0.0f, -0.3f, 0.0f }; + static Color_RGBA8 dustPrim = { 200, 200, 200, 128 }; + static Color_RGBA8 dustEnv = { 100, 100, 100, 0 }; + Vec3f dustPos; + Vec3f dustVelocity; + dustVelocity.x = Rand_CenteredFloat(15.0f); dustVelocity.y = Rand_ZeroFloat(-1.0f); dustVelocity.z = Rand_CenteredFloat(15.0f); @@ -362,6 +367,10 @@ void func_80A4ED34(EnGs* this, PlayState* play) { if (this->unk_19F == 4) { Actor_UpdateBgCheckInfo(play, &this->actor, 20.0f, 20.0f, 60.0f, UPDBGCHECKINFO_FLAG_0 | UPDBGCHECKINFO_FLAG_1); if (this->actor.bgCheckFlags & (BGCHECKFLAG_WALL | BGCHECKFLAG_CEILING)) { + static Vec3f bomb2Velocity = { 0.0f, 0.0f, 0.0f }; + static Vec3f bomb2Accel = { 0.0f, 0.0f, 0.0f }; + Vec3f bomb2Pos; + bomb2Pos.x = this->actor.world.pos.x; bomb2Pos.y = this->actor.world.pos.y; bomb2Pos.z = this->actor.world.pos.z; diff --git a/tools/disasm/gc-eu-mq/functions.txt b/tools/disasm/gc-eu-mq/functions.txt index 9fc04e5137..7b75f6ab7c 100644 --- a/tools/disasm/gc-eu-mq/functions.txt +++ b/tools/disasm/gc-eu-mq/functions.txt @@ -7505,7 +7505,7 @@ EnDaikuKakariko_PostLimbDraw = 0x809D0D30; // type:func EnDaikuKakariko_Draw = 0x809D0DAC; // type:func EnDekubaba_Init = 0x809D1180; // type:func EnDekubaba_Destroy = 0x809D13C4; // type:func -EnDekubaba_DisableHitboxes = 0x809D13F0; // type:func +EnDekubaba_DisableACColliderElems = 0x809D13F0; // type:func EnDekubaba_SetupWait = 0x809D1478; // type:func EnDekubaba_SetupGrow = 0x809D16E0; // type:func EnDekubaba_SetupRetract = 0x809D1810; // type:func