1
0
mirror of https://github.com/dschmenk/PLASMA.git synced 2025-01-08 22:30:48 +00:00

Add explicit undrawList calls

This commit is contained in:
David Schmenk 2020-01-03 07:57:26 -08:00
parent d74ccc22fb
commit b2eaa867eb
2 changed files with 26 additions and 0 deletions

View File

@ -9,6 +9,8 @@ import hgrsprite
predef spriteUnDrawXor(sprtptr)#0
predef spritePos(x, y, sprtptr)#0
predef spritePosIndex(x, y, i)#0
predef spriteUnDrawList#0
predef spriteUnDrawXorList#0
predef spriteDrawList#0
predef spriteDrawXorList#0
predef spriteAdd(i, sprtptr)#1

View File

@ -260,6 +260,18 @@ export def spritePosIndex(x, y, i)#0
drawList[i]=>s_xpos = x - drawList[i]->s_xcenter
fin
end
export def spriteUnDrawList#0
byte i
var undrawptr
undrawptr = undrawList[drawpage]
for i = 15 downto 0
if undrawptr=>[i]
spriteUnDraw(undrawptr=>[i])
undrawptr=>[i] = 0
fin
next
end
export def spriteDrawList#0
byte i
var undrawptr
@ -277,6 +289,18 @@ export def spriteDrawList#0
next
memcpy(undrawptr, @drawList, 16*2)
end
export def spriteUnDrawXorList#0
byte i
var undrawptr
undrawptr = undrawList[drawpage]
for i = 0 to 15
if undrawptr=>[i]
spriteUnDrawXor(undrawptr=>[i])
undrawptr=>[i] = 0
fin
next
end
export def spriteDrawXorList#0
byte i
var undrawptr