-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcolorscreen.bas
More file actions
66 lines (56 loc) · 953 Bytes
/
colorscreen.bas
File metadata and controls
66 lines (56 loc) · 953 Bytes
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
!!
C O L O R S C R E E N
B l
: ..R
t :
G g
Copyright (c) MMXVII
by
Dietmar G. SCHRAUSSER
!!
INCLUDE strg.txt
GR.OPEN 255,0,0,0,0,1
GR.SCREEN sx,sy
GR.TEXT.SIZE 10
INPUT"ColorScreen Size … [5|10|20|40|60|80...]",s,60
m0:
r=0:g=0:b=0
d1=(sy/sx)
c1=(s*d1)/2
m1:
FOR j=0 TO sy STEP (s*d1)
FOR i=0 TO sx STEP s
r=r+255/(sx/s)
IF r>255:r=0:g=g+255/(sx/s)
IF g>255:g=0:b=b+255/(sx/s)
IF b>255:b=0
ENDIF
ENDIF
ENDIF
GR.COLOR 255,r,g,b,1
GR.RECT rc,i,j-c1,i+s,(j+s*d1)-c1
!!
GR.COLOR 255,0,0,0,1
GR.RECT dl,0,0,20,10
GR.COLOR 255,255,255,255,1
GR.TEXT.DRAW tx, 0,10,INT$(b)
!!
NEXT
NEXT
GR.RENDER
IF b>=255 THEN GOTO m2
GR.CLS
GOTO m1
m2:
!!
DO
GR.TOUCH tc,tx,ty
UNTIL tc
!!
GOTO m0
ONBACKKEY:
GOSUB fin
END
fin:
PRINT"ColorScreen "+_cr$+" 2017 by Dietmar Schrausser"
RETURN