#88704 - Onions - Wed Jun 21, 2006 3:21 am
I wanted to use the framebuffer mode for both screens, but found out only 1 screen can be used at a time. So I then (after searching these forums) found out that MODE_5_2D is the next best thing. The thing is, it won't read my converted image files and only seems to take what I believe is hexidecimal (such as 0xFFFF - however, it will not show the color red... or aka 0x00FF, which I find bizarre).
So what do I have to do to be able to read outputted files from gfx2gba that I'm currently using to convert my bmps?
Must I use a palatte? Because I'm currently not, nor do I know how. My code can be found below (very simple start up code that I needed to to get right before moving on). If anyone wants to edit it so it can read my bitmap array, I'd appreciate it.
So what do I have to do to be able to read outputted files from gfx2gba that I'm currently using to convert my bmps?
Must I use a palatte? Because I'm currently not, nor do I know how. My code can be found below (very simple start up code that I needed to to get right before moving on). If anyone wants to edit it so it can read my bitmap array, I'd appreciate it.
Code: |
#include <nds.h> #include "..\graphics\FreakyHead.raw.c" int main(void) { powerON(POWER_ALL); videoSetMode(MODE_5_2D | DISPLAY_BG3_ACTIVE); vramSetBankA(VRAM_A_MAIN_BG); BG3_CR = BG_BMP16_256x256; BG3_XDX = 1 << 8; BG3_XDY = 0; BG3_YDX = 0; BG3_YDY = 1 << 8; BG3_CX = 0; BG3_CY = 0; videoSetModeSub(MODE_5_2D | DISPLAY_BG3_ACTIVE); vramSetBankC(VRAM_C_SUB_BG); SUB_BG3_CR = BG_BMP16_256x256; SUB_BG3_XDX = 1 << 8; SUB_BG3_XDY = 0; SUB_BG3_YDX = 0; SUB_BG3_YDY = 1 << 8; SUB_BG3_CX = 0; SUB_BG3_CY = 0; for(int y = 50; y < 100; y++) for(int x = 50; x < 100; x++) BG_GFX[y * SCREEN_WIDTH + x] = FreakyHead_Bitmap[y * SCREEN_WIDTH + x]; return 0; } |