Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; subtract 5/8 of a screen if facing left or 3/8 if facing right
- ldy PlayerDir ; 0 if right, 1 if left
- lda PlayerPositionX+0
- sub SubtractForDirectionsLow,y
- sta Temp+0
- lda PlayerPositionX+1
- sbc SubtractForDirectionsHigh,y
- sta Temp+1
- ; subtract the current camera position
- lda Temp+0
- sub ScrollX+0
- sta Temp+0
- lda Temp+1
- sbc ScrollX+1
- sta Temp+1
- ; divide by 4
- lsr Temp+1
- rol Temp+0
- lsr Temp+1
- rol Temp+0
- ; add the current camera position.
- lda Temp+0
- add ScrollX+0
- sta ScrollX+0
- lda Temp+1
- adc ScrollX+1
- sta ScrollX+1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement