File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -78,12 +78,9 @@ print ""
7878print " {LIGHTBLUE}RETROGAMECODERS.COM{WHITE}"
7979print " "
8080print " {LIGHTGREEN}PRESS H FOR HELP OR OTHER KEY TO START{WHITE}"
81- do
82- get I$
83- I$ = UCASE $(I $)
81+
82+ I$ = WaitKey ()
8483 if I$ = " H" then Help ()
85- loop while I$ = " "
86- I$ = " "
8784
8885' ===== MAIN LOOP (was DISPLAYROOM / GETCOMMAND) =====
8986do
@@ -177,10 +174,12 @@ end function
177174
178175function WaitKey ()
179176 print CY$ + RV $ + " PRESS A KEY TO CONTINUE " + RO $
180- do
177+ I$=" "
178+ while I$ = " "
181179 get I$
182- loop while I$ = " "
183- return
180+ wend
181+ I$ = UCASE $(I $)
182+ return I$
184183end function
185184
186185
@@ -386,6 +385,7 @@ function GetLine()
386385 I$ = " "
387386 do
388387 get Y$
388+ Y$ = UCASE $(Y $)
389389 if Y$ <> " " then
390390 if ASC (Y $) = 13 then
391391 print " "
Original file line number Diff line number Diff line change 1+ #OPTION CHARSET PET -LOWER
12REM TEXT ADVENTURE GAME BY CHRIS GARRETT 2026 RETROGAMECODERS.COM
23
34REM SET UP VARIABLES ETC
Original file line number Diff line number Diff line change 1+ function WaitKey()
2+ print CY$ + RV$ + " PRESS A KEY TO CONTINUE " + RO$
3+ I$= ""
4+ while I$ = ""
5+ get I$
6+ print I$
7+ wend
8+ return I$
9+ end function
10+
11+ I$= ""
12+
13+ WaitKey()
14+ print "you pressed: " + I$
15+
You can’t perform that action at this time.
0 commit comments