diff options
Diffstat (limited to 'src/common.hpp')
-rw-r--r-- | src/common.hpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/common.hpp b/src/common.hpp index b88434e..7b784bf 100644 --- a/src/common.hpp +++ b/src/common.hpp @@ -10,6 +10,8 @@ #include <SFML/Graphics.hpp> #include "math.hpp" +#define count(A) (sizeof(A) / sizeof((A)[0])) + extern bool debug_draw_cmodels; extern bool debug_draw_paths; extern bool debug_draw_tile_coords; @@ -252,6 +254,9 @@ namespace interface { std::list<log_entry_t> log; + double perf_hist[10] = {0}; + size_t perf_hist_index = 0; + public: state_t(sf::RenderWindow *window_, game::state_t *game); void tick(double dt); @@ -313,6 +318,10 @@ namespace render { public: double now, dt; + struct { + size_t sectors, tiles, entities; + } stats; + state_t(sf::RenderWindow *window_); void begin_frame(double time_, double dt_); void end_frame(void); |