|
Atari coding BBS
Re: Blitter skew register |
Posted by: ggn
|
Aug,03.2013-19:09
|
Okay, I'm not sure I understand what you wrote, but I'm going to give it a shot :).
First, what I understood: You have a sprite, say 8x8, which you want it to show up one column at at time rather than all of it directly. Let's say you want your sprite to appear at (x,y). What you'd like to do is to display your sprite's pixels from (7,0) to (7,7) at (x,y) in the first frame, then (6,0)-(7,7) at (x,y) in the second frame, and so on until you display the full sprite (0,0)-(7,7) at (x,y). If that doesn't sound similar to what you want to do you can safely ignore the rest of this post :).
The way I'm thinking about doing that is to have a 8x8 completely black space right next to the sprite and simply change the source addresses & skew to make it look like it's appearing column by column. I.e. the sprite would be 16x8 big and I'd simply blit (8,0)-(15,7) in the first frame, (7,0)-(14,7) in the second, and so on till it reaches (0,0)-(7,7). This would require slightly more complex calculation of the skew value, as we don't want to calculate it in reference to the top left pixel of the source data. The second thing that needs attention is to modify the endmasks so nothing outside the window we want to blit gets shown (for example if our destination x is 5, then endmask1 would have to be ($ffff left shifted by 5) and endmask3 ($ffff right shifted by 16-5-8=3).
(well, the bit about the endmasks above is slightly wrong because IIRC when you blit less than 3 words horizontally, endmasks get combined. I apologise but I'm typing this from memory - reading the blitter manual or a similar reference will clear things up!)
|
[All messages in this thread] [Start new thread]
What's the anti-troll code? That's your personal code to be able to add comments and messages on the dhs.nu site.
Don't have a code or forgot it? Fix it here.
|