diff options
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | src/common.hpp | 26 | ||||
-rw-r--r-- | src/game/game.hpp | 26 | ||||
-rw-r--r-- | src/game/text.cpp (renamed from src/text.cpp) | 4 |
4 files changed, 29 insertions, 29 deletions
@@ -14,13 +14,13 @@ SRC := src/game/assets.cpp \ src/game/effects.cpp \ src/game/game.cpp \ src/game/interface.cpp \ + src/game/text.cpp \ src/game/units.cpp \ src/game/worldgen.cpp \ src/main.cpp \ src/path_finder.cpp \ src/procgen.cpp \ src/render.cpp \ - src/text.cpp \ src/world.cpp OBJ := $(SRC:src/%.cpp=obj/%.o) diff --git a/src/common.hpp b/src/common.hpp index fd7327d..872a40d 100644 --- a/src/common.hpp +++ b/src/common.hpp @@ -345,32 +345,6 @@ namespace render { extern render::state_t *debug_render; -namespace text { - typedef enum { - LANG_ENGLISH, - LANG_POLISH - } language_t; - - extern language_t language; - - typedef enum { - SAY_NO_PATH, - SAY_BLOCKED, - SAY_READY, - SAY_MOVING, - UNIT_NAME_SPIDER, - UNIT_NAME_SOLDIER, - UNIT_DEATH, - UNIT_ATTACK, - UNIT_MISS, - UNIT_CRITICAL_MISS, - UNIT_CRITICAL_HIT, - UNIT_DAMAGE - } index_t; - - std::string get(index_t index); -} - // Divide and round to minus infinity. template <typename T> T divide_rmi(T x, T y, T *rem) diff --git a/src/game/game.hpp b/src/game/game.hpp index 3fed3ec..b2bf0dd 100644 --- a/src/game/game.hpp +++ b/src/game/game.hpp @@ -55,6 +55,32 @@ namespace game { void load(void); } + namespace text { + typedef enum { + LANG_ENGLISH, + LANG_POLISH + } language_t; + + extern language_t language; + + typedef enum { + SAY_NO_PATH, + SAY_BLOCKED, + SAY_READY, + SAY_MOVING, + UNIT_NAME_SPIDER, + UNIT_NAME_SOLDIER, + UNIT_DEATH, + UNIT_ATTACK, + UNIT_MISS, + UNIT_CRITICAL_MISS, + UNIT_CRITICAL_HIT, + UNIT_DAMAGE + } index_t; + + std::string get(index_t index); + } + class entity_t : public world::entity_t { public: game::state_t *game = 0; diff --git a/src/text.cpp b/src/game/text.cpp index 3204776..3b611e2 100644 --- a/src/text.cpp +++ b/src/game/text.cpp @@ -1,6 +1,6 @@ -#include "common.hpp" +#include "game.hpp" -namespace text { +namespace game::text { language_t language = LANG_ENGLISH; |