mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-04-30 00:37:58 +03:00
Added translations support and fixed some bugs with strings
This commit is contained in:
parent
e2e4022188
commit
dc5db910f2
5 changed files with 22 additions and 217 deletions
|
@ -202,7 +202,7 @@ bool GameFlow::LoadGameFlowScript()
|
|||
// Hardcode English for now - this will be changed
|
||||
// to something like "Strings.lua" once that system
|
||||
// through
|
||||
if (!ExecuteScript("Scripts/English.lua", err)) {
|
||||
if (!ExecuteScript("Scripts/Strings.lua", err)) {
|
||||
std::cout << err << "\n";
|
||||
}
|
||||
|
||||
|
@ -211,8 +211,10 @@ bool GameFlow::LoadGameFlowScript()
|
|||
|
||||
char* GameFlow::GetString(const char* id)
|
||||
{
|
||||
return (char*)id;
|
||||
//return (char*)(CurrentStrings->Strings[id].c_str());
|
||||
if (m_translationsMap.find(id) == m_translationsMap.end())
|
||||
return "String not found";
|
||||
else
|
||||
return (char*)(m_translationsMap.at(string(id)).at(0).c_str());
|
||||
}
|
||||
|
||||
GameScriptSettings* GameFlow::GetSettings()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue