; @param 1 x value, can be address lookup ; @param 2 y value, can be address lookup ; @param 3 write location, sprite header ; @side-effect destroys D1,D2,advances write position SetSPRPOS MACRO MOVEQ #0,D1 MOVE.W \2,D1 AND.W #$FF,D1 LSL.W #8,D1 MOVE.W \1,D2 AND.W #$1FE,D2 LSR.W #1,D2 ADD.W D2,D1 MOVE.W D1,(\3)+ ENDM ; @param 1 x value, can be address lookup ; @param 2 y value, can be address lookup ; @param 3 y stop value, can be address lookup ; @param 4 1 if attached, 0 if not ; @param 5 write location, sprite header ; @side-effect destroys D1,D2,advances write position SetSPRCTL MACRO MOVEQ #0,D1 MOVE.W \3,D1 AND.W #$FF,D1 LSL.W #8,D1 MOVE.W \2,D2 AND.W #$100,D2 LSR.W #6,D2 ADD.W D2,D1 MOVE.W \3,D2 AND.W #$100,D2 LSR.W #7,D2 ADD.W D2,D1 MOVE.W \1,D2 AND.W #$1,D2 ADD.W D2,D1 MOVE.W #\4,D2 LSL.W #7,D2 ADD.W D2,D1 MOVE.W D1,(\5)+ ENDM