Permalink
Browse files

AdventureSample - fix issues in adventure.bas

- Reverse order of bitwise operation and num var comparison; generated
  code causes runtime type mismatch otherwise.
- Fix 'DROP' routine; original code did not assign room correctly.
- Fix branch in 'OPEN' routine; original code did not handle invalid noun
  correctly.
  • Loading branch information...
bobbymcr committed May 3, 2018
1 parent 30ba55f commit b8b374071938154240b48706e45c6d90f5536863
Showing with 3 additions and 3 deletions.
  1. +3 −3 projects/AdventureSample/bas/adventure.bas
@@ -43,7 +43,7 @@
596 REM
600 PRINT "YOU CAN SEE: "
610 FL=0 : FOR I=0 TO NO-1
620 IF (OB(I) AND 127)=R THEN PRINT " ";OB$(I) : FL=1
620 IF R=(OB(I) AND 127) THEN PRINT " ";OB$(I) : FL=1
630 NEXT I
640 IF FL=0 THEN PRINT " NOTHING OF INTEREST"
650 RETURN
@@ -92,7 +92,7 @@
2600 IF V$<>"DRO" AND V$<>"THR" THEN 2700
2610 GOSUB 1000
2620 IF FL=0 OR RO<>-1 THEN PRINT "YOU DON'T HAVE THAT!" : GOTO 100
2650 IN=IN-1 : OB(I)=-1 : PRINT "DROPPED." : GOTO 100
2650 IN=IN-1 : OB(I)=R : PRINT "DROPPED." : GOTO 100
2699 REM *** 'INVENTORY' ROUTINE
2700 IF V$<>"INV" AND V$<>"I" THEN 2800
2710 FL=0 : PRINT "YOU ARE CARRYING:"
@@ -145,7 +145,7 @@
3740 IF N$<>"CAB" THEN 3770
3750 IF R<>2 THEN PRINT "THERE'S NO CA81NET HERE!" : GOTO 100
3760 PRINT "THERE'S SOMETHING INSIDE!" : OB(3)=2 : GOTO 100
3770 IF N$<>"CAS" THEN 3820
3770 IF N$<>"CAS" THEN 3890
3780 IF R<>18 THEN PRINT "THERE'S NO CASE HERE!" : GOTO 100
3790 IF GF<>1 THEN PRINT "THE CASE IS ELECTRIFIED!" : GOTO 100
3800 PRINT "THE GLOVES INSULATE AGAINST THE"

0 comments on commit b8b3740

Please sign in to comment.