Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //A procedure that moves a <sprite> to
- // <position y> (Y) and <position x> (X).
- .macro moveSprite(sprite) {
- .const xReg = [VIC.SPRITE_0_X + [sprite * 2]]
- .const yReg = [xReg + 1]
- lda VIC.SPRITE_X_MSB
- bcs setMSB
- and #[[1 << sprite] ^ $ff]
- bcc store
- setMSB:
- ora #[1 << sprite]
- store:
- sta VIC.SPRITE_X_MSB
- stx xReg
- sty yReg
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement