Skip to content

Commit 094e715

Browse files
committed
fix adventure-portable
1 parent bb45d15 commit 094e715

4 files changed

Lines changed: 1513 additions & 8 deletions

File tree

examples/adventure-portable.bas

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,9 @@ print ""
7878
print " {LIGHTBLUE}RETROGAMECODERS.COM{WHITE}"
7979
print ""
8080
print " {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) =====
8986
do
@@ -177,10 +174,12 @@ end function
177174

178175
function 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$
184183
end 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 ""

examples/adventure.bas

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#OPTION CHARSET PET-LOWER
12
REM TEXT ADVENTURE GAME BY CHRIS GARRETT 2026 RETROGAMECODERS.COM
23

34
REM SET UP VARIABLES ETC

examples/getkey.bas

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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+

0 commit comments

Comments
 (0)