File tree Expand file tree Collapse file tree 1 file changed +1
-16
lines changed
Expand file tree Collapse file tree 1 file changed +1
-16
lines changed Original file line number Diff line number Diff line change @@ -79,9 +79,6 @@ int position; // Position of sell, which updated
7979int score; // Number of eaten apples
8080int preTick; // Previous tick time
8181char fat; // Flag of setting fat cell
82- int FPStime=0 ;
83- int counter=0 ;
84- int precounter=0 ;
8582
8683// Texts variables and constants
8784TTF_Font* Font;
@@ -431,19 +428,7 @@ int main(int argv, char** args){
431428 }
432429 drawText ( std::to_string (score), 20 , 15 ); // Drawing text with score at screen
433430
434-
435- // preTick = SDL_GetTicks();
436- if (SDL_GetTicks () - FPStime > 1000 ){
437- FPStime = SDL_GetTicks ();
438- precounter = counter;
439- counter = 0 ;
440- }
441- counter+=1 ;
442- drawText ( std::to_string ( precounter ), SCREEN_WIDTH-80 , 15 ); // Drawing text with score at screen
443- SDL_RenderPresent (app.renderer ); // Blitting textures on screen
444-
445- // Delaying time to decrease CPU loading
446- // SDL_Delay(1000/FPS);
431+ SDL_Delay (1000 /FPS); // Delaying time to decrease CPU loading
447432 }
448433 // Exiting program and clearing all data
449434 unloadTextures ();
You can’t perform that action at this time.
0 commit comments