iw4x-client/src/Components/Modules/Localization.hpp
momo5502 1d13548829 [Localization] Fix localization crash
Preserve esi, as it is required by the hooked function
2016-11-20 14:10:57 +01:00

31 lines
874 B
C++

namespace Components
{
class Localization : public Component
{
public:
Localization();
~Localization();
#if defined(DEBUG) || defined(FORCE_UNIT_TESTS)
const char* getName() { return "Localization"; };
#endif
static void Set(std::string key, std::string value);
static const char* Get(const char* key);
static void SetTemp(std::string key, std::string value);
static void ClearTemp();
private:
static std::mutex LocalizeMutex;
static Utils::Memory::Allocator MemAllocator;
static std::map<std::string, Game::LocalizedEntry*> LocalizeMap;
static std::map<std::string, Game::LocalizedEntry*> TempLocalizeMap;
static Dvar::Var UseLocalization;
static void __stdcall SetStringStub(const char* key, const char* value, bool isEnglish);
static void LoadLanguageStrings();
static void SELoadLanguageStub();
};
}