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.

Graphics > Graphic problem with the tiles

#11245 - ken2 - Tue Sep 30, 2003 12:49 am

I was loading a homebrew file with tile and map data, and the map data seems to be working properly, but everytime I try to turn the bmp tiledata into the .h for the binary file, the map data works fine, but the tiles are messed up. I used bmp2spr (got it from the tools page on this site) on a bmp file. But when i loaded the tileset from another person's rom (gbajunkie's background things), it worked perfectly. Are the colors im using not supported? Just in case though, could someone give me a tutorial on turning a bmp into a .h file, i never really understood.

#11247 - XeroxBoy - Tue Sep 30, 2003 2:05 am

I've never used BMP2SPR, but I can take a guess - is your bitmap 256 colours?

#11248 - ken2 - Tue Sep 30, 2003 2:19 am

I think so. But it only used 6. Is there a bug with using them?

#11251 - XeroxBoy - Tue Sep 30, 2003 3:34 am

No, it's just that your bitmap needs to be in 256 color format in order for BMP2SPR to work. Try to make sure yours is in the correct format (you can do it mathematically by doing (Height*Width)/1024 - if that equals your file size in KB, approximately, than it's fine).

As to converting to a .H file, I generally use CoG, but that's not free anymore as far as I can tell, so I'd recommend Dovoto's PCX2sprite and PCX2GBA, which you can get at www.thepernproject.com. They're basic, but they work fine. Unless, of course, you find that your bitmap is in 24-bit colour and it works when you convert it, in which case you might be best off sticking with what you're familiar with.

#11252 - ken2 - Tue Sep 30, 2003 4:23 am

Hey, it worked, thanks! I was thinking that bmp2spr didnt work for a second, but its fine lol.