From 271e5421cc129886f69242c23081c4372e8e5e18 Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Thu, 12 Jan 2017 20:43:18 -0500 Subject: [PATCH] glados: joystick test code works --- glados3.3/joystick_test.bas | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/glados3.3/joystick_test.bas b/glados3.3/joystick_test.bas index cd132250..00c60c5e 100644 --- a/glados3.3/joystick_test.bas +++ b/glados3.3/joystick_test.bas @@ -1,2 +1,28 @@ -10 PRINT PDL(0),PDL(1):GOTO 10 +1 HOME:HGR:D$=CHR$(4):ROT=0:SCALE=2 +8 POKE 232,38:POKE 233,3 +9 PRINT D$;"BLOAD OBJECTS.SHAPE,A$326" +100 X=140:Y=80:D0=0:D1=0:O0=0:O1=0 +105 XDRAW 1 AT X,Y +110 OX=X:OY=Y:O0=D0:O1=D1 +115 Q=PDL(0):R=PDL(1) +120 IF Q > 160 THEN X=X+4 +122 IF Q > 220 THEN X=X+24 +125 IF Q < 96 THEN X=X-4 +127 IF Q < 36 THEN X=X-24 +130 IF R > 160 THEN Y=Y+4 +132 IF R>220 THEN Y=Y+24 +135 IF R < 96 THEN Y=Y-4 +137 IF R < 36 THEN Y=Y-24 +200 IF X<10 THEN X=10 +210 IF X>270 THEN X=270 +220 IF Y<10 THEN Y=10 +230 IF Y>150 THEN Y=150 +232 D0=PEEK(-16286) +232 D1=PEEK(-16287) +233 IF D0>127 AND O0<127 THEN XDRAW 6 AT X,Y +234 IF D1>127 AND O1<127 THEN XDRAW 7 AT X,Y +235 IF X=OX AND Y=OY GOTO 110 +237 XDRAW 1 AT OX,OY +240 XDRAW 1 AT X,Y +250 GOTO 110