Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Here's the source code;
- //---------------------------------------------------------------------------------
- #include <nds.h>
- #include <stdio.h>
- //Include the font header generated by grit
- #include "font.h"
- //---------------------------------------------------------------------------------
- int main(void) {
- //---------------------------------------------------------------------------------
- const int tile_base = 0;
- const int map_base = 20;
- videoSetModeSub(MODE_0_2D);
- vramSetBankC(VRAM_C_SUB_BG);
- PrintConsole *console = consoleInit(0,0, BgType_Text4bpp, BgSize_T_256x256, map_base, tile_base, false, false);
- consoleInit(&topScreen);
- ConsoleFont font;
- font.gfx = (u16*)fontTiles;
- font.pal = (u16*)fontPal;
- font.numChars = 95;
- font.numColors = fontPalLen / 2;
- font.bpp = 4;
- font.asciiOffset = 32;
- font.convertSingleColor = false;
- consoleSetFont(console, &font);
- consoleSelect(&topScreen);
- iprintf(" ~ReadMii~ [Ver. 1.0]\n");
- iprintf(" Last edited on: 9/8/2019\n");
- iprintf(" About the DS Download Station:\n");
- iprintf(" After you turn off you system,\n");
- iprintf(" Or return to the HOME Menu, you\n");
- iprintf(" will need to download the\n");
- iprintf(" content again. Also, any Games,\n");
- iprintf(" Apps, or other content won't be\n");
- iprintf(" able to save. \n");
- while(1) {
- swiWaitForVBlank();
- scanKeys();
- int keys = keysDown();
- if(keys & KEY_START) break;
- }
- return 0;
- }
- and here's what msys2 barfs up when I try to compile it:
- main.c
- arm-none-eabi-gcc -MMD -MP -MF /c/DS_Brew_Projects/DSDL_ReadMii/build/main.d -g -Wall -O2 -march=armv5te -mtune=arm946e-s -fomit-frame-pointer -ffast-math -mthumb -mthumb-interwork -I/c/DS_Brew_Projects/DSDL_ReadMii/include -I/opt/devkitpro/libnds/include -I/c/DS_Brew_Projects/DSDL_ReadMii/build -DARM9 -c /c/DS_Brew_Projects/DSDL_ReadMii/source/main.c -o main.o
- C:/DS_Brew_Projects/DSDL_ReadMii/source/main.c: In function 'main':
- C:/DS_Brew_Projects/DSDL_ReadMii/source/main.c:22:18: error: 'topScreen' undeclared (first use in this function)
- 22 | consoleInit(&topScreen);
- | ^~~~~~~~~
- C:/DS_Brew_Projects/DSDL_ReadMii/source/main.c:22:18: note: each undeclared identifier is reported only once for each function it appears in
- C:/DS_Brew_Projects/DSDL_ReadMii/source/main.c:22:5: error: too few arguments to function 'consoleInit'
- 22 | consoleInit(&topScreen);
- | ^~~~~~~~~~~
- In file included from C:/devkitPro/libnds/include/nds.h:257,
- from C:/DS_Brew_Projects/DSDL_ReadMii/source/main.c:2:
- C:/devkitPro/libnds/include/nds/arm9/console.h:220:15: note: declared here
- 220 | PrintConsole* consoleInit(PrintConsole* console, int layer, BgType type, BgSize size, int mapBase, int tileBase, bool mainDisplay, bool loadGraphics);
- | ^~~~~~~~~~~
- make[1]: *** [/opt/devkitpro/devkitARM/base_rules:85: main.o] Error 1
- make: *** [Makefile:110: build] Error 2
Add Comment
Please, Sign In to add comment