CLOSES #1090, CLOSES #1093, CLOSES #1094, CLOSES #1095, CLOSES #1098, CLOSES #1102, CLOSES #1105, CLOSES #1106, CLOSES #1108, CLOSES #1109, CLOSES #1110, CLOSES #1111, CLOSES #1113, CLOSES #1114, CLOSES #1117, CLOSES #1118, CLOSES #1121, CLOSES #1122, CLOSES #1123, CLOSES #1124, CLOSES #1126, CLOSES #1127, CLOSES #1128, CLOSES #1131, CLOSES #1132, CLOSES #1134, CLOSES #1137, CLOSES #1141

This commit is contained in:
bryanthaboi
2026-08-11 21:19:36 -04:00
parent 01aab1d763
commit 0136429d3e
24 changed files with 694 additions and 167 deletions
+4 -1
View File
@@ -19,6 +19,8 @@ TextBox.isTextBox = true
-- construction time, so an unthemed boot stays byte-identical
local BOX_TX, BOX_TY, BOX_TW, BOX_TH = 0, 12, 20, 6
local MAX_COLS = 18
-- pokegold constants/ram_constants.asm: TEXT_DELAY_FAST/MED/SLOW = 1/3/5
local NAME_DELAYS = { FAST = 1, MID = 3, SLOW = 5 }
-- opts.choice: when the last page has typed out, a YES/NO ChoiceBox pops
-- up over the still-visible text (YesNoChoicePokeCenter and friends);
@@ -352,7 +354,8 @@ function TextBox:update(dt)
-- typewriter cadence: one character every N frames, N = the OPTION
-- text speed (TextSpeedOptionData frame delays 1/3/5); holding A/B
-- prints every frame like the original's held-button fast path
local delay = (self.game.save.options and self.game.save.options.textSpeed) or 3
local rawSpeed = self.game.save.options and self.game.save.options.textSpeed
local delay = NAME_DELAYS[rawSpeed] or rawSpeed or 3
if delay ~= 1 and delay ~= 3 and delay ~= 5 then delay = 3 end
if input:isDown("a") or input:isDown("b") then delay = 1 end
self.charTimer = (self.charTimer or 0) + 1