summaryrefslogtreecommitdiff
path: root/src/game/assets.cpp
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2017-12-12 14:57:52 +0100
committerPaweł Redman <pawel.redman@gmail.com>2017-12-12 14:57:52 +0100
commit1fd33b69f7cef5f9dfe1da417717545f34c673d0 (patch)
treedd30ac53136a54b159018bf4aea6d09d77d376fb /src/game/assets.cpp
parent9f88509c8e440d9bb3430b71708efd69988f461c (diff)
Start moving game logic to src/game.
Diffstat (limited to 'src/game/assets.cpp')
-rw-r--r--src/game/assets.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/game/assets.cpp b/src/game/assets.cpp
new file mode 100644
index 0000000..32eff81
--- /dev/null
+++ b/src/game/assets.cpp
@@ -0,0 +1,20 @@
+#include "game.hpp"
+
+namespace assets {
+
+human_assets_t human;
+sf::Texture tile_dirt;
+sf::Texture tile_wall;
+
+void load(void)
+{
+ human.head_idle.load("assets/units/human/head_idle", 1, 1, 1);
+ human.body_idle.load("assets/units/human/body_idle", 2, 2, 2);
+ human.legs_idle.load("assets/units/human/legs_idle", 2, 2);
+ human.legs_walking.load("assets/units/human/legs_walking", 2, 2);
+
+ tile_dirt.loadFromFile("assets/tiles/dirt.png");
+ tile_wall.loadFromFile("assets/tiles/wall.png");
+}
+
+} // namespace assets