Add PlayAnimBackwards macro

This commit is contained in:
scawful
2024-11-28 17:52:02 -05:00
parent 425ec1d1e1
commit 58b66bc157

View File

@@ -59,6 +59,15 @@ macro PlayAnimation(frame_start, frame_end, frame_wait)
+
endmacro
macro PlayAnimBackwards(frame_start, frame_end, frame_wait)
LDA.w SprTimerB, X : BNE +
LDA.w SprFrame, X : DEC : STA.w SprFrame, X : CMP.b #<frame_end> : BCS .noframereset
LDA.b #<frame_start> : STA.w SprFrame, X
.noframereset
LDA.b #<frame_wait> : STA.w SprTimerB, X
+
endmacro
macro StartOnFrame(frame)
LDA.w SprFrame, x : CMP.b #<frame> : BCS +
LDA.b #<frame> : STA.w SprFrame, x