1
0
mirror of https://github.com/dschmenk/PLASMA.git synced 2025-04-09 16:40:38 +00:00

Syntax updates

This commit is contained in:
David Schmenk 2024-09-15 15:26:26 -07:00
parent ff89556104
commit fee8eabd36
3 changed files with 57 additions and 57 deletions

View File

@ -8,30 +8,30 @@ import dcgrlib
const OP_XOR = 1
const OP_AND = 2
const OP_OR = 3
const DCLR_BLACK = 0
const DCLR_MAGENTA = 1
const DCLR_BROWN = 2
const DCLR_ORANGE = 3
const DCLR_DRKGREEN = 4
const DCLR_GREY1 = 5
const DCLR_XPARENT = 5
const DCLR_GREEN = 6
const DCLR_YELLOW = 7
const DCLR_DRKBLUE = 8
const DCLR_PURPLE = 9
const DCLR_GREY2 = 10
const DCLR_PINK = 11
const DCLR_MEDBLUE = 12
const DCLR_LTBLUE = 13
const DCLR_AQUA = 14
const DCLR_WHITE = 15
const CLR_BLACK = 0
const CLR_MAGENTA = 1
const CLR_BROWN = 2
const CLR_ORANGE = 3
const CLR_DRKGREEN = 4
const CLR_GREY1 = 5
const CLR_XPARENT = 5
const CLR_GREEN = 6
const CLR_YELLOW = 7
const CLR_DRKBLUE = 8
const CLR_PURPLE = 9
const CLR_GREY2 = 10
const CLR_PINK = 11
const CLR_MEDBLUE = 12
const CLR_LTBLUE = 13
const CLR_AQUA = 14
const CLR_WHITE = 15
predef dcgrColor(c)#0
predef dcgrPlot(x, y)#0
predef dcgrHLin(x1, x2, y)#0
predef dcgrVlin(y1, y2, x)#0
predef dcgrBitmap(x, y, bitw, bith, bitptr)#0
predef dcgrPixmap(x, y, pixw, pixh, pixptr)#0
predef dcgrVLin(y1, y2, x)#0
predef dcgrBitMap(x, y, bitw, bith, bitptr)#0
predef dcgrPixMap(x, y, pixw, pixh, pixptr)#0
predef dcgrScrBl7(x7, y, w7, h)#0
predef dcgrMemBl7(x7, y, w7, h, memptr, memspan)#0
predef dcgrClearBl7(x7, y, w7, h)#0

View File

