From 435e901054bc251fddc1b80c6d5b8a84d92e52aa Mon Sep 17 00:00:00 2001 From: morfidon <57798071+morfidon@users.noreply.github.com> Date: Tue, 10 Mar 2026 19:53:10 +0100 Subject: [PATCH] Fix i/mixed to i/crlf --- Source/stores.cpp | 152 +++++++++++++++++++++++----------------------- 1 file changed, 76 insertions(+), 76 deletions(-) diff --git a/Source/stores.cpp b/Source/stores.cpp index e09f7c645..56334568d 100644 --- a/Source/stores.cpp +++ b/Source/stores.cpp @@ -897,11 +897,11 @@ void StoreNoRoom() AddSText(0, 14, _("You do not have enough room in inventory"), UiFlags::ColorWhite | UiFlags::AlignCenter, true); } -void StoreConfirm(Item &item) -{ - StartStore(OldActiveStore); - HasScrollbar = false; - ClearSText(5, 23); +void StoreConfirm(Item &item) +{ + StartStore(OldActiveStore); + HasScrollbar = false; + ClearSText(5, 23); if (OldActiveStore == TalkID::StorytellerIdentifyAll) { AddSText(0, 10, _("Identify all items?"), UiFlags::ColorWhite | UiFlags::AlignCenter, false); @@ -949,28 +949,28 @@ void StoreConfirm(Item &item) app_fatal(StrCat("Unknown store dialog ", static_cast(OldActiveStore))); } AddSText(0, 15, prompt, UiFlags::ColorWhite | UiFlags::AlignCenter, false); - AddSText(0, 18, _("Yes"), UiFlags::ColorWhite | UiFlags::AlignCenter, true); - AddSText(0, 20, _("No"), UiFlags::ColorWhite | UiFlags::AlignCenter, true); -} - -void RestoreStoreFromOldState() -{ - if (OldActiveStore == TalkID::StorytellerIdentifyAll) { - StartStore(TalkID::Storyteller); - CurrentTextLine = 16; - ScrollPos = 0; - return; - } - - StartStore(OldActiveStore); - CurrentTextLine = OldTextLine; - ScrollPos = OldScrollPos; -} - -void StartBoy() -{ - IsTextFullSize = false; - HasScrollbar = false; + AddSText(0, 18, _("Yes"), UiFlags::ColorWhite | UiFlags::AlignCenter, true); + AddSText(0, 20, _("No"), UiFlags::ColorWhite | UiFlags::AlignCenter, true); +} + +void RestoreStoreFromOldState() +{ + if (OldActiveStore == TalkID::StorytellerIdentifyAll) { + StartStore(TalkID::Storyteller); + CurrentTextLine = 16; + ScrollPos = 0; + return; + } + + StartStore(OldActiveStore); + CurrentTextLine = OldTextLine; + ScrollPos = OldScrollPos; +} + +void StartBoy() +{ + IsTextFullSize = false; + HasScrollbar = false; AddSText(0, 2, _("Wirt the Peg-legged boy"), UiFlags::ColorWhitegold | UiFlags::AlignCenter, false); AddSLine(5); if (!BoyItem.isEmpty()) { @@ -1159,19 +1159,19 @@ void StartStorytellerIdentify() } } - if (!idok) { - HasScrollbar = false; - - RenderGold = true; - if (OldActiveStore == TalkID::StorytellerIdentifyAll) { - AddSText(20, 1, _("There are no items to identify."), UiFlags::ColorWhitegold, false); - } else { - AddSText(20, 1, _("You have nothing to identify."), UiFlags::ColorWhitegold, false); - } - AddSLine(3); - AddItemListBackButton(/*selectable=*/true); - return; - } + if (!idok) { + HasScrollbar = false; + + RenderGold = true; + if (OldActiveStore == TalkID::StorytellerIdentifyAll) { + AddSText(20, 1, _("There are no items to identify."), UiFlags::ColorWhitegold, false); + } else { + AddSText(20, 1, _("You have nothing to identify."), UiFlags::ColorWhitegold, false); + } + AddSLine(3); + AddItemListBackButton(/*selectable=*/true); + return; + } HasScrollbar = true; ScrollPos = 0; @@ -1824,19 +1824,19 @@ void ConfirmEnter(Item &item) } } - StartStore(OldActiveStore); - - if (CurrentTextLine == BackButtonLine()) - return; - - if (OldActiveStore == TalkID::StorytellerIdentifyAll) { - CurrentTextLine = 16; - ScrollPos = 0; - return; - } - - CurrentTextLine = OldTextLine; - ScrollPos = std::min(OldScrollPos, NumTextLines); + StartStore(OldActiveStore); + + if (CurrentTextLine == BackButtonLine()) + return; + + if (OldActiveStore == TalkID::StorytellerIdentifyAll) { + CurrentTextLine = 16; + ScrollPos = 0; + return; + } + + CurrentTextLine = OldTextLine; + ScrollPos = std::min(OldScrollPos, NumTextLines); while (CurrentTextLine != -1 && !TextLine[CurrentTextLine].isSelectable()) { CurrentTextLine--; @@ -1923,13 +1923,13 @@ void StorytellerEnter() } } -void StorytellerIdentifyEnter() -{ - if (CurrentTextLine == BackButtonLine()) { - StartStore(TalkID::Storyteller); - CurrentTextLine = OldActiveStore == TalkID::StorytellerIdentifyAll ? 16 : 14; - return; - } +void StorytellerIdentifyEnter() +{ + if (CurrentTextLine == BackButtonLine()) { + StartStore(TalkID::Storyteller); + CurrentTextLine = OldActiveStore == TalkID::StorytellerIdentifyAll ? 16 : 14; + return; + } OldActiveStore = TalkID::StorytellerIdentify; OldTextLine = CurrentTextLine; @@ -2506,15 +2506,15 @@ void StoreESC() case TalkID::StorytellerIdentifyShow: StartStore(TalkID::StorytellerIdentify); break; - case TalkID::NoMoney: - case TalkID::NoRoom: - case TalkID::Confirm: - RestoreStoreFromOldState(); - break; - case TalkID::None: - break; - } -} + case TalkID::NoMoney: + case TalkID::NoRoom: + case TalkID::Confirm: + RestoreStoreFromOldState(); + break; + case TalkID::None: + break; + } +} void StoreUp() { @@ -2671,13 +2671,13 @@ void StoreEnter() case TalkID::WitchRecharge: WitchRechargeEnter(); break; - case TalkID::NoMoney: - case TalkID::NoRoom: - RestoreStoreFromOldState(); - break; - case TalkID::Confirm: - ConfirmEnter(TempItem); - break; + case TalkID::NoMoney: + case TalkID::NoRoom: + RestoreStoreFromOldState(); + break; + case TalkID::Confirm: + ConfirmEnter(TempItem); + break; case TalkID::Boy: BoyEnter(); break;