/* This file is part of Minitrem. Minitrem is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version. Minitrem is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Minitrem. If not, see . */ #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 FOLLOWING_ON: return "Following: on."; case FOLLOWING_OFF: return "Following: off."; case SAY_GROUP: return "Group"; case SAY_NO_PATH: return "I can't get there."; case SAY_READY: case SAY_READY_GROUP: return "Ready for orders."; case SAY_MOVING: return "On my way."; case SAY_MOVING_GROUP: return "On our way."; case SAY_STOPPING: case SAY_STOPPING_GROUP: return "Stopping."; case SAY_FIRING: case SAY_FIRING_GROUP: return "Firing!"; case SAY_PANIC: return "I'm not getting paid enough for this!"; 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"; case UNIT_SAVING_THROW_WILLPOWER: return "makes a saving throw for willpower"; case UNIT_SAVING_THROW_SUCCESS: return "success"; case UNIT_SAVING_THROW_FAILURE: return "failure"; default: abort(); } } std::string get(index_t index) { switch (language) { case LANG_ENGLISH: return get_english(index); default: abort(); } } } // namespace text