Original Post
🔒 Locked
GBA Sprites
Advertisement
The X coordinate of your sprite goes from 0 to 511 and the Y coordinate goes from 0 to 255. Whenever your sprite coordinate goes above 240 (x) or 160 (y) it is ''wrapped around'' to appear at the top / left of the screen.
So if you have a 32x32 sprite to put it in the upperleft corner of the screen set the coordinates to (511 - 16), (255 - 16) and you''ll only view the lower right part of the sprite.
The only problem you can run into is when you have a 64x64 sprite with the size double flag on (used in rotation). Then the sprite will be 128x128 pixels in size and it can''t wrap around completely. But that''s something you won''t often use so don''t worry about it. Good luck,
Jasper
So if you have a 32x32 sprite to put it in the upperleft corner of the screen set the coordinates to (511 - 16), (255 - 16) and you''ll only view the lower right part of the sprite.
The only problem you can run into is when you have a 64x64 sprite with the size double flag on (used in rotation). Then the sprite will be 128x128 pixels in size and it can''t wrap around completely. But that''s something you won''t often use so don''t worry about it. Good luck,
Jasper
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement