#64894 - naleksiev - Wed Dec 28, 2005 4:58 am
Hello,
This is my first steps in GBA. I'm playing with sprites in mode 0. I have some problems with my test this is what I see http://alex.logiga.com/error.png in the left top corrner there is some garbage. My sprite is a rectangle with rounded angles. For some reason I can see only the upper half and this garbage. Any ideas?
This is how I initialize mode 0
This is the code that initialize the position of my sprite
where id = 0
What is the problem? Please help.
This is my first steps in GBA. I'm playing with sprites in mode 0. I have some problems with my test this is what I see http://alex.logiga.com/error.png in the left top corrner there is some garbage. My sprite is a rectangle with rounded angles. For some reason I can see only the upper half and this garbage. Any ideas?
This is how I initialize mode 0
Code: |
REG_BG0CNT = BIT2 | BIT7;
SetMode(MODE_0 | BG0_ENABLE | OBJ_ENABLE); |
This is the code that initialize the position of my sprite
Code: |
sprites[id].oam = &OAMCopy[id];
sprites[id].x = x; sprites[id].y = y; sprites[id].gfxID = 0; sprites[id].oam->attribute[0] = COLOR_256 | SQUARE | (y & 0x00FF); sprites[id].oam->attribute[1] = SIZE_16 | (x & 0x01FF); sprites[id].oam->attribute[2] = sprites[id].gfxID; for (int i = 0; i < spriteRawLength >> 1; i++) { OBJ_GFXMem[sprites[id].gfxID * 16 + i] = spriteRaw[i]; } for (int i = 0; i < spritePalLength >> 1; i++) { OBJPaletteMem[i] = spritePal[i]; } |
where id = 0
What is the problem? Please help.