Converting .bmp in image.bin and pallete.bin

support for the ARM toolchain
Post Reply
Mariomaster
Posts: 1
Joined: Fri Nov 29, 2013 8:31 pm

Converting .bmp in image.bin and pallete.bin

Post by Mariomaster » Fri Nov 29, 2013 8:44 pm

(At first: Sorry if this in the wrong topic. I'm new here :) )

I want to display an image like this:

Code: Select all

#include <nds.h>

#include "drunkenlogo_bin.h"
#include "palette_bin.h"
......

videoSetMode(MODE_5_2D );

vramSetBankA(VRAM_A_MAIN_BG);

int bg3 = bgInit(3, BgType_Bmp8, BgSize_B8_256x256, 0,0);
	
dmaCopy(drunkenlogo_bin, bgGetGfxPtr(bg3), 256*256);
dmaCopy(palette_bin, BG_PALETTE, 256*2);
Every thing works fine, but now I want to replace the 2 files for pallete and image with my own ones. Anyone know how to do this?

(Plz don't say "Use the .grit stuff". I want to know how to convert .bmp to .bin)

Post Reply

Who is online

Users browsing this forum: No registered users and 13 guests