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.

Beginners > Converting to a text background

#54966 - blacksun - Fri Sep 23, 2005 11:07 pm

I have tried most of the tools on the website to find one that would convert a 240x160 bitmap into a text background. Is this possible or do I have to change it to a larger bitmap first.

My problem is I need to use Mode 1 for my game, but I have premade 240x160 bitmaps that I use as the title screens and menus. Since there doesn't seem to be a way to change video modes, I will have to use Mode 1 for everything. So if anyone could tell me the proper way I should go about this or there is some voodoo magic to change modes, please let me know.

#54969 - ScottLininger - Fri Sep 23, 2005 11:31 pm

You can fade your palette to black, then set your background mode to whatever you want (say, mode 3 or 4). Draw the bitmap and fade back in again.

But yes, you could also convert your bitmaps to be text tiles, and draw them all in the right spot to build your master image. What do you need to know about this? If you've already mastered converting graphics into tiles for your game, you should have a good start on accomplishing this trick.

-Scott Lininger

#54971 - blacksun - Fri Sep 23, 2005 11:37 pm

I can load in tiled text and rot backgrounds just fine. But that is only if I create them in a map editor. What I am trying to do is load a premade bitmap, through photoshop/paint, into a converter that gives me map, palette, and tile data for the background. Although I think at this time it will just be easier to figure out how to switch modes.

I will try what you suggested. Before I was just fading the screen to black, changing modes, then loading up the background. That caused some interesting results, such as half of the background drawing and the other half was left over garbage. Now if they use the same palette, do I just fade the palette to black, switch mode, reload the palette and then load my background?

#54978 - blacksun - Sat Sep 24, 2005 1:59 am

Ok, I was able to get the modes going from 3 to 4, and now working on 4 to 3. A little more difficult that way but I plan to figure it out. Next step is Mode 1 then I won't have to worry about converting a bitmap.

#54987 - tepples - Sat Sep 24, 2005 5:05 am

Tetanus On Drugs has code to convert a 16-color .bmp file to mode 0 palette and tile data (bmp2bg.c) and code to load a bitmap
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#54995 - headspin - Sat Sep 24, 2005 9:29 am

Since that not everyone has the setup to compile Tepple's tools, as they are only provided in source form...

There is always gfx2gba which supports optimization, so repeating tiles only take one tile of memory space. It also can do 4 or 8 bit color tile conversion, as well as creating the map, tile and palette data so you can DMACopy() directly to VRAM, which is much quicker than using a loop.
_________________
Warhawk DS | Manic Miner: The Lost Levels | The Detective Game