-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBars.txt
82 lines (82 loc) · 2.05 KB
/
Bars.txt
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
1 ON ERROR PRINTREPORT$;" at line ";ERL:END
2
3 REM OLD Colours of historic interest only
4 DIM BarsLU%(16)
5 BarsLU%(0)=7
6 BarsLU%(1)=3
7 BarsLU%(2)=6
8 BarsLU%(3)=2
9 BarsLU%(4)=5
10 BarsLU%(5)=1
11 BarsLU%(6)=4
12 BarsLU%(7)=0
13 BarsLU%(8)=1
14 BarsLU%(9)=1
15 BarsLU%(10)=1
16 BarsLU%(11)=1
17 BarsLU%(12)=1
18 BarsLU%(13)=1
19 BarsLU%(14)=1
20 BarsLU%(15)=1
21
22
23 REM MODE MODE :REM Reset Screen display. but leave in current mode.
24 CLG
25 OFF :REM Turn off text cursor
26 :
27 REM The following four line read the current screen size co-ords.
28 SYS "OS_ReadModeVariable",-1,4 TO ,,XEigFactor%
29 SYS "OS_ReadModeVariable",-1,5 TO ,,YEigFactor%
30 SYS "OS_ReadModeVariable",-1,11 TO ,,XSize%:XSize%+=1
31 SYS "OS_ReadModeVariable",-1,12 TO ,,YSize%:YSize%+=1
32 :
33 REM Now calculate the starting point and step size for 8x10 grid
34 endX%=XSize%<<XEigFactor%
35 XStep%=(XSize%/8)<<XEigFactor%
36 halfY%=(YSize%/3 )<<YEigFactor%
37 :
38 endY%=YSize%<<YEigFactor%
39 REM Draw BARS
40 Step%=0
41 FOR X%= XStep% TO endX% STEP XStep%
42 REM GCOL0,BarsLU%(Step%)
43
44 PROCSetColour(Step%)
45
46 RECTANGLEFILL X%-XStep%,halfY%,X%,endY%
47 GCOL 255,0,0
48 RECTANGLEFILL X%-XStep%,0,X%,halfY%
49 Step% +=1
50 NEXT
51 REM OSCLI("<MonitorTest$Dir>.!Runimage")
52
53 PRINT XSize%,YSize%
52 END
53
54 DEF PROCSetColour(step)
55
56 RESTORE 72
57 READ col,r,g,b
58
59 WHILE (col<>step) AND (col <> -1)
60
61 READ col,r,g,b
62 ENDWHILE
63
64 IF col <> -1 THEN
65 GCOL r,g,b
66 ENDIF
67
68 ENDPROC
69
70
71
72 DATA 0,255,255,255
73 DATA 1,255,255,0
74 DATA 2,0,255,255
75 DATA 3,0,255,0
76 DATA 4,255,0,255
77 DATA 5,255,0,0
78 DATA 6,0,0,255
79 DATA 7,0,0,0
80 DATA -1,-1,-1,-1