1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-12-29 00:06:33 +00:00

Rename event check flags for boss battles (#2376)

This commit is contained in:
Jordan Longstaff 2024-12-16 18:08:25 -05:00 committed by GitHub
parent f88e62bfe1
commit fdcfe49b44
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 41 additions and 41 deletions

View file

@ -548,15 +548,15 @@ typedef enum LinkAge {
#define EVENTCHKINF_6E 0x6E
#define EVENTCHKINF_6F 0x6F
#define EVENTCHKINF_70 0x70
#define EVENTCHKINF_71 0x71
#define EVENTCHKINF_72 0x72
#define EVENTCHKINF_73 0x73
#define EVENTCHKINF_74 0x74
#define EVENTCHKINF_75 0x75
#define EVENTCHKINF_76 0x76
#define EVENTCHKINF_77 0x77
#define EVENTCHKINF_78 0x78
#define EVENTCHKINF_BEGAN_GOHMA_BATTLE 0x70
#define EVENTCHKINF_BEGAN_KING_DODONGO_BATTLE 0x71
#define EVENTCHKINF_BEGAN_PHANTOM_GANON_BATTLE 0x72
#define EVENTCHKINF_BEGAN_VOLVAGIA_BATTLE 0x73
#define EVENTCHKINF_BEGAN_MORPHA_BATTLE 0x74
#define EVENTCHKINF_BEGAN_TWINROVA_BATTLE 0x75
#define EVENTCHKINF_BEGAN_BARINADE_BATTLE 0x76
#define EVENTCHKINF_BEGAN_BONGO_BONGO_BATTLE 0x77
#define EVENTCHKINF_BEGAN_GANONDORF_BATTLE 0x78
#define EVENTCHKINF_80 0x80
#define EVENTCHKINF_82 0x82
#define EVENTCHKINF_PAID_BACK_KEATON_MASK 0x8C

View file

@ -335,7 +335,7 @@ void BossDodongo_IntroCutscene(BossDodongo* this, PlayState* play) {
this->subCamAt.z = player->actor.world.pos.z;
}
if (GET_EVENTCHKINF(EVENTCHKINF_71)) {
if (GET_EVENTCHKINF(EVENTCHKINF_BEGAN_KING_DODONGO_BATTLE)) {
if (this->unk_198 == 100) {
this->actor.world.pos.x = -1114.0f;
this->actor.world.pos.z = -2804.0f;
@ -376,7 +376,7 @@ void BossDodongo_IntroCutscene(BossDodongo* this, PlayState* play) {
case 4:
Math_SmoothStepToF(&this->unk_20C, 0.0f, 1.0f, 0.01f, 0.0f);
if (GET_EVENTCHKINF(EVENTCHKINF_71)) {
if (GET_EVENTCHKINF(EVENTCHKINF_BEGAN_KING_DODONGO_BATTLE)) {
phi_f0 = -50.0f;
} else {
phi_f0 = 0.0f;
@ -404,7 +404,7 @@ void BossDodongo_IntroCutscene(BossDodongo* this, PlayState* play) {
}
if (this->unk_198 == 0x5A) {
if (!GET_EVENTCHKINF(EVENTCHKINF_71)) {
if (!GET_EVENTCHKINF(EVENTCHKINF_BEGAN_KING_DODONGO_BATTLE)) {
TitleCard_InitBossName(play, &play->actorCtx.titleCtx,
SEGMENTED_TO_VIRTUAL(gKingDodongoTitleCardTex), 160, 180, 128, 40);
}
@ -423,7 +423,7 @@ void BossDodongo_IntroCutscene(BossDodongo* this, PlayState* play) {
this->unk_1DA = 50;
this->unk_1BC = 0;
player->actor.shape.rot.y = -0x4002;
SET_EVENTCHKINF(EVENTCHKINF_71);
SET_EVENTCHKINF(EVENTCHKINF_BEGAN_KING_DODONGO_BATTLE);
}
break;
}

View file

@ -339,7 +339,7 @@ void BossFd_Fly(BossFd* this, PlayState* play) {
this->timers[0] = 0;
this->subCamVelFactor = 0.0f;
this->subCamAccel = 0.0f;
if (GET_EVENTCHKINF(EVENTCHKINF_73)) {
if (GET_EVENTCHKINF(EVENTCHKINF_BEGAN_VOLVAGIA_BATTLE)) {
this->introState = BFD_CS_EMERGE;
this->subCamEyeNext.x = player2->actor.world.pos.x + 100.0f + 300.0f - 600.0f;
this->subCamEyeNext.y = player2->actor.world.pos.y + 100.0f - 50.0f;
@ -461,7 +461,7 @@ void BossFd_Fly(BossFd* this, PlayState* play) {
PRINTF("WAY_SPD X = %f\n", this->subCamAtVel.x);
PRINTF("WAY_SPD Y = %f\n", this->subCamAtVel.y);
PRINTF("WAY_SPD Z = %f\n", this->subCamAtVel.z);
if ((this->timers[3] > 190) && !GET_EVENTCHKINF(EVENTCHKINF_73)) {
if ((this->timers[3] > 190) && !GET_EVENTCHKINF(EVENTCHKINF_BEGAN_VOLVAGIA_BATTLE)) {
Audio_PlaySfxGeneral(NA_SE_EN_DODO_K_ROLL - SFX_FLAG, &this->actor.projectedPos, 4,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
@ -488,7 +488,7 @@ void BossFd_Fly(BossFd* this, PlayState* play) {
if (this->timers[3] == 160) {
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_FIRE_BOSS);
}
if ((this->timers[3] == 130) && !GET_EVENTCHKINF(EVENTCHKINF_73)) {
if ((this->timers[3] == 130) && !GET_EVENTCHKINF(EVENTCHKINF_BEGAN_VOLVAGIA_BATTLE)) {
TitleCard_InitBossName(play, &play->actorCtx.titleCtx, SEGMENTED_TO_VIRTUAL(gVolvagiaTitleCardTex),
160, 180, 128, 40);
}
@ -541,7 +541,7 @@ void BossFd_Fly(BossFd* this, PlayState* play) {
Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_7);
this->actionFunc = BossFd_Wait;
this->handoffSignal = FD2_SIGNAL_GROUND;
SET_EVENTCHKINF(EVENTCHKINF_73);
SET_EVENTCHKINF(EVENTCHKINF_BEGAN_VOLVAGIA_BATTLE);
}
break;
}

View file

@ -580,7 +580,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) {
Play_ChangeCameraStatus(play, this->csCamIndex, CAM_STAT_ACTIVE);
this->csCamFov = 60.0f;
if (GET_EVENTCHKINF(EVENTCHKINF_78)) {
if (GET_EVENTCHKINF(EVENTCHKINF_BEGAN_GANONDORF_BATTLE)) {
// watched cutscene already, skip most of it
this->csState = 17;
this->csTimer = 0;
@ -1098,12 +1098,12 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) {
gSegments[6] =
VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[Object_GetSlot(&play->objectCtx, OBJECT_GANON)].segment);
if (!GET_EVENTCHKINF(EVENTCHKINF_78)) {
if (!GET_EVENTCHKINF(EVENTCHKINF_BEGAN_GANONDORF_BATTLE)) {
TitleCard_InitBossName(play, &play->actorCtx.titleCtx, SEGMENTED_TO_VIRTUAL(gGanondorfTitleCardTex),
160, 180, 128, 40);
}
SET_EVENTCHKINF(EVENTCHKINF_78);
SET_EVENTCHKINF(EVENTCHKINF_BEGAN_GANONDORF_BATTLE);
}
if (this->csTimer >= 20) {

View file

@ -684,7 +684,7 @@ void BossGoma_Encounter(BossGoma* this, PlayState* play) {
// entrance of the boss room
if (fabsf(player->actor.world.pos.x - 150.0f) < 60.0f &&
fabsf(player->actor.world.pos.z - 350.0f) < 60.0f) {
if (GET_EVENTCHKINF(EVENTCHKINF_70)) {
if (GET_EVENTCHKINF(EVENTCHKINF_BEGAN_GOHMA_BATTLE)) {
BossGoma_SetupEncounterState4(this, play);
Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_DOOR_SHUTTER, 164.72f, -480.0f,
397.68002f, 0, -0x705C, 0, DOORSHUTTER_PARAMS(SHUTTER_GOHMA_BLOCK, 0));
@ -922,13 +922,13 @@ void BossGoma_Encounter(BossGoma* this, PlayState* play) {
if (Animation_OnFrame(&this->skelanime, 40.0f)) {
Actor_PlaySfx(&this->actor, NA_SE_EN_GOMA_CRY1);
if (!GET_EVENTCHKINF(EVENTCHKINF_70)) {
if (!GET_EVENTCHKINF(EVENTCHKINF_BEGAN_GOHMA_BATTLE)) {
TitleCard_InitBossName(play, &play->actorCtx.titleCtx, SEGMENTED_TO_VIRTUAL(gGohmaTitleCardTex),
160, 180, 128, 40);
}
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_BOSS);
SET_EVENTCHKINF(EVENTCHKINF_70);
SET_EVENTCHKINF(EVENTCHKINF_BEGAN_GOHMA_BATTLE);
}
if (Animation_OnFrame(&this->skelanime, this->currentAnimFrameCount)) {

View file

@ -364,7 +364,7 @@ void BossMo_Init(Actor* thisx, PlayState* play2) {
MO_WATER_LEVEL(play) = -500;
return;
}
if (GET_EVENTCHKINF(EVENTCHKINF_74)) {
if (GET_EVENTCHKINF(EVENTCHKINF_BEGAN_MORPHA_BATTLE)) {
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_BOSS);
this->tentMaxAngle = 5.0f;
this->timers[0] = 50;
@ -1434,7 +1434,7 @@ void BossMo_IntroCs(BossMo* this, PlayState* play) {
if (this->timers[2] == 130) {
TitleCard_InitBossName(play, &play->actorCtx.titleCtx, SEGMENTED_TO_VIRTUAL(gMorphaTitleCardTex), 160,
180, 128, 40);
SET_EVENTCHKINF(EVENTCHKINF_74);
SET_EVENTCHKINF(EVENTCHKINF_BEGAN_MORPHA_BATTLE);
}
break;
case MO_INTRO_FINISH:

View file

@ -383,7 +383,7 @@ void BossSst_HeadSetupIntro(BossSst* this, PlayState* play) {
Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT);
Play_ChangeCameraStatus(play, sSubCamId, CAM_STAT_ACTIVE);
Math_Vec3f_Copy(&sSubCamAt, &player->actor.world.pos);
if (GET_EVENTCHKINF(EVENTCHKINF_77)) {
if (GET_EVENTCHKINF(EVENTCHKINF_BEGAN_BONGO_BONGO_BATTLE)) {
sSubCamEye.z = ROOM_CENTER_Z - 100.0f;
}
@ -419,7 +419,7 @@ void BossSst_HeadIntro(BossSst* this, PlayState* play) {
Play_ChangeCameraStatus(play, sSubCamId, CAM_STAT_WAIT);
Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_ACTIVE);
Play_ClearCamera(play, sSubCamId);
SET_EVENTCHKINF(EVENTCHKINF_77);
SET_EVENTCHKINF(EVENTCHKINF_BEGAN_BONGO_BONGO_BATTLE);
BossSst_HeadSetupNeutral(this);
this->colliderJntSph.base.ocFlags1 |= OC1_ON;
sHands[LEFT]->colliderJntSph.base.ocFlags1 |= OC1_ON;
@ -442,7 +442,7 @@ void BossSst_HeadIntro(BossSst* this, PlayState* play) {
this->ready = true;
Rumble_Request(this->actor.xyzDistToPlayerSq, 255, 20, 150);
Actor_PlaySfx(&sFloor->dyna.actor, NA_SE_EN_SHADEST_TAIKO_HIGH);
} else if (GET_EVENTCHKINF(EVENTCHKINF_77)) {
} else if (GET_EVENTCHKINF(EVENTCHKINF_BEGAN_BONGO_BONGO_BATTLE)) {
//! @bug This condition assumes that the second bounce on the ground will occur before frame 545 on the
//! timer. However, it is possible to delay Player's descent to the ground by, for example, jumpslashing
//! on the last possible frame before the cutscene takes control. This delays Player's fall to the
@ -575,7 +575,7 @@ void BossSst_HeadIntro(BossSst* this, PlayState* play) {
}
if (this->timer <= 198) {
revealStateTimer = 198 - this->timer;
if (GET_EVENTCHKINF(EVENTCHKINF_77) && (revealStateTimer <= 44)) {
if (GET_EVENTCHKINF(EVENTCHKINF_BEGAN_BONGO_BONGO_BATTLE) && (revealStateTimer <= 44)) {
sSubCamAt.x += 492.0f * 0.01f;
sSubCamAt.y += 200.0f * 0.01f;
sSubCamEye.x -= 80.0f * 0.01f;
@ -604,7 +604,7 @@ void BossSst_HeadIntro(BossSst* this, PlayState* play) {
sSubCamEye.y += 125.0f * 0.01f;
sSubCamEye.z -= 350.0f * 0.01f;
} else if (revealStateTimer == 85) {
if (!GET_EVENTCHKINF(EVENTCHKINF_77)) {
if (!GET_EVENTCHKINF(EVENTCHKINF_BEGAN_BONGO_BONGO_BATTLE)) {
TitleCard_InitBossName(play, &play->actorCtx.titleCtx, SEGMENTED_TO_VIRTUAL(gBongoTitleCardTex),
160, 180, 128, 40);
}

View file

@ -515,7 +515,7 @@ void BossTw_Init(Actor* thisx, PlayState* play2) {
this->actor.naviEnemyId = NAVI_ENEMY_TWINROVA_KOTAKE;
SkelAnime_InitFlex(play, &this->skelAnime, &gTwinrovaKotakeSkel, &gTwinrovaKotakeKoumeFlyAnim, NULL, NULL, 0);
if (GET_EVENTCHKINF(EVENTCHKINF_75)) {
if (GET_EVENTCHKINF(EVENTCHKINF_BEGAN_TWINROVA_BATTLE)) {
// began twinrova battle
BossTw_SetupFlyTo(this, play);
this->actor.world.pos.x = -600.0f;
@ -533,7 +533,7 @@ void BossTw_Init(Actor* thisx, PlayState* play2) {
this->actor.naviEnemyId = NAVI_ENEMY_TWINROVA_KOUME;
SkelAnime_InitFlex(play, &this->skelAnime, &gTwinrovaKoumeSkel, &gTwinrovaKotakeKoumeFlyAnim, NULL, NULL, 0);
if (GET_EVENTCHKINF(EVENTCHKINF_75)) {
if (GET_EVENTCHKINF(EVENTCHKINF_BEGAN_TWINROVA_BATTLE)) {
// began twinrova battle
BossTw_SetupFlyTo(this, play);
this->actor.world.pos.x = 600.0f;
@ -555,7 +555,7 @@ void BossTw_Init(Actor* thisx, PlayState* play2) {
SkelAnime_InitFlex(play, &this->skelAnime, &gTwinrovaSkel, &gTwinrovaTPoseAnim, NULL, NULL, 0);
Animation_MorphToLoop(&this->skelAnime, &gTwinrovaTPoseAnim, -3.0f);
if (GET_EVENTCHKINF(EVENTCHKINF_75)) {
if (GET_EVENTCHKINF(EVENTCHKINF_BEGAN_TWINROVA_BATTLE)) {
// began twinrova battle
BossTw_SetupWait(this, play);
} else {
@ -2219,7 +2219,7 @@ void BossTw_TwinrovaIntroCS(BossTw* this, PlayState* play) {
play->envCtx.lightBlend = 0.0f;
TitleCard_InitBossName(play, &play->actorCtx.titleCtx, SEGMENTED_TO_VIRTUAL(gTwinrovaTitleCardTex), 160,
180, 128, 40);
SET_EVENTCHKINF(EVENTCHKINF_75);
SET_EVENTCHKINF(EVENTCHKINF_BEGAN_TWINROVA_BATTLE);
SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0, 0, NA_BGM_BOSS);
}

View file

@ -642,7 +642,7 @@ void BossVa_Init(Actor* thisx, PlayState* play2) {
} else {
this->actor.colChkInfo.damageTable = sDamageTable;
sPhase2Timer = 0xFFFF;
if (GET_EVENTCHKINF(EVENTCHKINF_76)) {
if (GET_EVENTCHKINF(EVENTCHKINF_BEGAN_BARINADE_BATTLE)) {
sCsState = INTRO_CALL_BARI;
sDoorState = 100;
Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_1);
@ -977,7 +977,7 @@ void BossVa_BodyIntro(BossVa* this, PlayState* play) {
sSubCamAtNext.y = 140.0f;
sSubCamAtNext.z = -200.0f;
if (!GET_EVENTCHKINF(EVENTCHKINF_76)) {
if (!GET_EVENTCHKINF(EVENTCHKINF_BEGAN_BARINADE_BATTLE)) {
TitleCard_InitBossName(play, &play->actorCtx.titleCtx, SEGMENTED_TO_VIRTUAL(gBarinadeTitleCardTex),
160, 180, 128, 40);
}
@ -1019,7 +1019,7 @@ void BossVa_BodyIntro(BossVa* this, PlayState* play) {
Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_ACTIVE);
Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_7);
sCsState++;
SET_EVENTCHKINF(EVENTCHKINF_76);
SET_EVENTCHKINF(EVENTCHKINF_BEGAN_BARINADE_BATTLE);
player->actor.shape.rot.y = player->actor.world.rot.y = this->actor.yawTowardsPlayer + 0x8000;
}
break;

View file

@ -879,7 +879,7 @@ void DoorShutter_GohmaBlockFall(DoorShutter* this, PlayState* play) {
Actor_UpdateBgCheckInfo(play, &this->dyna.actor, 0.0f, 0.0f, 0.0f, UPDBGCHECKINFO_FLAG_2);
if (this->dyna.actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
DoorShutter_SetupAction(this, DoorShutter_GohmaBlockBounce);
if (!GET_EVENTCHKINF(EVENTCHKINF_70)) {
if (!GET_EVENTCHKINF(EVENTCHKINF_BEGAN_GOHMA_BATTLE)) {
BossGoma* parent = (BossGoma*)this->dyna.actor.parent;
this->isActive = 10;

View file

@ -128,13 +128,13 @@ void EnfHG_Intro(EnfHG* this, PlayState* play) {
if ((fabsf(player->actor.world.pos.x - (GND_BOSSROOM_CENTER_X + 0.0f)) < 100.0f) &&
(fabsf(player->actor.world.pos.z - (GND_BOSSROOM_CENTER_Z + 315.0f)) < 100.0f)) {
this->cutsceneState = INTRO_START;
if (GET_EVENTCHKINF(EVENTCHKINF_72)) {
if (GET_EVENTCHKINF(EVENTCHKINF_BEGAN_PHANTOM_GANON_BATTLE)) {
this->timers[0] = 57;
}
}
break;
case INTRO_START:
if (GET_EVENTCHKINF(EVENTCHKINF_72)) {
if (GET_EVENTCHKINF(EVENTCHKINF_BEGAN_PHANTOM_GANON_BATTLE)) {
if (this->timers[0] == 55) {
Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_DOOR_SHUTTER,
GND_BOSSROOM_CENTER_X + 0.0f, GND_BOSSROOM_CENTER_Y - 97.0f,
@ -159,7 +159,7 @@ void EnfHG_Intro(EnfHG* this, PlayState* play) {
this->timers[0] = 60;
this->actor.world.pos.y = GND_BOSSROOM_CENTER_Y - 7.0f;
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 1);
SET_EVENTCHKINF(EVENTCHKINF_72);
SET_EVENTCHKINF(EVENTCHKINF_BEGAN_PHANTOM_GANON_BATTLE);
Flags_SetSwitch(play, 0x23);
FALLTHROUGH;
case INTRO_FENCE: