File tree 1 file changed +1
-16
lines changed
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
79
79
int score; // Number of eaten apples
80
80
int preTick; // Previous tick time
81
81
char fat; // Flag of setting fat cell
82
- int FPStime=0 ;
83
- int counter=0 ;
84
- int precounter=0 ;
85
82
86
83
// Texts variables and constants
87
84
TTF_Font* Font;
@@ -431,19 +428,7 @@ int main(int argv, char** args){
431
428
}
432
429
drawText ( std::to_string (score), 20 , 15 ); // Drawing text with score at screen
433
430
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
447
432
}
448
433
// Exiting program and clearing all data
449
434
unloadTextures ();
You can’t perform that action at this time.
0 commit comments