Merge pull request #560 from diamante0018/develop
[Localize] Remove patch that double loads str files
This commit is contained in:
commit
75d53bea64
@ -76,31 +76,6 @@ namespace Components
|
|||||||
Localization::Set(key, value);
|
Localization::Set(key, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Localization::LoadLanguageStrings()
|
|
||||||
{
|
|
||||||
if (FileSystem::File(Utils::String::VA("localizedstrings/iw4x_%s.str", Game::Win_GetLanguage())).exists())
|
|
||||||
{
|
|
||||||
Game::SE_Load(Utils::String::VA("localizedstrings/iw4x_%s.str", Game::Win_GetLanguage()), 0);
|
|
||||||
}
|
|
||||||
else if (FileSystem::File("localizedstrings/iw4x_english.str").exists())
|
|
||||||
{
|
|
||||||
Game::SE_Load("localizedstrings/iw4x_english.str", 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
__declspec(naked) void Localization::SELoadLanguageStub()
|
|
||||||
{
|
|
||||||
__asm
|
|
||||||
{
|
|
||||||
pushad
|
|
||||||
call Localization::LoadLanguageStrings
|
|
||||||
popad
|
|
||||||
|
|
||||||
push 629E20h
|
|
||||||
retn
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void Localization::SetCredits()
|
void Localization::SetCredits()
|
||||||
{
|
{
|
||||||
static const char* staff[] =
|
static const char* staff[] =
|
||||||
@ -347,9 +322,6 @@ namespace Components
|
|||||||
// Resolving hook
|
// Resolving hook
|
||||||
Utils::Hook(0x629B90, Localization::Get, HOOK_JUMP).install()->quick();
|
Utils::Hook(0x629B90, Localization::Get, HOOK_JUMP).install()->quick();
|
||||||
|
|
||||||
// Set loading entry point
|
|
||||||
Utils::Hook(0x41D859, Localization::SELoadLanguageStub, HOOK_CALL).install()->quick();
|
|
||||||
|
|
||||||
// Overwrite SetString
|
// Overwrite SetString
|
||||||
Utils::Hook(0x4CE5EE, Localization::SetStringStub, HOOK_CALL).install()->quick();
|
Utils::Hook(0x4CE5EE, Localization::SetStringStub, HOOK_CALL).install()->quick();
|
||||||
|
|
||||||
|
@ -17,8 +17,6 @@ namespace Components
|
|||||||
static Dvar::Var UseLocalization;
|
static Dvar::Var UseLocalization;
|
||||||
|
|
||||||
static void __stdcall SetStringStub(const char* key, const char* value, bool isEnglish);
|
static void __stdcall SetStringStub(const char* key, const char* value, bool isEnglish);
|
||||||
static void LoadLanguageStrings();
|
|
||||||
static void SELoadLanguageStub();
|
|
||||||
static void SetCredits();
|
static void SetCredits();
|
||||||
|
|
||||||
static const char* SEH_LocalizeTextMessageStub(const char* pszInputBuffer, const char* pszMessageType, Game::msgLocErrType_t errType);
|
static const char* SEH_LocalizeTextMessageStub(const char* pszInputBuffer, const char* pszMessageType, Game::msgLocErrType_t errType);
|
||||||
|
Loading…
Reference in New Issue
Block a user