#71814 - Miles_wy_1 - Tue Feb 14, 2006 5:46 pm
[Images not permitted - Click here to view it]
I want to diplay the picture above.But it turned out like this:
[Images not permitted - Click here to view it]
I dont know Y.
this is my source code:
#include "gba.h"
#include "dragon.h"
int main()
{
int y,x;
SetMode(MODE_4|BG2_ENABLE);
for (x=0;x<256 ;x++ )
{
BG_PaletteMem[x]=dragonPalette[x];
}
for (y=0;y<160 ;y++ )
{
for (x=0;x<120; x++)
{
FrontBuffer[(y)*120+(x)]=dragonData[(y)*120+(x)];
}
}
return 0;
}
I know it's a very simple program,but it troubled me a lot.
all the pointers are type of U16,is there any significant aspect that i ignored?
I want to diplay the picture above.But it turned out like this:
[Images not permitted - Click here to view it]
I dont know Y.
this is my source code:
#include "gba.h"
#include "dragon.h"
int main()
{
int y,x;
SetMode(MODE_4|BG2_ENABLE);
for (x=0;x<256 ;x++ )
{
BG_PaletteMem[x]=dragonPalette[x];
}
for (y=0;y<160 ;y++ )
{
for (x=0;x<120; x++)
{
FrontBuffer[(y)*120+(x)]=dragonData[(y)*120+(x)];
}
}
return 0;
}
I know it's a very simple program,but it troubled me a lot.
all the pointers are type of U16,is there any significant aspect that i ignored?