@ -212,13 +212,13 @@ end
export asm dcgrHLin(x1, x2, y)#0
JMP $1000
end
export asm dcgrVlin(y1, y2, x)#0
export asm dcgrVLin(y1, y2, x)#0
JMP $1000
end
export asm dcgrBitmap(x, y, bitw, bith, bitptr)#0
export asm dcgrBitMap(x, y, bitw, bith, bitptr)#0
JMP $1000
end
export asm dcgrPixmap(x, y, pixw, pixh, pixptr)#0
export asm dcgrPixMap(x, y, pixw, pixh, pixptr)#0
JMP $1000
end
export asm dcgrScrBl7(x7, y, w7, h)#0
@ -545,7 +545,7 @@ asm _dcgrVLinScrB
BNE -
RTS
end
asm dcgrBitmapScr(x, y, bitw, bith, bitptr)#0
asm dcgrBitMapScr(x, y, bitw, bith, bitptr)#0
INX
INX
INX
@ -608,7 +608,7 @@ NXTBITS DEC ESTKL-4,X ; HEIGHT
BNE YBITS ; NEXT ROW
RETBITS RTS
end
asm dcgrPixmapScr(x, y, pixw, pixh, pixptr)#0
asm dcgrPixMapScr(x, y, pixw, pixh, pixptr)#0
INX
INX
INX
@ -925,7 +925,7 @@ asm _dcgrVLinMemB
BNE YVM
+ RTS
end
asm dcgrBitmapMem(x, y, bitw, bith, bitptr, memw, memh, memptr, memspan)#0
asm dcgrBitMapMem(x, y, bitw, bith, bitptr, memw, memh, memptr, memspan)#0
TXA
CLC
ADC #9
@ -1008,7 +1008,7 @@ NXTBITM CLC
BNE YBITM ; NEXT ROW
RETBITM RTS
end
asm dcgrPixmapMem(x, y, pixw, pixh, pixptr, memw, memh, memptr, memspan)#0
asm dcgrPixMapMem(x, y, pixw, pixh, pixptr, memw, memh, memptr, memspan)#0
TXA
CLC
ADC #9
@ -1700,10 +1700,10 @@ end
def extVLinMem#0
(@dcgrVLinMem)(surfPtr, surfSpan)#0
end
def extBitmapMem#0
def extBitMapMem#0
(@dcgrBitmapMem)(surfWidth, surfHeight, surfPtr, surfSpan)#0
end
def extPixmapMem#0
def extPixMapMem#0
(@dcgrPixmapMem)(surfWidth, surfHeight, surfPtr, surfSpan)#0
end
def extScrBl7Mem#0
@ -1806,18 +1806,18 @@ export def dcgrOp(op)#0
fin
end
export def dcgrSurfScr(op)#0
surfWidth = 140
surfWidth7 = 20
surfHeight = 192
surfPtr = $2000
surfSpan = 40
surfWidth = 140
surfWidth7 = 20
surfHeight = 192
surfPtr = $2000
surfSpan = 40
if dcgrSurface == DST_MEMORY
dcgrSurface = DST_SCREEN
dcgrPlot:1 = @dcgrPlotScr
dcgrHLin:1 = @dcgrHLinScr
dcgrVLin:1 = @dcgrVLinScr
dcgrBitmap:1 = @dcgrBitmapScr
dcgrPixmap:1 = @dcgrPixmapScr
dcgrBitMap:1 = @dcgrBitMapScr
dcgrPixMap:1 = @dcgrPixMapScr
dcgrMemBl7:1 = @dcgrMemBl7Scr
dcgrClearBl7:1 = @dcgrClearBl7Scr
fin
@ -1827,18 +1827,18 @@ export def dcgrSurfScr(op)#0
fin
end
export def dcgrSurfMem(op, memh, memptr, memspan)#0
surfWidth7 = memspan >> 2
surfWidth = surfWidth7 * 7
surfHeight = memh
surfPtr = memptr
surfSpan = memspan
surfWidth7 = memspan >> 2
surfWidth = surfWidth7 * 7
surfHeight = memh
surfPtr = memptr
surfSpan = memspan
if dcgrSurface == DST_SCREEN
dcgrSurface = DST_MEMORY
dcgrPlot:1 = @extPlotMem
dcgrHLin:1 = @extHLinMem
dcgrVLin:1 = @extVLinMem
dcgrBitmap:1 = @extBitmapMem
dcgrPixmap:1 = @extPixmapMem
dcgrBitMap:1 = @extBitMapMem
dcgrPixMap:1 = @extPixMapMem
dcgrScrBl7:1 = @extScrBl7Mem
dcgrMemBl7:1 = @extMemBl7Mem
dcgrClearBl7:1 = @extClearBl7Mem

View File

