Fix Triforce Count u16 mistakes

This commit is contained in:
aMannus
2023-11-03 23:36:18 +01:00
parent 63af883c6f
commit 6da79ea4c6
3 changed files with 13 additions and 13 deletions
@@ -515,7 +515,7 @@ void DrawInfoTab() {
UIWidgets::InsertHelpHoverText("Z-Targeting behavior");
if (IS_RANDO && OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_TRIFORCE_HUNT)) {
ImGui::InputScalar("Triforce Pieces", ImGuiDataType_U16, &gSaveContext.triforcePiecesCollected);
ImGui::InputScalar("Triforce Pieces", ImGuiDataType_U8, &gSaveContext.triforcePiecesCollected);
UIWidgets::InsertHelpHoverText("Currently obtained Triforce Pieces. For Triforce Hunt.");
bool thFlag = gSaveContext.grantBossKey != 0;
+3 -3
View File
@@ -214,7 +214,7 @@ extern "C" void Randomizer_DrawTriforcePiece(PlayState* play, GetItemEntry getIt
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
uint16_t current = gSaveContext.triforcePiecesCollected;
uint8_t current = gSaveContext.triforcePiecesCollected;
Matrix_Scale(0.035f, 0.035f, 0.035f, MTXMODE_APPLY);
@@ -238,8 +238,8 @@ extern "C" void Randomizer_DrawTriforcePieceGI(PlayState* play, GetItemEntry get
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
uint16_t current = gSaveContext.triforcePiecesCollected;
uint16_t required = OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_TRIFORCE_HUNT_PIECES_REQUIRED);
uint8_t current = gSaveContext.triforcePiecesCollected;
uint8_t required = OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_TRIFORCE_HUNT_PIECES_REQUIRED);
Matrix_Scale(triforcePieceScale, triforcePieceScale, triforcePieceScale, MTXMODE_APPLY);
@@ -5549,9 +5549,9 @@ void CreateTriforcePieceMessages() {
CustomMessage Randomizer::GetTriforcePieceMessage() {
// Item is only given after the textbox, so reflect that inside the textbox.
uint16_t current = gSaveContext.triforcePiecesCollected + 1;
uint16_t required = OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_TRIFORCE_HUNT_PIECES_REQUIRED);
uint16_t remaining = required - current;
uint8_t current = gSaveContext.triforcePiecesCollected + 1;
uint8_t required = OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_TRIFORCE_HUNT_PIECES_REQUIRED);
uint8_t remaining = required - current;
float percentageCollected = (float)current / (float)required;
uint8_t messageIndex;
@@ -5580,12 +5580,12 @@ void CreateChristmasTreeMessages() {
CustomMessage ChristmasTreeMessages[2] = {
{ "The %yChristmas tree%w seems to be&missing some of %gits magic%w... Find all&ornaments to save %rChristmas%w!",
"The Christmas tree seems to be&missing some of its magic...",
"The Christmas tree seems to be&missing some of its magic..." },
"The %yChristmas tree%w seems to be&missing some of %gits magic%w... Find all&ornaments to save %rChristmas%w!",
"The %yChristmas tree%w seems to be&missing some of %gits magic%w... Find all&ornaments to save %rChristmas%w!" },
{ "The tree's magic has been fully&restored. %gMerry %rChristmas%w!",
"The tree's magic has been fully restored. Merry Christmas!",
"The tree's magic has been fully restored. Merry Christmas!" }
"The tree's magic has been fully&restored. %gMerry %rChristmas%w!",
"The tree's magic has been fully&restored. %gMerry %rChristmas%w!" }
};
CustomMessageManager* customMessageManager = CustomMessageManager::Instance;
customMessageManager->AddCustomMessageTable(Randomizer::christmasTreeMessageTableID);
@@ -5596,8 +5596,8 @@ void CreateChristmasTreeMessages() {
CustomMessage Randomizer::GetChristmasTreeMessage() {
// Item is only given after the textbox, so reflect that inside the textbox.
uint16_t current = gSaveContext.triforcePiecesCollected;
uint16_t required = OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_TRIFORCE_HUNT_PIECES_REQUIRED);
uint8_t current = gSaveContext.triforcePiecesCollected;
uint8_t required = OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_TRIFORCE_HUNT_PIECES_REQUIRED);
uint8_t messageIndex;
if (current < required) {