Graphics/Backgrounds/16bit_color_bmp/source/template.cpp

#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();
        scanKeys();
        if (keysDown()&KEY_START) break;
    }
    return 0;
}
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines
Generated on Sat Oct 2 12:55:12 2010 for libnds by  doxygen 1.6.3