Background, Sprites and Consoles?

Post Reply
samoates1112
Posts: 3
Joined: Wed Jun 09, 2010 11:36 am

Background, Sprites and Consoles?

Post by samoates1112 » Wed Jun 09, 2010 11:11 pm

Can we have all three at the same time?

If so how?

I've been trying for about a week now and just cant do it, i can have console and sprite, or sprite and background, but not all three...

I've searched the forums, and found a post but its like 2 - 3 years old, and there code doesn't seem to work with the latest libnds ( even with changes so function params match)

Thanks in Advance

Yours
Sam

relminator
Posts: 84
Joined: Sun Apr 11, 2010 10:43 am

Re: Background, Sprites and Consoles?

Post by relminator » Thu Jun 10, 2010 12:52 am

There's an example of it on the /backgrounds section of the example files.

samoates1112
Posts: 3
Joined: Wed Jun 09, 2010 11:36 am

Re: Background, Sprites and Consoles?

Post by samoates1112 » Thu Jun 10, 2010 11:57 am

I presume you mean the all in one example?

if so, when i compile it and run it noting happens, it just says state "x" selected, and shows a white screen...

Yours
Sam

samoates1112
Posts: 3
Joined: Wed Jun 09, 2010 11:36 am

Re: Background, Sprites and Consoles?

Post by samoates1112 » Thu Jun 10, 2010 3:12 pm

Right, Realised i was being an idiot with the all in one example, but none of them have a console over a background, so if you could point me to the exact example, cos I can't find it anywhere...

anyways, decided to make a seporate project so i can get this working, so this is the code I have so far...

Code: Select all

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

#include "highscores.h"

int main( void ) 
{
	videoSetMode( MODE_5_2D );
	vramSetBankA( VRAM_A_MAIN_BG );
	
	bgInit( 3, BgType_Bmp16, BgSize_B16_256x256, 0, 0 );	
	decompress( highscoresBitmap, BG_GFX, LZ77Vram );
 
	PrintConsole TopConsole;
	consoleInit( &TopConsole, 0, BgType_Text4bpp, BgSize_T_256x256, 0, 0, true, true );
	iprintf( "\n\n\n\n\n       This is Some Text" );

	while( true )
	{
		swiWaitForVBlank();
	}	
	return 0;
}

Which works, badly... the background image has white lines through it and is blurry.

any help is good help :)

yours
Sam

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 2 guests