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.

DS development > Moving from PAlib to straight libnds, help with screen

#132711 - chuckstudios - Thu Jun 28, 2007 9:40 pm

Hey, I'm trying to stop using PAlib, and I wanted to play around a bit with graphics. The devkitPro example "16bit_color_bmp" works fine, and I have put in my own graphics with git, etc. However, I want to know how to change the screen the bitmap is displayed on. While the source has some comments, it does not detail how to do this. Any help would be appreciated.

#132716 - Lick - Thu Jun 28, 2007 10:00 pm

"Change" the screen the bitmap is displayed on?
_________________
http://licklick.wordpress.com

#132717 - Quirky - Thu Jun 28, 2007 10:01 pm

You should change BG_GFX to BG_GFX_SUB (or is it SUB_BG_GFX? I can never remember, the naming scheme seems random: SUB_BG0_CR, but BG_PALETTE_SUB for example). Also the sub screen is set up for text in the demo. Basically all non-SUB registers should become SUB ones and vice versa, remembering to change the video banks accordingly.

A call to lcdSwap() is easier, but that is probably not what you wanted ;-)