Tilemap (Updated.)
Posted: Tue Dec 01, 2009 8:11 pm
hey,
I searched for my question, and now i have more. This is my code (main.c):
My back.grit:
main.c in the map Source, and my back.grit in the map gfx(With back.png (256x256)).
I i go to cmd, and press make, i get errors:
Does anybody knows what i'm doing wrong?
Thank you,
Biertje
I searched for my question, and now i have more. This is my code (main.c):
Code: Select all
#include <nds.h>
#include "back.h"
int main(void) {
with background 0 active
videoSetMode(MODE_0_2D | DISPLAY_BG0_ACTIVE);
vramSetBankA(VRAM_A_MAIN_BG);
BGCTRL[0] = BG_TILE_BASE(0) | BG_MAP_BASE(4) | BG_COLOR_256 | TEXTBG_SIZE_256x256;
dmaCopy(backPal,BG_PALETTE,backPalLen);
dmaCopy(backTiles,(void *)CHAR_BASE_BLOCK(0),backTilesLen);
dmaCopy(backMap,(void *)SCREEN_BASE_BLOCK(4),backMapLen);
while(1) {
swiWaitForVBlank();
}
return 0;
}
Code: Select all
-gt
-mRtpf
-gB8
-mLs
I i go to cmd, and press make, i get errors:
Code: Select all
C:\devkitPro\project>make
main.c
arm-eabi-gcc -MMD -MP -MF /c/devkitPro/project/build/main.d -g -Wall -O2 -march=
armv5te -mtune=arm946e-s -fomit-frame-pointer -ffast-math -mthumb -mthumb-interw
ork -iquote /c/devkitPro/project/include -I/c/devkitPro/libnds/include -I/c/devk
itPro/project/build -DARM9 -c /c/devkitPro/project/source/main.c -o main.o
c:/devkitPro/project/source/main.c:3:18: error: back.h: No such file or director
y
c:/devkitPro/project/source/main.c: In function 'main':
c:/devkitPro/project/source/main.c:13: error: 'TEXTBG_SIZE_256x256' undeclared (
first use in this function)
c:/devkitPro/project/source/main.c:13: error: (Each undeclared identifier is rep
orted only once
c:/devkitPro/project/source/main.c:13: error: for each function it appears in.)
c:/devkitPro/project/source/main.c:18: error: 'backPal' undeclared (first use in
this function)
c:/devkitPro/project/source/main.c:18: error: 'backPalLen' undeclared (first use
in this function)
c:/devkitPro/project/source/main.c:19: error: 'backTiles' undeclared (first use
in this function)
c:/devkitPro/project/source/main.c:19: error: 'backTilesLen' undeclared (first u
se in this function)
c:/devkitPro/project/source/main.c:20: error: 'backMap' undeclared (first use in
this function)
c:/devkitPro/project/source/main.c:20: error: 'backMapLen' undeclared (first use
in this function)
make[1]: *** [main.o] Error 1
make: *** [build] Error 2
Thank you,
Biertje