mirror of
https://github.com/gungwald/maze.git
synced 2024-06-15 19:29:34 +00:00
Fix colors
This commit is contained in:
parent
e11f91e6f4
commit
c90181ef4a
40
colors.baz
40
colors.baz
|
@ -40,28 +40,26 @@ REM
|
||||||
11: Pink
|
11: Pink
|
||||||
}
|
}
|
||||||
|
|
||||||
{ green, yellow, orange, red }
|
|
||||||
|
|
||||||
D$ = chr$(4)
|
D$ = chr$(4)
|
||||||
RET$ = chr$(13)
|
RET$ = chr$(13)
|
||||||
ESC$ = chr$(27)
|
ESC$ = chr$(27)
|
||||||
SW = 140 : SH = 192 : REM Screen width and height
|
SW = 140
|
||||||
KBD = -16384 : REM Byte that is neg if key pressed
|
SH = 192 : REM Screen width and height
|
||||||
RL = 78 : RH = 79 : REM RNDL and RNDH
|
KBD = -16384 : REM Byte that is neg if key pressed
|
||||||
SEED = peek(RL) + peek(RH) * 256 : REM Get seed for random num generator
|
RL = 78
|
||||||
|
RH = 79 : REM RNDL and RNDH
|
||||||
|
SEED = peek(RL) + peek(RH) * 256 : REM Get seed
|
||||||
NA = rnd(SEED) : REM Seed random num generator
|
NA = rnd(SEED) : REM Seed random num generator
|
||||||
|
|
||||||
print D$;"-dhgr" : REM Load Double Hi-Res driver
|
print D$;"-dhgr" : REM Load Double Hi-Res driver
|
||||||
|
|
||||||
dim c(16)
|
dim c(16)
|
||||||
data 1,9,13,12,4,14,7,6,2,3,11,-1
|
data 11
|
||||||
mc = 0 {max colors}
|
data 1,9,13,12,4,14,7,6,2,3,11
|
||||||
£nextColor
|
read mc {max colors}
|
||||||
|
for i = 1 to mc
|
||||||
read c(i)
|
read c(i)
|
||||||
if c(i) = -1 then @lastColor
|
next
|
||||||
mc = mc + 1
|
|
||||||
goto @nextColor
|
|
||||||
£lastColor
|
|
||||||
|
|
||||||
&HGR2 : REM Full screen double hi-res
|
&HGR2 : REM Full screen double hi-res
|
||||||
&MODE(2) : REM 16-color mode
|
&MODE(2) : REM 16-color mode
|
||||||
|
@ -73,17 +71,11 @@ goto @nextColor
|
||||||
mx = sw - 1 {max x}
|
mx = sw - 1 {max x}
|
||||||
my = sh - 1 {max y}
|
my = sh - 1 {max y}
|
||||||
|
|
||||||
cc = 0
|
for ci = 1 to mc
|
||||||
ci = 1
|
for x = ci*10 to ci*10+10
|
||||||
|
&hcolor = c(ci)
|
||||||
for x = 0 to mx
|
&hplot x,0 to x,my
|
||||||
if cc < 8 then cc = cc + 1 : goto @setColor
|
next
|
||||||
cc = 0
|
|
||||||
ci = ci + 1
|
|
||||||
if ci > mc{max color} then @checkKeypress
|
|
||||||
£setColor
|
|
||||||
&hcolor = c(ci)
|
|
||||||
&hplot x,0 to x,my
|
|
||||||
next
|
next
|
||||||
|
|
||||||
£checkKeypress
|
£checkKeypress
|
||||||
|
|
Loading…
Reference in New Issue
Block a user