1
0
mirror of https://github.com/dschmenk/PLASMA.git synced 2024-06-10 02:29:30 +00:00
PLASMA/src/samplesrc/grtest.pla

67 lines
1.3 KiB
Plaintext

include "inc/cmdsys.plh"
include "inc/grlib.plh"
include "inc/lines.plh"
sysflags restxt1|restxt2 // Reserve all text pages
byte[] sprite1 = $80,$80,$00,$00,$00,$00,$80,$80
byte[] = $80,$00,$0A,$0A,$0A,$0A,$00,$80
byte[] = $00,$0A,$0F,$0F,$0F,$0F,$0A,$00
byte[] = $00,$0A,$0F,$80,$80,$0F,$0A,$00
byte[] = $00,$0A,$0F,$80,$80,$0F,$0A,$00
byte[] = $00,$0A,$0F,$0F,$0F,$0F,$0A,$00
byte[] = $80,$00,$0A,$0A,$0A,$0A,$00,$80
byte[] = $80,$80,$00,$00,$00,$00,$80,$80
byte[] tile1 = $11,$11,$11,$11,$11,$11,$55,$00
byte[] = $11,$11,$11,$11,$11,$11,$55,$00
byte[] = $11,$11,$11,$11,$11,$11,$55,$00
byte[] = $05,$05,$05,$05,$05,$05,$05,$00
//
// Test routine
//
def grTest#0
byte b, l, k
word i, j, ii, ij
b = grMode(grPage1)
grDrawBuf(grPage1)
for k = 15 downto 0
grClear(k)
next
setlinespans(@grHLin, @grVLin)
for l = 0 to 39
grColor(l)
linespans(0, 0, l, 47)
next
for l = 47 downto 0
grColor(l)
linespans(0, 0, 39, l)
next
ii = 2
ij = -1
i = 20
j = 10
^$C010
grDrawBuf(grPage2)
while ^$C000 < 128
grFill(k, k, @tile1)
grBLT(i, j, 8, 8, @sprite1)
grSwap
k++
i = i + ii
if i < -3 or i > 35
ii = -ii
fin
j = j + ij
if j < -3 or j > 43
ij = -ij
fin
loop
^$C010
grMode(grOff)
end
grTest
done