From 1190a5cd1a63d74dae7b9db64af81205480392fa Mon Sep 17 00:00:00 2001 From: Firepup Sixfifty Date: Sat, 27 Apr 2024 17:17:19 -0500 Subject: [PATCH] Fix some sound-related issues --- fallout_boot.py | 19 +++++++++++-------- fallout_functions.py | 4 ++-- fallout_locked.py | 4 ++-- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/fallout_boot.py b/fallout_boot.py index 405313e..8ad69a7 100644 --- a/fallout_boot.py +++ b/fallout_boot.py @@ -21,13 +21,15 @@ MESSAGE_1 = 'WELCOME TO ROBCO INDUSTRIES (TM) TERMLINK' MESSAGE_2 = 'RIT-V300' -MESSAGE_3 = 'Initializing Robco Industries(TM) MF Boot Agent v2.3.0\n' \ - 'RETROS BIOS\n' \ - 'RBIOS-4.02.08.00 52EE5.E7.E8\n' \ - 'Copyright 2201-2203 Robco Ind.\n' \ - 'Uppermem: 64 KB\n' \ - 'Root (5A8)\n' \ - 'Maintenance Mode' +MESSAGE_3 = [ + '\nInitializing Robco Industries(TM) MF Boot Agent v2.3.0\n', + 'RETROS BIOS\n', + 'RBIOS-4.02.08.00 52EE5.E7.E8\n', + 'Copyright 2201-2203 Robco Ind.\n', + 'Uppermem: 64 KB\n', + 'Root (5A8)\n', + 'Maintenance Mode\n\n' +] ######################## functions ####################### @@ -78,7 +80,8 @@ def runBoot(scr, hardMode): curses.napms(INPUT_PAUSE) slowWrite(scr, ENTRY_3 + '\n', TYPE_DELAY, True) - slowWrite(scr, '\n' + MESSAGE_3 + '\n\n') + for LINE in MESSAGE_3: + slowWrite(scr, LINE) if hardMode: entry = '' diff --git a/fallout_functions.py b/fallout_functions.py index a7828bb..7f67d7b 100644 --- a/fallout_functions.py +++ b/fallout_functions.py @@ -81,13 +81,13 @@ def upperInput(window, hidden = False, can_newline = True): window.addch(NEWLINE) return instr -def centeredWrite(window, text, pause = LETTER_PAUSE): +def centeredWrite(window, text, pause = LETTER_PAUSE, silent = False): """ Writes to the current line but centers the text """ width = window.getmaxyx()[1] window.move(window.getyx()[0], int(width / 2 - len(text) / 2)) - slowWrite(window, text, pause) + slowWrite(window, text, pause, silent = silent) def _soundCheck(): diff --git a/fallout_locked.py b/fallout_locked.py index a38fb60..01795f3 100644 --- a/fallout_locked.py +++ b/fallout_locked.py @@ -27,9 +27,9 @@ def runLocked(scr): scr.erase() curses.curs_set(0) scr.move(int(height / 2 - 1), 0) - centeredWrite(scr, LOCKED_1) + centeredWrite(scr, LOCKED_1, silent = True) scr.move(int(height / 2 + 1), 0) - centeredWrite(scr, LOCKED_2) + centeredWrite(scr, LOCKED_2, silent = True) scr.refresh() curses.napms(LOCKED_OUT_TIME)