void calc_sprites(int steps) { if ( spGetInput()->button[SP_BUTTON_A] ) { spGetInput()->button[SP_BUTTON_A] = 0; sprites_z = 1-sprites_z; } spUpdateSprite( sprite, steps ); }
int calc_function( Uint32 steps ) { //update rotation counter rotation += steps * 32; //if "Start" (or "Menu" for Wiz or "Home" for Caanoo or "Return" at the P) is //pressed: exit if ( spGetInput()->button[SP_BUTTON_START] ) return 1; //Update the sprite (next picture) spUpdateSprite( sprite, steps ); //rotozoom the sprite (without rotozoom it's faster): sprite->zoomX = spSin( rotation * 8 ) / 2 + ( 3 << SP_ACCURACY - 1 ); sprite->zoomY = spCos( rotation * 6 ) / 2 + ( 3 << SP_ACCURACY - 1 ); sprite->rotation = rotation * 4; return 0; }
void calc_target(int steps) { spUpdateSprite( target_sprite, steps ); }