]> code.bitgloo.com Git - clyne/gamedev.git/commitdiff
fixed entity lags
authorClyne Sullivan <tullivan99@gmail.com>
Tue, 29 Sep 2015 12:47:33 +0000 (08:47 -0400)
committerClyne Sullivan <tullivan99@gmail.com>
Tue, 29 Sep 2015 12:47:33 +0000 (08:47 -0400)
1  2 
src/entities.cpp
src/main.cpp

Simple merge
diff --cc src/main.cpp
index cb3c086fb075c672108007bc3be2e99d2bad71bf,4be52fd6135282c13b6ddcd5555dc96f5fb7f5d1..6c4047cc99ac48e87a47d83891a11b2c46c6e8d9
@@@ -172,10 -174,10 +174,11 @@@ void render()
                        fps=1000/deltaTime;
                        d=deltaTime;
                        debugDiv=0;
+               }else if(debugDiv%10==0){
                        rndy = player->loc.y;
                }
 -              ui::putText(player->loc.x-SCREEN_WIDTH/2,SCREEN_HEIGHT-ui::fontSize,"FPS: %d\nD: %d G:%d\nRes: %ux%u\nE: %d\nPOS: (x)%.2f\n     (y)%.2f",fps,d,player->ground,SCREEN_WIDTH,SCREEN_HEIGHT,entity.size(),player->loc.x,rndy);
 +              ui::putText(player->loc.x-SCREEN_WIDTH/2,SCREEN_HEIGHT-ui::fontSize,"FPS: %d\nD: %d G:%d\nRes: %ux%u\nE: %d\nPOS: (x)%+.2f\n     (y)%+.2f",
 +                                      fps,d,player->ground,SCREEN_WIDTH,SCREEN_HEIGHT,entity.size(),player->loc.x,rndy);
        }
  
        ui::draw();                                                     // Draw any UI elements if they need to be