aboutsummaryrefslogtreecommitdiffstats
path: root/src/render.cpp
diff options
context:
space:
mode:
authordrumsetmonkey <abelleisle@roadrunner.com>2017-04-27 21:33:13 -0400
committerdrumsetmonkey <abelleisle@roadrunner.com>2017-04-27 21:33:13 -0400
commit2de1af94cfa794ae5dd7913c797d673b58289949 (patch)
tree3acb4e822943efb714ff04d4e88307127e34f52e /src/render.cpp
parent40f2ab396ccca1a12cc74d18c9758da5bc2f1afc (diff)
parent00de7a4b0aa48c3cb42c45e0f203902ca034b94c (diff)
Updated sprites
Diffstat (limited to 'src/render.cpp')
-rw-r--r--src/render.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/render.cpp b/src/render.cpp
index 84f3e7e..8c2f50d 100644
--- a/src/render.cpp
+++ b/src/render.cpp
@@ -5,6 +5,7 @@
#include <config.hpp>
#include <error.hpp>
#include <glm.hpp>
+#include <font.hpp>
#include <texture.hpp>
extern vec2 offset;
@@ -135,7 +136,7 @@ void preRender(void)
auto ploc = ps->getPosition();
offset.x = ploc.x + ps->getWidth() / 2;
- const auto& worldWidth = game::engine.getSystem<WorldSystem>()->getWidth();
+ const auto& worldWidth = WorldSystem::getWidth();
if (worldWidth < (int)SCREEN_WIDTH2 * 2)
offset.x = 0;
else if (offset.x - SCREEN_WIDTH2 < worldWidth * -0.5f)
@@ -174,7 +175,7 @@ void render(const int& fps)
{
preRender();
- game::engine.getSystem<WorldSystem>()->render();
+ WorldSystem::render();
game::engine.getSystem<ParticleSystem>()->render();
@@ -185,14 +186,17 @@ void render(const int& fps)
// draw the debug overlay if desired
if (ui::debug) {
auto pos = game::engine.getSystem<PlayerSystem>()->getPosition();
- ui::putText(offset.x - game::SCREEN_WIDTH / 2, (offset.y + game::SCREEN_HEIGHT / 2) - ui::fontSize,
+ UISystem::putText(vec2(offset.x - game::SCREEN_WIDTH / 2, (offset.y + game::SCREEN_HEIGHT / 2) - FontSystem::getSize()),
"loc: %s\noffset: %s\nfps: %d\nticks: %d\npcount: %d\nxml: %s",
pos.toString().c_str(), offset.toString().c_str(), fps,
game::time::getTickCount(), game::engine.getSystem<ParticleSystem>()->getCount(),
- game::engine.getSystem<WorldSystem>()->getXMLFile().c_str());
+ WorldSystem::getXMLFile().c_str()
+ );
}
- ui::drawFade();
+ UISystem::render();
+
+ //ui::drawFade();
ui::draw();
game::engine.getSystem<WindowSystem>()->render();