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++ > Problem with sprite sizes

#1712 - np_soft - Tue Jan 21, 2003 10:05 pm

Hi, i'm programming a game in C++ for GBA that uses both 16x16 sprites and 8x8 sprites.
The problem is, when I define an 8x8 sprite, it's drawn as 16x16,
I also tested this with 32x32 and 64x64 and the 32x23 is drawn as 64x64?

If anyone can help me with this problem please reply.. thanks

This is what I defined as my sizes so far.
#define SIZE_8 0x0
#define SIZE_16 0x4000
#define SIZE_32 0x8000
#define SIZE_64 0xC000
and size is being defied in attribute1

Thanks,
Edmund

#1719 - tepples - Tue Jan 21, 2003 10:37 pm

Perhaps your header file is setting bit 14 for some other attribute that you're ORing into the mix.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#1721 - np_soft - Tue Jan 21, 2003 11:00 pm

Yep you were right!

Thanks for the help!
Greatly appreciated!
I was adding more junk to attrib1 that screwed everything up.

Thanks again,
Edmund