Add SetFrame and SpriteJumpTable macros

This commit is contained in:
scawful
2024-12-13 10:16:04 -05:00
parent 82193a9003
commit 71f0471014

View File

@@ -46,6 +46,20 @@ macro GotoAction(action)
LDA.b #<action> : STA.w SprAction, X
endmacro
macro SetFrame(frame)
LDA.b #<frame> : STA.w SprFrame, X
endmacro
macro SpriteJumpTable(...)
LDA.w SprAction, X
JSL JumpTableLocal
!a #= 0
while !a < sizeof(...)
dw <...[!a]>
!a #= !a+1
endwhile
endmacro
; Increase the sprite frame every (frames_wait) frames
; reset to (frame_start) when reaching (frame_end)