mirror of
https://github.com/irmen/prog8.git
synced 2024-12-01 15:52:54 +00:00
sprites.get_data_ptr() signature changed: now properly returns the 2 values
This commit is contained in:
parent
4f8aaf9244
commit
8efa89165c
@ -42,9 +42,15 @@ sprites {
|
|||||||
cx16.vpoke_mask(1, sprite_reg+1, %11110000, msb(addr)) ; address 16:13
|
cx16.vpoke_mask(1, sprite_reg+1, %11110000, msb(addr)) ; address 16:13
|
||||||
}
|
}
|
||||||
|
|
||||||
sub get_data_ptr(ubyte spritenum) {
|
inline asmsub get_data_ptr(ubyte spritenum @A) -> ubyte @R1, uword @R0 {
|
||||||
; -- returns the VRAM address where the sprite's bitmap data is stored
|
; -- returns the VRAM address where the sprite's bitmap data is stored
|
||||||
; R1 (byte) = the vera bank (0 or 1), R0 (word) = the address.
|
; R1 (byte) = the vera bank (0 or 1), R0 (word) = the address.
|
||||||
|
%asm {{
|
||||||
|
jsr p8b_sprites.p8s_get_data_ptr_internal
|
||||||
|
}}
|
||||||
|
}
|
||||||
|
|
||||||
|
sub get_data_ptr_internal(ubyte spritenum) {
|
||||||
sprite_reg = VERA_SPRITEREGS + spritenum*$0008
|
sprite_reg = VERA_SPRITEREGS + spritenum*$0008
|
||||||
cx16.r0L = cx16.vpeek(1, sprite_reg)
|
cx16.r0L = cx16.vpeek(1, sprite_reg)
|
||||||
cx16.r0H = cx16.vpeek(1, sprite_reg+1)
|
cx16.r0H = cx16.vpeek(1, sprite_reg+1)
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
TODO
|
TODO
|
||||||
====
|
====
|
||||||
|
|
||||||
|
docs: stress more that the @split for word arrays can provide significant code efficiency over normal linear word array
|
||||||
|
|
||||||
optimizer bug, see "optimizing inlined functions must reference proper scopes" unittest (skipped for now)
|
optimizer bug, see "optimizing inlined functions must reference proper scopes" unittest (skipped for now)
|
||||||
causes compiler error for virtual: just calling txt.cls() gives compile error undefined symbol clear_screen
|
causes compiler error for virtual: just calling txt.cls() gives compile error undefined symbol clear_screen
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user