mirror of
https://github.com/irmen/prog8.git
synced 2024-11-26 11:49:22 +00:00
change sprite.hide() : now disables sprite instead of moving it offscreen.
added sprite.show() to re-enable it (with z-order 3, as all sprites have by default in this module) added sprite.zdepth() to set a custom z-depth.
This commit is contained in:
parent
2da35fec17
commit
b36e1e3baf
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user