#177096 - blessingta@hotmail.co.uk - Sat Dec 10, 2011 5:21 pm
how do I stop GBA from not clearing my animations once they are finished? So far I've tried using these two functions:
Code: |
void clear_sprites()
{ //Max x = 230,MAx y = 150; int i_x_sp = 0, i_y_sp = 0; for (i_y_sp = 0;i_y_sp < 150 ;i_y_sp++ ) { for (i_x_sp = 0;i_x_sp < 230 ;i_x_sp++ ) { psMy_OAM_Sprites16[0 * 4 + 0] = ((0<<14)|(0<<7)|(i_y_sp<<0)); psMy_OAM_Sprites16[0 * 4 + 1] = ((0<<14)|(0<<13)|(0<<12)|(0<<8)|(i_x_sp<<0)); psMy_OAM_Sprites16[0 * 4 + 2] = ((0<<12)|(0<<10)|(0<<8)|(0<<0)); psMy_OAM_Sprites16[0 * 4 + 3] = 0; } } } void clear_screen() { int i= 0, j= 0; for (i = 0; i < 20 ;i++) { if (j >= 30 && i < 20) //go to a new line when, we running out of line space {j = 0; i++;} //clear fonts with blank space usMemPtr[(i*32) + j] = ((0 <<12)|(0 << 11)|(0 <<10)|(32 << 0)); j++; } } |