diff --git a/compiler/res/prog8lib/cx16/sprites.p8 b/compiler/res/prog8lib/cx16/sprites.p8 index 0723fbdc9..d89f16b20 100644 --- a/compiler/res/prog8lib/cx16/sprites.p8 +++ b/compiler/res/prog8lib/cx16/sprites.p8 @@ -138,7 +138,15 @@ sprites { } sub hide(ubyte spritenum) { - pos(spritenum, -64, -64) + cx16.vpoke_and(1, VERA_SPRITEREGS + 6 + spritenum*$0008, %11110011) + } + + sub show(ubyte spritenum) { + cx16.vpoke_or(1, VERA_SPRITEREGS + 6 + spritenum*$0008, %00001100) + } + + sub zdepth(ubyte spritenum, ubyte depth) { + cx16.vpoke_mask(1, VERA_SPRITEREGS + 6 + spritenum*$0008, %11110011, depth<<2) } sub flipx(ubyte spritenum, bool flipped) {