Compare commits

...

3 commits

Author SHA1 Message Date
1190a5cd1a
Fix some sound-related issues 2024-04-27 17:17:19 -05:00
c243caa762
Junk spacing 2024-04-27 17:13:30 -05:00
4b2a093186
Junk spacing 2024-04-27 17:06:26 -05:00
3 changed files with 18 additions and 15 deletions

View file

@ -21,13 +21,15 @@ MESSAGE_1 = 'WELCOME TO ROBCO INDUSTRIES (TM) TERMLINK'
MESSAGE_2 = 'RIT-V300' MESSAGE_2 = 'RIT-V300'
MESSAGE_3 = 'Initializing Robco Industries(TM) MF Boot Agent v2.3.0\n' \ MESSAGE_3 = [
'RETROS BIOS\n' \ '\nInitializing Robco Industries(TM) MF Boot Agent v2.3.0\n',
'RBIOS-4.02.08.00 52EE5.E7.E8\n' \ 'RETROS BIOS\n',
'Copyright 2201-2203 Robco Ind.\n' \ 'RBIOS-4.02.08.00 52EE5.E7.E8\n',
'Uppermem: 64 KB\n' \ 'Copyright 2201-2203 Robco Ind.\n',
'Root (5A8)\n' \ 'Uppermem: 64 KB\n',
'Maintenance Mode' 'Root (5A8)\n',
'Maintenance Mode\n\n'
]
######################## functions ####################### ######################## functions #######################
@ -45,7 +47,7 @@ def runBoot(scr, hardMode):
curses.noecho() curses.noecho()
scr.scrollok(True) scr.scrollok(True)
slowWrite(scr, MESSAGE_1 + '\n\n') slowWrite(scr, MESSAGE_1 + '\n\n')
if hardMode: if hardMode:
@ -78,7 +80,8 @@ def runBoot(scr, hardMode):
curses.napms(INPUT_PAUSE) curses.napms(INPUT_PAUSE)
slowWrite(scr, ENTRY_3 + '\n', TYPE_DELAY, True) 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: if hardMode:
entry = '' entry = ''
@ -89,7 +92,7 @@ def runBoot(scr, hardMode):
slowWrite(scr, '>') slowWrite(scr, '>')
curses.napms(INPUT_PAUSE) curses.napms(INPUT_PAUSE)
slowWrite(scr, ENTRY_4 + '\n', TYPE_DELAY, True) slowWrite(scr, ENTRY_4 + '\n', TYPE_DELAY, True)
curses.napms(INPUT_PAUSE) curses.napms(INPUT_PAUSE)
return True return True

View file

@ -81,13 +81,13 @@ def upperInput(window, hidden = False, can_newline = True):
window.addch(NEWLINE) window.addch(NEWLINE)
return instr 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 Writes to the current line but centers the text
""" """
width = window.getmaxyx()[1] width = window.getmaxyx()[1]
window.move(window.getyx()[0], int(width / 2 - len(text) / 2)) window.move(window.getyx()[0], int(width / 2 - len(text) / 2))
slowWrite(window, text, pause) slowWrite(window, text, pause, silent = silent)
def _soundCheck(): def _soundCheck():

View file

@ -27,13 +27,13 @@ def runLocked(scr):
scr.erase() scr.erase()
curses.curs_set(0) curses.curs_set(0)
scr.move(int(height / 2 - 1), 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) scr.move(int(height / 2 + 1), 0)
centeredWrite(scr, LOCKED_2) centeredWrite(scr, LOCKED_2, silent = True)
scr.refresh() scr.refresh()
curses.napms(LOCKED_OUT_TIME) curses.napms(LOCKED_OUT_TIME)
def beginLocked(): def beginLocked():
""" """
Initialize curses and start the locked out process Initialize curses and start the locked out process