|
Atari coding BBS
Re: Atari ST Graphics |
Posted by: Bod/STAX
|
Mar,18.2014-11:16
|
Bitplanes are complicated to understand if you're new to programming graphics on the ST due to the interleaved display.
Here's how the screen is layed out (starting at the top left):
The 1st word contains the information for the first 16 pixels of plane 1
The 2nd word contains the information for the first 16 pixels of plane 2
The 3rd word contains the information for the first 16 pixels of plane 3
The 4th word contains the information for the first 16 pixels of plane 4
Then the screen continues thus:
The 5th word contains the information for the second 16 pixels of plane 1
The 6th word contains the information for the second 16 pixels of plane 2
The 7th word contains the information for the second 16 pixels of plane 3
The 8th word contains the information for the second 16 pixels of plane 4
And so on...
Your can only increment or decrement a sprite by 8 bytes (16 pixels) at a time horizontally (vertically just increment 160 bytes and everything works OK). To move a sprite pixel-wise you'll need to code complex shifting routines if you're going to do it realtime, or (the most common method) is to preshift your sprites (having 16 copies of your sprites each copy shifted one pixel to the right). If your coding sprites on the STE just use the STE's blitter chip as this will take care off all the shifting for you.
|
[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.
|