gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

C/C++ > question for irregular sizes

#12247 - ken2 - Wed Nov 05, 2003 4:38 pm

I know that for normal sizes you would have it set to SQUARE, and then SIZE_16 or however big it is for sprites, but how would you use one thats 16x17? RECTANGLE, I've seen used before, but I haven't found a good tutorial on irregular sizes for say, 20 width by 10 height.

#12253 - yaustar - Wed Nov 05, 2003 7:37 pm

sprite sizes I am assuming?

Basically the gba can handle numbers of the power of two (think binary)
You can have anything like 16x32 32x64 etc just use WIDE and/or LONG (I think) but you cannot have have sizes like 20x20 or 20x21 etc. If you want that then go one size higher and just make everything else clear.
_________________
[Blog] [Portfolio]

#12286 - johnny_north - Thu Nov 06, 2003 4:06 pm

I think yaustar gave the answer you were needed to the question: if you have graphic that is actually 16x17 just use one of 16x32, you?ll waste some space around the edges, but might be your only answer. However, if you just need a block graphic that is exactly 16x17, say a solid color or something, just to fit exactly into a space ? don?t forget about the sprite scaling options. Just scale the y a bit until your 16x16 sprite fills a 16x17 area.