From c33d0fa9c43fb316a9c6bbb2be81446dce7f49da Mon Sep 17 00:00:00 2001 From: Paweł Redman Date: Tue, 12 Dec 2017 15:44:19 +0100 Subject: Move tile data to src/game. --- src/game/assets.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/game/assets.cpp') diff --git a/src/game/assets.cpp b/src/game/assets.cpp index 32eff81..c20d77b 100644 --- a/src/game/assets.cpp +++ b/src/game/assets.cpp @@ -1,6 +1,6 @@ #include "game.hpp" -namespace assets { +namespace game::assets { human_assets_t human; sf::Texture tile_dirt; @@ -13,8 +13,10 @@ void load(void) 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"); + world::register_tile(TILE_DIRT, 0); + world::register_tile(TILE_WALL, 1); + render::register_tile(TILE_DIRT, "assets/tiles/dirt.png"); + render::register_tile(TILE_WALL, "assets/tiles/wall.png"); } -} // namespace assets +} // namespace game::assets -- cgit