mirror of
https://github.com/mbirth/gwbasic.git
synced 2024-12-25 12:04:08 +00:00
Added joystick tools.
This commit is contained in:
parent
baa7240975
commit
816c9b6978
23
MOVEJOY.BAS
Normal file
23
MOVEJOY.BAS
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
10 CLS
|
||||||
|
20 KEY OFF
|
||||||
|
30 A=1:B=1:X=1:Y=1
|
||||||
|
40 LOCATE A,B:PRINT"Û";
|
||||||
|
50 H=0
|
||||||
|
60 C=STICK(0):D=STICK(1):E=STRIG(0):F=STRIG(4)
|
||||||
|
70 IF C<90 THEN Y=Y-1
|
||||||
|
80 IF C>120 THEN Y=Y+1
|
||||||
|
90 IF D<100 THEN X=X-1
|
||||||
|
100 IF D>120 THEN X=X+1
|
||||||
|
110 IF X<1 THEN X=1
|
||||||
|
120 IF X>25 THEN X=25
|
||||||
|
130 IF Y<1 THEN Y=1
|
||||||
|
140 IF Y>80 THEN Y=80
|
||||||
|
150 IF E=-1 AND F=-1 THEN COLOR H:H=H+1:I=1:IF H>31 THEN H=0
|
||||||
|
160 IF I=1 THEN I=0:GOTO 180
|
||||||
|
170 IF F=-1 THEN CLS
|
||||||
|
180 IF E=-1 THEN 210
|
||||||
|
190 LOCATE A,B:PRINT" ";
|
||||||
|
200 A=X:B=Y
|
||||||
|
210 LOCATE X,Y:PRINT"Û";
|
||||||
|
220 GOTO 60
|
||||||
|
|
26
WINNER.BAS
Normal file
26
WINNER.BAS
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
10 CLS
|
||||||
|
20 PRINT"Dies ist ein Joystick-Test f<>r den HCV 386-DX."
|
||||||
|
30 PRINT"Dr<44>cken Sie eine Taste zum Start !!!"
|
||||||
|
40 B$=INKEY$:IF B$="" THEN 40
|
||||||
|
50 CLS
|
||||||
|
60 PRINT"Left = 4-6 Right = 181-185 Up = 5-7 Down = 127-133"
|
||||||
|
70 PRINT"Fire Button 1 = -1 Fire Button 2 = -1"
|
||||||
|
80 LOCATE 15,30
|
||||||
|
90 A=STICK(0):B=STICK(1)
|
||||||
|
100 C=STRIG(1):D=STRIG(4)
|
||||||
|
110 LOCATE 15,26
|
||||||
|
120 PRINT USING"Left/Right : ### Up/Down : ###";A;B
|
||||||
|
130 LOCATE 16,22
|
||||||
|
140 PRINT USING"Fire Button 1 : ## Fire Button 2 : ##";C;D
|
||||||
|
150 IF A<90 THEN LOCATE 15,1:PRINT"®®® Left"
|
||||||
|
160 IF A>120 THEN LOCATE 15,60:PRINT"Right ¯¯¯"
|
||||||
|
170 IF B<100 THEN LOCATE 15,1:PRINT"7 Up"
|
||||||
|
180 IF B>120 THEN LOCATE 15,60:PRINT"8 Down"
|
||||||
|
190 IF C=-1 THEN LOCATE 16,1:PRINT"6 Fire Button 1"
|
||||||
|
195 IF C<>-1 THEN LOCATE 16,1:PRINT" "
|
||||||
|
200 IF D=-1 THEN LOCATE 16,61:PRINT"6 Fire Button 2"
|
||||||
|
205 IF D<>-1 THEN LOCATE 16,61:PRINT" "
|
||||||
|
206 IF A>90 AND B>100 THEN LOCATE 15,1:PRINT" "
|
||||||
|
207 IF A<120 AND B<120 THEN LOCATE 15,60:PRINT" "
|
||||||
|
220 GOTO 90
|
||||||
|
|
Loading…
Reference in New Issue
Block a user