2024-02-18 12:09:13 +00:00
|
|
|
/*------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
MFC NDS Conbadge
|
|
|
|
Kitsch 2024
|
|
|
|
|
|
|
|
|
|
|
|
------------------------------------------------------------------------------*/
|
2024-02-19 05:10:01 +00:00
|
|
|
#include <stdio.h>
|
2024-02-18 12:09:13 +00:00
|
|
|
|
|
|
|
#include <nds.h>
|
2024-02-19 05:10:01 +00:00
|
|
|
#include <filesystem.h>
|
2024-02-18 12:09:13 +00:00
|
|
|
|
2024-02-19 05:10:01 +00:00
|
|
|
#include <nf_lib.h>
|
2024-02-18 12:09:13 +00:00
|
|
|
|
2024-02-19 05:10:01 +00:00
|
|
|
int main(int argc, char **argv) {
|
2024-02-18 12:09:13 +00:00
|
|
|
|
2024-02-19 05:10:01 +00:00
|
|
|
//prepare a NitroFS initialization screen
|
|
|
|
NF_Set2D(0, 0);
|
|
|
|
NF_Set2D(1, 0);
|
|
|
|
consoleDemoInit();
|
|
|
|
printf("\n NitroFS init. Please Wait.\n\n");
|
|
|
|
swiWaitForVBlank();
|
2024-02-18 12:09:13 +00:00
|
|
|
|
2024-02-19 05:10:01 +00:00
|
|
|
//initialize NitroFS and set it as the root folder of the filesystem
|
|
|
|
nitroFSInit(NULL);
|
|
|
|
NF_SetRootFolder("NITROFS");
|
2024-02-18 12:09:13 +00:00
|
|
|
|
2024-02-19 05:10:01 +00:00
|
|
|
//initialize 2D engine in both screens and use mode 5
|
|
|
|
NF_Set2D(0, 5);
|
|
|
|
NF_Set2D(1, 5);
|
2024-02-18 12:09:13 +00:00
|
|
|
|
2024-02-19 05:10:01 +00:00
|
|
|
//initialize bitmap backgrounds system
|
|
|
|
NF_InitBitmapBgSys(0, 1);
|
|
|
|
NF_InitBitmapBgSys(1, 1);
|
2024-02-18 12:09:13 +00:00
|
|
|
|
2024-02-19 05:10:01 +00:00
|
|
|
//initialize storage buffers
|
|
|
|
NF_Init16bitsBgBuffers();
|
|
|
|
|
|
|
|
//load bitmap background files from NitroFS
|
|
|
|
NF_Load16bitsBg("bmp/badge_01", 0);
|
2024-02-18 12:09:13 +00:00
|
|
|
|
2024-02-19 05:10:01 +00:00
|
|
|
//transfer image to VRAM of both screens
|
|
|
|
NF_Copy16bitsBuffer(0, 0, 0);
|
|
|
|
NF_Copy16bitsBuffer(1, 0, 0);
|
2024-02-18 12:09:13 +00:00
|
|
|
|
2024-02-19 05:10:01 +00:00
|
|
|
//it'se not needed anymore so remove it from RAM
|
|
|
|
NF_Unload16bitsBg(0);
|
|
|
|
|
|
|
|
while (1) {
|
|
|
|
swiWaitForVBlank();
|
2024-02-18 12:09:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|