@ -189,7 +189,7 @@ def dcgrBoldStr(x, y, strptr)#0
dcgrStr(h, v, strptr)
next
next
dcgrColor(DCLR_BLACK)
dcgrColor(CLR_BLACK)
dcgrStr(x, y, strptr)
end
def dcgrRect(x, y, w, h)#0
@ -214,15 +214,15 @@ def compileSprite#0
sprite7msk[i], sprite7span = dcgrAllocBl7Mem(SPR_WIDTH, SPR_HEIGHT)
sprite7w = sprite7span >> 2
dcgrSurfMem(OP_SRC, SPR_HEIGHT, sprite7[i], sprite7span)
dcgrColor(DCLR_BLACK)
dcgrColor(CLR_BLACK)
dcgrClearBl7(0, 0, sprite7w, SPR_HEIGHT)
dcgrPixmap(i + 2, 0, SPR_WIDTH, SPR_HEIGHT, @sprite)
dcgrPixMap(i + 2, 0, SPR_WIDTH, SPR_HEIGHT, @sprite)
dcgrSurfMem(OP_SRC, SPR_HEIGHT, sprite7msk[i], sprite7span)
dcgrColor(DCLR_WHITE)
dcgrColor(CLR_WHITE)
dcgrClearBl7(0, 0, sprite7w, SPR_HEIGHT)
dcgrPixmap(i + 2, 0, SPR_WIDTH, SPR_HEIGHT, @sprite)
dcgrPixMap(i + 2, 0, SPR_WIDTH, SPR_HEIGHT, @sprite)
dcgrOp(OP_XOR)
dcgrPixmap(i + 2, 0, SPR_WIDTH, SPR_HEIGHT, @sprite)
dcgrPixMap(i + 2, 0, SPR_WIDTH, SPR_HEIGHT, @sprite)
dcgrSurfScr(OP_SRC)
dcgrMemBl7(0, i * SPR_HEIGHT, sprite7w, SPR_HEIGHT, sprite7[i], sprite7span)
dcgrMemBl7(sprite7w, i * SPR_HEIGHT, sprite7w, SPR_HEIGHT, sprite7msk[i], sprite7span)
@ -245,9 +245,9 @@ def dcgrTest#0
dcgrColor(i)
linespans(0, 0, i, 191)
next
dcgrColor(DCLR_BLACK)
dcgrColor(CLR_BLACK)
dcgrClearBl7(21/7, 30, 100/7, 132)
dcgrColor(DCLR_WHITE)
dcgrColor(CLR_WHITE)
dcgrHLin((21/7)*7-1, (21/7)*7+(100/7)*7, 29)
dcgrHLin((21/7)*7-1, (21/7)*7+(100/7)*7, 29+133)
dcgrVLin(29, 29+133, (21/7)*7-1)
@ -294,23 +294,23 @@ def dcgrTest#0
break
is 3
dcgrSurfScr(OP_SRC)
dcgrPixmap(i, j, SPR_WIDTH, SPR_HEIGHT, @sprite)
dcgrPixMap(i, j, SPR_WIDTH, SPR_HEIGHT, @sprite)
is 4
dcgrSurfMem(OP_SRC, SPR_HEIGHT, restrblk, restrspan)
dcgrMemBl7(0, 0, restr7w, SPR_HEIGHT, backblk + (k7 << 1), backspan)
dcgrPixmap(km7 + 2, 0, SPR_HEIGHT, SPR_HEIGHT, @sprite)
dcgrPixMap(km7 + 2, 0, SPR_HEIGHT, SPR_HEIGHT, @sprite)
dcgrSurfScr(OP_SRC)
dcgrMemBl7(k7, SLIDE_Y, restr7w, SPR_HEIGHT, restrblk, restrspan)
break
is 5
dcgrSurfScr(OP_SRC)
dcgrPixmap(i, j, SPR_WIDTH, SPR_HEIGHT, @sprite)
dcgrPixMap(i, j, SPR_WIDTH, SPR_HEIGHT, @sprite)
is 6
dcgrSurfMem(OP_SRC, SPR_HEIGHT, restrblk, restrspan)
dcgrMemBl7(0, 0, restr7w, SPR_HEIGHT, backblk + (k7 << 1), backspan)
dcgrColor(DCLR_BLACK)
dcgrColor(CLR_BLACK)
dcgrRect(km7 + 2, 3, 14 + 2, 10)
dcgrColor(DCLR_WHITE)
dcgrColor(CLR_WHITE)
dcgrStr(km7 + 3, 4, "DC")
dcgrSurfScr(OP_SRC)
dcgrMemBl7(k7, SLIDE_Y, restr7w, SPR_HEIGHT, restrblk, restrspan)
@ -321,7 +321,7 @@ def dcgrTest#0
break
is 8
dcgrSurfScr(OP_SRC)
dcgrPixmap(i, j, SPR_WIDTH, SPR_HEIGHT, @sprite)
dcgrPixMap(i, j, SPR_WIDTH, SPR_HEIGHT, @sprite)
break
wend
if k > 136 or k < -16; inck = -inck; fin