From eebc78d39924c58c65407b626c70bde2f78bc4d5 Mon Sep 17 00:00:00 2001 From: Caladius Date: Sat, 2 Mar 2024 18:01:14 -0500 Subject: [PATCH] Updated Boss Kills to Enums instead of numbers, fixed some Tinting weirdness --- .../Enhancements/timesplits/TimeSplits.cpp | 22 ++++++++++--------- soh/soh/Enhancements/timesplits/TimeSplits.h | 16 +++++++++++++- .../actors/ovl_Boss_Dodongo/z_boss_dodongo.c | 2 +- .../overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c | 2 +- .../actors/ovl_Boss_Ganon/z_boss_ganon.c | 2 +- .../actors/ovl_Boss_Ganon2/z_boss_ganon2.c | 2 +- .../ovl_Boss_Ganondrof/z_boss_ganondrof.c | 2 +- .../actors/ovl_Boss_Goma/z_boss_goma.c | 2 +- .../overlays/actors/ovl_Boss_Mo/z_boss_mo.c | 2 +- .../overlays/actors/ovl_Boss_Sst/z_boss_sst.c | 2 +- .../overlays/actors/ovl_Boss_Tw/z_boss_tw.c | 2 +- .../overlays/actors/ovl_Boss_Va/z_boss_va.c | 2 +- 12 files changed, 37 insertions(+), 21 deletions(-) diff --git a/soh/soh/Enhancements/timesplits/TimeSplits.cpp b/soh/soh/Enhancements/timesplits/TimeSplits.cpp index f015f05e3..cdd4ad21e 100644 --- a/soh/soh/Enhancements/timesplits/TimeSplits.cpp +++ b/soh/soh/Enhancements/timesplits/TimeSplits.cpp @@ -168,16 +168,16 @@ std::vector splitObjects = { { ITEM_STICK_UPGRADE_30, "Deku Stick Upgrade (30)", "ITEM_STICK"}, { ITEM_NUT_UPGRADE_30, "Deku Nut Upgrade (30)", "ITEM_NUT"}, { ITEM_NUT_UPGRADE_40, "Deku Nut Upgrade (40)", "ITEM_NUT"}, -{ 657, "Queen Gohma", "SPECIAL_TRIFORCE_PIECE_WHITE"}, -{ 658, "King Dodongo", "SPECIAL_TRIFORCE_PIECE_WHITE"}, -{ 659, "Barinade", "SPECIAL_TRIFORCE_PIECE_WHITE"}, -{ 660, "Phantom Ganon", "SPECIAL_TRIFORCE_PIECE_WHITE"}, -{ 661, "Volvagia", "SPECIAL_TRIFORCE_PIECE_WHITE"}, -{ 662, "Morpha", "SPECIAL_TRIFORCE_PIECE_WHITE"}, -{ 663, "Bongo Bongo", "SPECIAL_TRIFORCE_PIECE_WHITE"}, -{ 664, "Twinrova", "SPECIAL_TRIFORCE_PIECE_WHITE"}, -{ 665, "Ganondorf", "SPECIAL_TRIFORCE_PIECE_WHITE"}, -{ 666, "Ganon", "SPECIAL_TRIFORCE_PIECE_WHITE"}, +{ BOSS_QUEEN_GOHMA, "Queen Gohma", "SPECIAL_TRIFORCE_PIECE_WHITE"}, +{ BOSS_KING_DODONGO, "King Dodongo", "SPECIAL_TRIFORCE_PIECE_WHITE"}, +{ BOSS_BARINADE, "Barinade", "SPECIAL_TRIFORCE_PIECE_WHITE"}, +{ BOSS_PHANTOM_GANON, "Phantom Ganon", "SPECIAL_TRIFORCE_PIECE_WHITE"}, +{ BOSS_VOLVAGIA, "Volvagia", "SPECIAL_TRIFORCE_PIECE_WHITE"}, +{ BOSS_MORPHA, "Morpha", "SPECIAL_TRIFORCE_PIECE_WHITE"}, +{ BOSS_BONGO_BONGO, "Bongo Bongo", "SPECIAL_TRIFORCE_PIECE_WHITE"}, +{ BOSS_TWINROVA, "Twinrova", "SPECIAL_TRIFORCE_PIECE_WHITE"}, +{ BOSS_GANONDORF, "Ganondorf", "SPECIAL_TRIFORCE_PIECE_WHITE"}, +{ BOSS_GANON, "Ganon", "SPECIAL_TRIFORCE_PIECE_WHITE"}, }; std::string formatTimestampTimeSplit(uint32_t value) { @@ -401,6 +401,8 @@ void DrawTimeSplitSplits(){ itemNamer = obj.itemName; if (obj.itemImage == "SPECIAL_TRIFORCE_PIECE_WHITE") { TimeSplitColorTint(); + } else { + pieceTint = { 1, 1, 1, 1 }; } } } diff --git a/soh/soh/Enhancements/timesplits/TimeSplits.h b/soh/soh/Enhancements/timesplits/TimeSplits.h index ca8571173..b9b2929a8 100644 --- a/soh/soh/Enhancements/timesplits/TimeSplits.h +++ b/soh/soh/Enhancements/timesplits/TimeSplits.h @@ -33,4 +33,18 @@ typedef struct { uint32_t itemID; const char* itemName; const char* itemImage; -} TimeSplitObject; \ No newline at end of file +} TimeSplitObject; + +typedef enum { + START_VALUE = 656, + BOSS_QUEEN_GOHMA, + BOSS_KING_DODONGO, + BOSS_BARINADE, + BOSS_PHANTOM_GANON, + BOSS_VOLVAGIA, + BOSS_MORPHA, + BOSS_TWINROVA, + BOSS_BONGO_BONGO, + BOSS_GANONDORF, + BOSS_GANON +}; \ No newline at end of file diff --git a/soh/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c b/soh/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c index ee0204c7a..ab85ba78b 100644 --- a/soh/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c +++ b/soh/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c @@ -1549,7 +1549,7 @@ void BossDodongo_DeathCutscene(BossDodongo* this, PlayState* play) { this->cameraAt.y = camera->at.y; this->cameraAt.z = camera->at.z; gSaveContext.sohStats.itemTimestamp[TIMESTAMP_DEFEAT_KING_DODONGO] = GAMEPLAYSTAT_TOTAL_TIME; - TimeSplitSplitsHandlerS(658); + TimeSplitSplitsHandlerS(BOSS_KING_DODONGO); BossRush_HandleCompleteBoss(play); break; case 5: diff --git a/soh/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c b/soh/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c index 060e8f79a..d56c85afa 100644 --- a/soh/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c +++ b/soh/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c @@ -902,7 +902,7 @@ void BossFd2_CollisionCheck(BossFd2* this, PlayState* play) { Audio_PlayActorSound2(&this->actor, NA_SE_EN_VALVAISA_DEAD); Enemy_StartFinishingBlow(play, &this->actor); gSaveContext.sohStats.itemTimestamp[TIMESTAMP_DEFEAT_VOLVAGIA] = GAMEPLAYSTAT_TOTAL_TIME; - TimeSplitSplitsHandlerS(661); + TimeSplitSplitsHandlerS(BOSS_VOLVAGIA); BossRush_HandleCompleteBoss(play); } else if (damage) { BossFd2_SetupDamaged(this, play); diff --git a/soh/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c b/soh/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c index 91b22a136..8733c6a7c 100644 --- a/soh/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c +++ b/soh/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c @@ -2814,7 +2814,7 @@ void BossGanon_UpdateDamage(BossGanon* this, PlayState* play) { Audio_QueueSeqCmd(0x100100FF); this->screenFlashTimer = 4; gSaveContext.sohStats.itemTimestamp[TIMESTAMP_DEFEAT_GANONDORF] = GAMEPLAYSTAT_TOTAL_TIME; - TimeSplitSplitsHandlerS(665); + TimeSplitSplitsHandlerS(BOSS_GANONDORF); BossRush_HandleCompleteBoss(play); } else { Audio_PlayActorSound2(&this->actor, NA_SE_EN_GANON_DAMAGE2); diff --git a/soh/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c b/soh/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c index ec58508df..4ae262f75 100644 --- a/soh/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c +++ b/soh/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c @@ -1692,7 +1692,7 @@ void func_8090120C(BossGanon2* this, PlayState* play) { gSaveContext.sohStats.itemTimestamp[TIMESTAMP_DEFEAT_GANON] = GAMEPLAYSTAT_TOTAL_TIME; BossRush_HandleCompleteBoss(play); gSaveContext.sohStats.gameComplete = true; - TimeSplitSplitsHandlerS(666); + TimeSplitSplitsHandlerS(BOSS_GANON); this->unk_39E = Play_CreateSubCamera(play); Play_ChangeCameraStatus(play, MAIN_CAM, CAM_STAT_WAIT); Play_ChangeCameraStatus(play, this->unk_39E, CAM_STAT_ACTIVE); diff --git a/soh/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c b/soh/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c index de415ede7..5e1619edb 100644 --- a/soh/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c +++ b/soh/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c @@ -1251,7 +1251,7 @@ void BossGanondrof_CollisionCheck(BossGanondrof* this, PlayState* play) { BossGanondrof_SetupDeath(this, play); Enemy_StartFinishingBlow(play, &this->actor); gSaveContext.sohStats.itemTimestamp[TIMESTAMP_DEFEAT_PHANTOM_GANON] = GAMEPLAYSTAT_TOTAL_TIME; - TimeSplitSplitsHandlerS(660); + TimeSplitSplitsHandlerS(BOSS_PHANTOM_GANON); BossRush_HandleCompleteBoss(play); return; } diff --git a/soh/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.c b/soh/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.c index 44f087356..ce2bb3db4 100644 --- a/soh/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.c +++ b/soh/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.c @@ -1844,7 +1844,7 @@ void BossGoma_UpdateHit(BossGoma* this, PlayState* play) { BossGoma_SetupDefeated(this, play); Enemy_StartFinishingBlow(play, &this->actor); gSaveContext.sohStats.itemTimestamp[TIMESTAMP_DEFEAT_GOHMA] = GAMEPLAYSTAT_TOTAL_TIME; - TimeSplitSplitsHandlerS(657); + TimeSplitSplitsHandlerS(BOSS_QUEEN_GOHMA); BossRush_HandleCompleteBoss(play); } diff --git a/soh/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c b/soh/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c index 3440d6740..c9bbf23b8 100644 --- a/soh/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c +++ b/soh/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c @@ -1795,7 +1795,7 @@ void BossMo_CoreCollisionCheck(BossMo* this, PlayState* play) { ((sMorphaTent1->csCamera == 0) && (sMorphaTent2 != NULL) && (sMorphaTent2->csCamera == 0))) { Enemy_StartFinishingBlow(play, &this->actor); gSaveContext.sohStats.itemTimestamp[TIMESTAMP_DEFEAT_MORPHA] = GAMEPLAYSTAT_TOTAL_TIME; - TimeSplitSplitsHandlerS(662); + TimeSplitSplitsHandlerS(BOSS_MORPHA); BossRush_HandleCompleteBoss(play); Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0x100FF); this->csState = MO_DEATH_START; diff --git a/soh/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c b/soh/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c index 20bc44c2f..69e3c7405 100644 --- a/soh/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c +++ b/soh/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c @@ -2566,7 +2566,7 @@ void BossSst_HeadCollisionCheck(BossSst* this, PlayState* play) { Enemy_StartFinishingBlow(play, &this->actor); BossSst_HeadSetupDeath(this, play); gSaveContext.sohStats.itemTimestamp[TIMESTAMP_DEFEAT_BONGO_BONGO] = GAMEPLAYSTAT_TOTAL_TIME; - TimeSplitSplitsHandlerS(663); + TimeSplitSplitsHandlerS(BOSS_BONGO_BONGO); BossRush_HandleCompleteBoss(play); } else { BossSst_HeadSetupDamage(this); diff --git a/soh/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c b/soh/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c index 0f1df2cfa..90194f2e3 100644 --- a/soh/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c +++ b/soh/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c @@ -5291,7 +5291,7 @@ void BossTw_TwinrovaDamage(BossTw* this, PlayState* play, u8 damage) { Enemy_StartFinishingBlow(play, &this->actor); Audio_PlayActorSound2(&this->actor, NA_SE_EN_TWINROBA_YOUNG_DEAD); gSaveContext.sohStats.itemTimestamp[TIMESTAMP_DEFEAT_TWINROVA] = GAMEPLAYSTAT_TOTAL_TIME; - TimeSplitSplitsHandlerS(664); + TimeSplitSplitsHandlerS(BOSS_TWINROVA); BossRush_HandleCompleteBoss(play); return; } diff --git a/soh/src/overlays/actors/ovl_Boss_Va/z_boss_va.c b/soh/src/overlays/actors/ovl_Boss_Va/z_boss_va.c index 8f4be5276..8a6fcd886 100644 --- a/soh/src/overlays/actors/ovl_Boss_Va/z_boss_va.c +++ b/soh/src/overlays/actors/ovl_Boss_Va/z_boss_va.c @@ -1400,7 +1400,7 @@ void BossVa_BodyPhase4(BossVa* this, PlayState* play) { BossVa_SetupBodyDeath(this, play); Enemy_StartFinishingBlow(play, &this->actor); gSaveContext.sohStats.itemTimestamp[TIMESTAMP_DEFEAT_BARINADE] = GAMEPLAYSTAT_TOTAL_TIME; - TimeSplitSplitsHandlerS(659); + TimeSplitSplitsHandlerS(BOSS_BARINADE); BossRush_HandleCompleteBoss(play); return; }