diff options
| author | Eblo <7004497+Eblo@users.noreply.github.com> | 2025-09-12 17:26:21 -0400 |
|---|---|---|
| committer | Eblo <7004497+Eblo@users.noreply.github.com> | 2025-09-12 17:26:21 -0400 |
| commit | b7d8a31dccf1de06c2db2c103d961d2907743122 (patch) | |
| tree | f75b0c2186e1d51aa7a373f10cbeaed34cd07147 /mm/2s2h/DeveloperTools/SaveEditor.cpp | |
| parent | 39386c8ec22684659d088bc3773ad6be5a897f9b (diff) | |
Use CURRENT_TIME in enhancements and missed spots
Diffstat (limited to 'mm/2s2h/DeveloperTools/SaveEditor.cpp')
| -rw-r--r-- | mm/2s2h/DeveloperTools/SaveEditor.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/mm/2s2h/DeveloperTools/SaveEditor.cpp b/mm/2s2h/DeveloperTools/SaveEditor.cpp index fd67c7d2b..62f436ddf 100644 --- a/mm/2s2h/DeveloperTools/SaveEditor.cpp +++ b/mm/2s2h/DeveloperTools/SaveEditor.cpp @@ -178,7 +178,7 @@ EnTest4* FindEnTest4Actor() { void UpdateGameTime(u16 gameTime) { bool newTimeIsNight = (gameTime > CLOCK_TIME(18, 0)) || (gameTime < CLOCK_TIME(6, 0)); - bool prevTimeIsNight = (gSaveContext.save.time > CLOCK_TIME(18, 0)) || (gSaveContext.save.time < CLOCK_TIME(6, 0)); + bool prevTimeIsNight = (CURRENT_TIME > CLOCK_TIME(18, 0)) || (CURRENT_TIME < CLOCK_TIME(6, 0)); gSaveContext.save.time = gameTime; @@ -228,7 +228,7 @@ void UpdateGameTime(u16 gameTime) { } // Open the Clock Tower rooftop - if (((CURRENT_DAY == 3) && (gSaveContext.save.time < CLOCK_TIME(6, 0)))) { + if (((CURRENT_DAY == 3) && (CURRENT_TIME < CLOCK_TIME(6, 0)))) { ObjTokeiStep* objTokeiStep = (ObjTokeiStep*)Actor_FindNearby(gPlayState, &GET_PLAYER(gPlayState)->actor, ACTOR_OBJ_TOKEI_STEP, ACTORCAT_BG, 99999.9f); if (objTokeiStep != NULL && objTokeiStep->actionFunc == ObjTokeiStep_DoNothing) { @@ -381,8 +381,8 @@ void DrawGeneralTab() { static u16 minTime = 0; static u16 maxTime = 0xFFFF; // Get current time and format as digital string - u16 curMinutes = (s32)TIME_TO_MINUTES_F(gSaveContext.save.time) % 60; - u16 curHours = (s32)TIME_TO_MINUTES_F(gSaveContext.save.time) / 60; + u16 curMinutes = (s32)TIME_TO_MINUTES_F(CURRENT_TIME) % 60; + u16 curHours = (s32)TIME_TO_MINUTES_F(CURRENT_TIME) / 60; std::string minutes = (curMinutes < 10 ? "0" : "") + std::to_string(curMinutes); std::string hours = ""; std::string ampm = ""; @@ -398,7 +398,7 @@ void DrawGeneralTab() { hours += std::to_string(curHours); std::string timeString = hours + ":" + minutes + ampm + " (0x%x)"; - u16 gameTime = gSaveContext.save.time; + u16 gameTime = CURRENT_TIME; if (ImGui::SliderScalar("##timeInput", ImGuiDataType_U16, &gameTime, &minTime, &maxTime, timeString.c_str())) { UpdateGameTime(gameTime); } @@ -452,7 +452,7 @@ void DrawGeneralTab() { const auto& skip = timeSkipAmounts.at(i); if (UIWidgets::Button(skip.second, { .size = UIWidgets::Sizes::Inline, .color = UIWidgets::Colors::LightBlue })) { - UpdateGameTime(gSaveContext.save.time + CLOCK_TIME(0, skip.first)); + UpdateGameTime(CURRENT_TIME + CLOCK_TIME(0, skip.first)); } if (i < timeSkipAmounts.size() - 1) { ImGui::SameLine(); |
