aboutsummaryrefslogtreecommitdiffstats
path: root/main.cpp
diff options
context:
space:
mode:
authorClyne Sullivan <tullivan99@gmail.com>2016-10-26 07:43:32 -0400
committerClyne Sullivan <tullivan99@gmail.com>2016-10-26 07:43:32 -0400
commit52de6c2e6c048b84a7665b6fc583b2259bbdd3af (patch)
treefd42df62429b5e7e18d2a04a23e4bc5615f2097a /main.cpp
parent8eb1625aea5ccaa07414e699e784440a94277ab0 (diff)
player stuff
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp11
1 files changed, 1 insertions, 10 deletions
diff --git a/main.cpp b/main.cpp
index c6c41af..1076903 100644
--- a/main.cpp
+++ b/main.cpp
@@ -21,7 +21,6 @@ using namespace tinyxml2;
// local game includes
#include <common.hpp>
#include <config.hpp>
-#include <entities.hpp>
#include <world.hpp>
#include <ui.hpp>
#include <gametime.hpp>
@@ -203,9 +202,6 @@ int main(int argc, char *argv[])
ui::menu::init();
// game::events.emit<BGMToggleEvent>(currentWorld->bgm);
- //TODO
- entityxTest();
-
// the main loop, in all of its gloriousness..
std::thread([&]{
while (game::engine.shouldRun()) {
@@ -267,12 +263,7 @@ void render() {
const auto SCREEN_WIDTH = game::SCREEN_WIDTH;
const auto SCREEN_HEIGHT = game::SCREEN_HEIGHT;
- //offset.x = game::entities.Iterator.begin().component<Position>().x;// + player->width / 2;
-
- game::entities.each<Position>([](entityx::Entity entity, Position &position) {
- (void)entity;
- offset.x = position.x;
- });
+ offset.x = game::engine.getSystem<PlayerSystem>()->getPosition().x;// + player->width / 2;
auto worldWidth = game::engine.getSystem<WorldSystem>()->getWidth();
if (worldWidth < (int)SCREEN_WIDTH)