summaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2018-04-13 00:03:20 +0200
committerPaweł Redman <pawel.redman@gmail.com>2018-04-13 00:03:20 +0200
commit31bf2ba85b17b9085681eb4fdaca940e6f4c17e3 (patch)
treea13b93e2ce607aa059e060e1ebaf2ba674ae1a4e /src/game
parenta71ed71be94a9fec8660ea0aa060ab9fcf7f860a (diff)
Show RSS on Linux.
Diffstat (limited to 'src/game')
-rw-r--r--src/game/interface.cpp31
1 files changed, 18 insertions, 13 deletions
diff --git a/src/game/interface.cpp b/src/game/interface.cpp
index c6d5e19..d249f38 100644
--- a/src/game/interface.cpp
+++ b/src/game/interface.cpp
@@ -371,18 +371,19 @@ void state_t::render_to(render::state_t *render)
x[1] += em;
}
- x = v2f_t(0.0f, h - em * 5.5);
- ss << "World S/T:";
- ss << game->world.stats.sectors << "/";
- ss << game->world.stats.tiles;
+ x = v2f_t(0.0f, h - em * 1.5);
+
+ ss << std::fixed << std::setprecision(3);
+ ss << "Game t/F/B: " << game->time * 1.0e-9 << "/" << game->frames << "/" << game->frames_behind;
render->render_text(x, em, ss.str(), render::ALIGN_LEFT_TOP, sf::Color::White);
- x[1] += em;
+ x[1] -= em;
ss.str(std::string());
- ss << "Awake: " << game->awake_entities.size() << "/" << game->world.stats.entities;
+ ss << std::fixed << std::setprecision(1);
+ ss << "FPS: " << fc_render.freq_ma() << ", " << fc_game.freq_ma() << " Hz";
render->render_text(x, em, ss.str(), render::ALIGN_LEFT_TOP, sf::Color::White);
- x[1] += em;
+ x[1] -= em;
ss.str(std::string());
ss << "View S/T/E: ";
ss << render->stats.sectors << "/";
@@ -390,16 +391,20 @@ void state_t::render_to(render::state_t *render)
ss << render->stats.entities;
render->render_text(x, em, ss.str(), render::ALIGN_LEFT_TOP, sf::Color::White);
- x[1] += em;
+ x[1] -= em;
ss.str(std::string());
- ss << std::fixed << std::setprecision(1);
- ss << "FPS: " << fc_render.freq_ma() << ", " << fc_game.freq_ma() << " Hz";
+ ss << "Awake: " << game->awake_entities.size() << "/" << game->world.stats.entities;
render->render_text(x, em, ss.str(), render::ALIGN_LEFT_TOP, sf::Color::White);
- x[1] += em;
+ x[1] -= em;
ss.str(std::string());
- ss << std::fixed << std::setprecision(3);
- ss << "Game t/F/B: " << game->time * 1.0e-9 << "/" << game->frames << "/" << game->frames_behind;
+ ss << "World S/T:";
+ ss << game->world.stats.sectors << "/";
+ ss << game->world.stats.tiles;
+#ifdef CONFIG_SHOW_RSS
+ ss << ", " << sys_get_rss() / 1000000.0f;
+ ss << "MB RSS";
+#endif
render->render_text(x, em, ss.str(), render::ALIGN_LEFT_TOP, sf::Color::White);
}