#177172 - blessingta@hotmail.co.uk - Wed Jan 11, 2012 1:47 am
I handed in my coursework with the ridiculous graphic bug still in nearly a month ago... and long story short just recently I've gone back to it trying to fix it and I'm still hitting the same barrier.
Link to the gba executable
http://dl.dropbox.com/u/42518274/STUDENT50398201_MAKE_LINE_GAME.gba
Problem:
The sprites will refuse to render randomly, after a series of regular button presses and then randomly decide to turn back on again (the text which indicates what's suppose to be rendered demonstrates this).
Additional notes:
This issue only happens in the game state (others states are fine)
//this is the code I use to clear the screen every frame, which works relatively well.
Link to the gba executable
http://dl.dropbox.com/u/42518274/STUDENT50398201_MAKE_LINE_GAME.gba
Problem:
The sprites will refuse to render randomly, after a series of regular button presses and then randomly decide to turn back on again (the text which indicates what's suppose to be rendered demonstrates this).
Additional notes:
This issue only happens in the game state (others states are fine)
Code: |
void redcircle_sprites(int i_x_sp,int i_y_sp, int oam_pos)
{//2x2 size //priority = layer 0 if (!(oam_pos > 0 && oam_pos < 10)) {oam_pos = 1;} int i_layer = 0; int i_sprite_shape = 0,i_sprite_size = 1; int pallete = 3; /////////////////////////////////////// ///////////ANIMATE_SPRITE///////////// static int sprite_reference;//1; sprite_reference += 4; if (sprite_reference > 9) //9 is the largest sprite {sprite_reference = 1;} //restart frame (loop) /////////////////////////////////////// psMy_OAM_Sprites16[oam_pos * 4 + 0] = ((i_sprite_shape<<14)|(0<<7)|(i_y_sp<<0)); psMy_OAM_Sprites16[oam_pos * 4 + 1] = ((i_sprite_size<<14)|(0<<13)|(0<<12)|(0<<8)|(i_x_sp<<0)); psMy_OAM_Sprites16[oam_pos * 4 + 2] = ((pallete<<12)|(i_layer<<10)|(0<<8)|(sprite_reference<<0)); psMy_OAM_Sprites16[oam_pos * 4 + 3] = 0; } |
//this is the code I use to clear the screen every frame, which works relatively well.
Code: |
void clear_sprites()
{ int ixasm = 0; while (ixasm < 512) { //do stuff here psMy_OAM_Sprites16[ixasm] = 0; ixasm++; } } |