From a7ec2350f406195b119e24a81c95649c3645a26b Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Thu, 20 Oct 2016 09:01:28 -0400 Subject: oh yeah that --- include/entities.hpp | 6 ++++++ src/entities.cpp | 21 +++++++++++++++++++++ src/world.cpp | 5 +++++ 3 files changed, 32 insertions(+) create mode 100644 include/entities.hpp create mode 100644 src/entities.cpp diff --git a/include/entities.hpp b/include/entities.hpp new file mode 100644 index 0000000..f7c3894 --- /dev/null +++ b/include/entities.hpp @@ -0,0 +1,6 @@ +#ifndef ENTITIES_HPP_ +#define ENTITIES_HPP_ + +void entityxTest(); + +#endif // ENTITIES_HPP_ diff --git a/src/entities.cpp b/src/entities.cpp new file mode 100644 index 0000000..d07de4b --- /dev/null +++ b/src/entities.cpp @@ -0,0 +1,21 @@ +#include + +#include +#include + +void entityxTest(void) +{ + entityx::Entity e = game::entities.create(); + e.assign(100.0f, 100.0f); + e.assign(0.0f, 0.0f); + + e = game::entities.create(); + e.assign(0.0f, 100.0f); + e.assign(-0.01f, 0.0f); + e.assign(-.2f); + auto sprite_h = e.assign(); + sprite_h->addSpriteSegment(SpriteData(game::sprite_l.loadSprite("assets/cat.png"), + vec2(0, 0), + vec2(19, 15)), + vec2(0, 0)); +} diff --git a/src/world.cpp b/src/world.cpp index 2772160..15fde50 100644 --- a/src/world.cpp +++ b/src/world.cpp @@ -299,6 +299,11 @@ void WorldSystem::load(const std::string& file) game::time::setTickCount(std::stoi(wxml->GetText())); } + // hill creation + /*else if (tagName == "hill") { + addHill(ivec2 { wxml->IntAttribute("peakx"), wxml->IntAttribute("peaky") }, wxml->UnsignedAttribute("width")); + }*/ + wxml = wxml->NextSiblingElement(); } } -- cgit v1.2.3