-
Notifications
You must be signed in to change notification settings - Fork 0
/
GROS.BAS
91 lines (86 loc) · 2.8 KB
/
GROS.BAS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
SCREEN 12: CLS
DIM gros(200): DIM gros2(200): DIM gros3(200)
DIM invgros(200): DIM invgros2(200): DIM invgros3(200)
DIM nul(200)
OPEN "gros.spr" FOR INPUT AS #1
OPEN "gros2.spr" FOR INPUT AS #2
OPEN "gros3.spr" FOR INPUT AS #3
FOR x = 1 TO 19
FOR y = 1 TO 19
i = i + 1
INPUT #1, i, a
INPUT #2, i, B
INPUT #3, i, c
PSET (x, y), a
PSET (x + 70, y), B
PSET (x + 140, y), c
NEXT y
NEXT x
CLOSE #1
CLOSE #2
CLOSE #3
FOR x = 0 TO 20
FOR y = 0 TO 20
test = POINT(x, y)
distx = 30 - x
PSET (30 + distx, y), test
NEXT y
NEXT x
FOR x = 70 TO 90
FOR y = 0 TO 20
test = POINT(x, y)
distx = 100 - x
PSET (100 + distx, y), test
NEXT y
NEXT x
FOR x = 140 TO 160
FOR y = 0 TO 20
test = POINT(x, y)
distx = 170 - x
PSET (170 + distx, y), test
NEXT y
NEXT x
PAINT (0, 0), 4
GET (0, 0)-(20, 20), gros
GET (70, 0)-(90, 20), gros2
GET (140, 0)-(160, 20), gros3
GET (40, 0)-(60, 20), invgros
GET (110, 0)-(130, 20), invgros2
GET (180, 0)-(200, 20), invgros3
GET (90, 90)-(110, 110), nul
SLEEP
CLS
PAINT (0, 0), 4
t = TIMER
gros = 1
LINE (0, 400)-(640, 420), 1, BF
DO
a$ = INKEY$
IF a$ = CHR$(27) THEN EXIT DO
IF a$ = "6" THEN
PUT (xgros, ygros), nul, PSET
xgros = xgros + 5
IF gros = 1 THEN PUT (xgros, ygros), gros, PSET
IF gros = 2 THEN PUT (xgros, ygros), gros2, PSET
IF gros = 3 THEN PUT (xgros, ygros), gros3, PSET
gros = gros + 1
IF gros > 3 THEN gros = 1
END IF
IF a$ = "4" THEN
PUT (xgros, ygros), nul, PSET
xgros = xgros - 5
IF gros = 1 THEN PUT (xgros, ygros), invgros, PSET
IF gros = 2 THEN PUT (xgros, ygros), invgros2, PSET
IF gros = 3 THEN PUT (xgros, ygros), invgros3, PSET
gros = gros + 1
IF gros > 3 THEN gros = 1
END IF
test = POINT(xgros + 10, ygros + 22)
IF test <> 1 THEN
PUT (xgros, ygros), nul, PSET
ygros = ygros + 1
PUT (xgros, ygros), gros, PSET
END IF
IF a$ = "8" THEN
END IF
LOOP