mirror of
https://github.com/dschmenk/PLASMA.git
synced 2025-02-07 21:30:48 +00:00
pix7 clipping
This commit is contained in:
parent
fdcf4fc557
commit
1c39679540
@ -1,4 +1,7 @@
|
|||||||
import dcgrlib
|
import dcgrlib
|
||||||
|
const SCR_WIDTH7 = 20
|
||||||
|
const SCR_WIDTH = 140
|
||||||
|
const SCR_HEIGHT = 192
|
||||||
const OP_SRC = 0
|
const OP_SRC = 0
|
||||||
const OP_XOR = 1
|
const OP_XOR = 1
|
||||||
const OP_AND = 2
|
const OP_AND = 2
|
||||||
@ -21,14 +24,18 @@ import dcgrlib
|
|||||||
const DCLR_ACQUA = 14
|
const DCLR_ACQUA = 14
|
||||||
const DCLR_WHITE = 15
|
const DCLR_WHITE = 15
|
||||||
|
|
||||||
|
predef dcgrDivMod7(x)#2
|
||||||
|
predef dcgrDiv7(x)#1
|
||||||
predef dcgrColor(c)#0
|
predef dcgrColor(c)#0
|
||||||
predef dcgrPlot(x, y)#0
|
predef dcgrPlotScr(x, y)#0
|
||||||
predef dcgrHlin(x1, x2, y)#0
|
predef dcgrHlinScr(x1, x2, y)#0
|
||||||
predef dcgrVlin(y1, y2, x)#0
|
predef dcgrVlinScr(y1, y2, x)#0
|
||||||
predef dcgrPixBLT(x, y, w, h, pixptr)#0
|
predef dcgrPixBLTScr(x, y, w, h, pixptr)#0
|
||||||
predef dcgrBLTMem(x7, y, w7, h, dstptr)#0
|
predef dcgrScrBLTMem(x7, y, w7, h, dstptr, dstspan)#0
|
||||||
predef dcgrMemBLT(x7, y, w7, h, srcptr)#0
|
predef dcgrMemBLTScr(x7, y, w7, h, srcptr, srcspan)#0
|
||||||
|
predef dcgrFillScr(x7, y, w7, h)#0
|
||||||
predef dcgrVLB#0
|
predef dcgrVLB#0
|
||||||
predef dcgrOp(op)#0
|
predef dcgrOpScr(op)#0
|
||||||
|
predef dcgrAllocBLKMem(w, h)#3
|
||||||
predef dcgrMode(mode)
|
predef dcgrMode(mode)
|
||||||
end
|
end
|
||||||
|
@ -25,34 +25,36 @@ byte[] = $55,$55,$00,$00,$00,$00,$55,$55
|
|||||||
byte[] = $55,$55,$00,$00,$00,$00,$55,$55
|
byte[] = $55,$55,$00,$00,$00,$00,$55,$55
|
||||||
|
|
||||||
def dcgrTest#0
|
def dcgrTest#0
|
||||||
byte i, j, oi, oj, w7
|
word i, j, oi7, oj, backw7
|
||||||
word pixblk, inci, incj
|
word backblk, backspan, inci, incj
|
||||||
|
|
||||||
setlineplot(@dcgrPlot)
|
setlineplot(@dcgrPlotScr)
|
||||||
setlinespans(@dcgrHLin, @dcgrVLin)
|
setlinespans(@dcgrHLinScr, @dcgrVLinScr)
|
||||||
for i = 0 to 191 step 4
|
for i = 0 to 191 step 2
|
||||||
dcgrColor(i)
|
dcgrColor(i)
|
||||||
linespans(0, 0, 139, i)
|
linespans(0, 0, 139, i)
|
||||||
next
|
next
|
||||||
for i = 139 downto 0 step 4
|
for i = 139 downto 0 step 2
|
||||||
dcgrColor(i)
|
dcgrColor(i)
|
||||||
linespans(0, 0, i, 191)
|
linespans(0, 0, i, 191)
|
||||||
next
|
next
|
||||||
|
dcgrColor(DCLR_BLACK)
|
||||||
|
//dcgrFillScr(21/7, 30, 100/7, 132)
|
||||||
i = 86; j = 90
|
i = 86; j = 90
|
||||||
oi = i; oj = j
|
oi7 = i/7; oj = j
|
||||||
inci = 1; incj = 1
|
inci = 1; incj = 1
|
||||||
w7 = (16+13)/7
|
backblk, backspan, backw7 = dcgrAllocBLKMem(SCR_WIDTH, 16)
|
||||||
pixblk = heapalloc(w7*16)
|
dcgrScrBLTMem(0, j, backw7, 16, backblk, backspan)
|
||||||
dcgrBLTMem(i/7, j, w7, 16, pixblk)
|
|
||||||
while ^$C000 < 128
|
while ^$C000 < 128
|
||||||
dcgrMemBLT(oi/7, oj, w7, 16, pixblk)
|
dcgrMemBLTScr(oi7, oj, (16+14)/7, 16, backblk + oi7 * 4, backspan)
|
||||||
dcgrBLTMem(i/7, j, w7, 16, pixblk)
|
//dcgrFillScr(oi7, oj, (16+14)/7, 16)
|
||||||
dcgrPixBLT(i, j, 16, 16, @sprite)
|
dcgrPixBLTScr(i, j, 16, 16, @sprite)
|
||||||
oi = i; oj = j
|
oi7 = i/7; oj = j
|
||||||
if i > 125 or i < 2; inci = -inci; fin
|
//if i > 125 or i < 2; inci = -inci; fin
|
||||||
|
if i > 138 or i < -16; inci = -inci; fin
|
||||||
i = i + inci
|
i = i + inci
|
||||||
if j > 178 or j < 2; incj = -incj; fin
|
//if j > 178 or j < 2; incj = -incj; fin
|
||||||
j = j + incj
|
//j = j + incj
|
||||||
loop
|
loop
|
||||||
^$C010
|
^$C010
|
||||||
getc
|
getc
|
||||||
|
Loading…
x
Reference in New Issue
Block a user