#include "game.hpp" namespace game::text { language_t language = LANG_ENGLISH; static const char *soldier_names[] = { "Kowalski", "Jackson", "Carter", "O'Neill", "Hammond", "Mitchell" }; static std::string get_english(index_t index) { switch (index) { case PAUSED: return "PAUSED"; case UNPAUSED: return "UNPAUSED"; case SAY_BLOCKED: return "Something is in my way."; case SAY_NO_PATH: return "I can't get there."; case SAY_READY: return "Ready for orders."; case SAY_MOVING: return "On my way."; case UNIT_NAME_SPIDER: return "Spider"; case UNIT_NAME_SOLDIER: return soldier_names[rand() % count(soldier_names)]; case UNIT_NAME_NEST: return "Nest"; case UNIT_DEATH: return "died"; case UNIT_ATTACK: return "attacks"; case UNIT_MISS: return "miss"; case UNIT_CRITICAL_MISS: return "critical miss"; case UNIT_CRITICAL_HIT: return "critical hit"; case UNIT_DAMAGE: return "deals damage"; default: abort(); } } static std::string get_polish(index_t index) { switch (index) { case PAUSED: return "WSTRZYMANO"; case UNPAUSED: return "WZNOWIONO"; case SAY_BLOCKED: return "Coś jest na mojej drodze."; case SAY_NO_PATH: return "Nie mogę się tam dostać."; case SAY_READY: return "Gotowy na rozkaz."; case SAY_MOVING: return "Jestem w drodze."; case UNIT_NAME_SPIDER: return "Pająk"; case UNIT_NAME_SOLDIER: return soldier_names[rand() % count(soldier_names)]; case UNIT_NAME_NEST: return "Gniazdo"; case UNIT_DEATH: return "nie żyje"; case UNIT_ATTACK: return "atakuje"; case UNIT_MISS: return "chybienie"; case UNIT_CRITICAL_MISS: return "chybienie krytyczne"; case UNIT_CRITICAL_HIT: return "trafienie krytyczne"; case UNIT_DAMAGE: return "zadaje obrażenia"; default: abort(); } } std::string get(index_t index) { switch (language) { case LANG_ENGLISH: return get_english(index); case LANG_POLISH: return get_polish(index); default: abort(); } } } // namespace text