Code: Select all
videoSetMode(MODE_0_2D);
vramSetBankA(VRAM_A_MAIN_BG);
int bg = bgInit(a_priority, BgType_Text4bpp, BgSize_T_512x512, 0, 1);
dmaCopy(bg_rockfieldTiles, bgGetGfxPtr(bg), bg_rockfieldTilesLen);
dmaCopy(bg_rockfieldPal, BG_PALETTE, bg_rockfieldPalLen);
dmaCopy(bg_rockfieldMap, bgGetMapPtr(bg), bg_rockfieldMapLen);
# Set the warning/log level to 3
-W3
# Tell grit to include a palette (the first index in it will be transparent)
-p
# Tile the image
-gt
# Set the bit depth to 4 (16 colors)
-gB4
# Include map data
-m
The tiles are about 13k in size and the map is about 8k.
The BG should look like this:http://postimg.org/image/khi1h2s4j/
But in game it looks like this:http://postimg.org/image/xkdo0cicj/
Can somebody please help me see what I am overlooking? Thank You.