Top Screen to bottom Screen

Post Reply
cixxx
Posts: 4
Joined: Thu Feb 04, 2010 2:23 pm

Top Screen to bottom Screen

Post by cixxx » Thu Feb 04, 2010 11:21 pm

I really got stucked, how do i get the .png file in this example from the top screen to the bottem screen? i already tried changing the videoSetMode to sub and changing the A rambank to C sub but both with no effect? Of course it works with lcdMainOnBottom(), but thats not what i want.

Code: Select all

#include <nds.h>
#include <stdio.h>


// git outputs a nice header to reference data
#include "drunkenlogo.h"

int main(void) {

    // set the mode for 2 text layers and two extended background layers
	videoSetMode(MODE_5_2D);

	// set the sub background up for text display (we could just print to one
	// of the main display text backgrounds just as easily
	videoSetModeSub(MODE_0_2D); //sub bg 0 will be used to print text

	vramSetBankA(VRAM_A_MAIN_BG);

	consoleDemoInit();

	iprintf("\n\n\tHello DS devers\n");
	iprintf("\twww.drunkencoders.com\n");
	iprintf("\t16 bit bitmap demo");

	// set up our bitmap background
	bgInit(3, BgType_Bmp16, BgSize_B16_256x256, 0,0);
	
	decompress(drunkenlogoBitmap, BG_GFX,  LZ77Vram);
	
	while(1) {
		swiWaitForVBlank();
	}
	return 0;
}

User avatar
vuurrobin
Posts: 219
Joined: Fri Jul 11, 2008 8:49 pm
Location: The Netherlands
Contact:

Re: Top Screen to bottom Screen

Post by vuurrobin » Fri Feb 05, 2010 9:42 am

have you used bgInitSub() and have you decompressed the image to the right place (BG_GFX_SUB, I think)?

cixxx
Posts: 4
Joined: Thu Feb 04, 2010 2:23 pm

Re: Top Screen to bottom Screen

Post by cixxx » Fri Feb 05, 2010 11:07 am

Thx for your help, working now, i forgot to add the SUB after BG_GFX, how stupid :-D

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests