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++ > Map + Sprite Initialization Question

#23269 - Ethos - Fri Jul 09, 2004 1:55 am

Please look at the demo:
http://www.student.cs.uwaterloo.ca/~jtmonagh/Blaster.bin

You can see (if you go frame by frame) the first the sprite is draw to the screen and then a partial tile set, then the rest of the tileset and then it orientates the VOFS and HOFS. Is there any way to load the whole tile set and sprites and then display to the screen.

I am mainly trying to get rid of the tile set initialization stuff that is going to the screen.

Thanks,

#23272 - DiscoStew - Fri Jul 09, 2004 2:55 am

I'm not quite sure about this, but have you tried enabling OBJ_ENABLE and BG0_ENABLE (or whatever backgrounds to be enabled) in REG_DISPCNT after all the background and sprite initializations? This could be a simple way if you are not worried about transitions. Now if you plan to do transitions like fading, you'll need to start using the REG_BLDMOD, REG_COLV and REG_COLY registers.
_________________
DS - It's all about DiscoStew

#23318 - Ethos - Fri Jul 09, 2004 8:38 pm

That gets rid of the map + sprite going to the scrren early.

The next problem is that there is a white blank screen while the tile set is loading. Is there anyway to make this screen black?

#23333 - DiscoStew - Sat Jul 10, 2004 12:44 am

It could be a Forced Blank, or maybe the frame buffers are cleared after your 2 image screens are shown (since in the demo the 1st palette is white), I not quite sure.
_________________
DS - It's all about DiscoStew

#23370 - Ethos - Sun Jul 11, 2004 4:40 am

Seems to be the latter, I just changed the 0 color for the palette to black and it works fine, thanks.