More details on terrain loading
parent
d27a8978cc
commit
bb3fc63e03
|
@ -279,6 +279,18 @@ msgstr ""
|
|||
msgid "Loading finished!"
|
||||
msgstr ""
|
||||
|
||||
msgid "Terrain relief"
|
||||
msgstr ""
|
||||
|
||||
msgid "Resources"
|
||||
msgstr ""
|
||||
|
||||
msgid "Textures"
|
||||
msgstr ""
|
||||
|
||||
msgid "Generating"
|
||||
msgstr ""
|
||||
|
||||
msgid "Cancel"
|
||||
msgstr ""
|
||||
|
||||
|
|
12
po/de.po
12
po/de.po
|
@ -649,6 +649,9 @@ msgstr "Spiel\\Gameplay Einstellungen"
|
|||
msgid "Gantry crane"
|
||||
msgstr "Träger"
|
||||
|
||||
msgid "Generating"
|
||||
msgstr ""
|
||||
|
||||
msgid "Gold Edition development by:"
|
||||
msgstr "Goldausgabe Entwicklung von:"
|
||||
|
||||
|
@ -1261,6 +1264,9 @@ msgstr "Dieses Wort ist reserviert"
|
|||
msgid "Resolution"
|
||||
msgstr "Auflösung"
|
||||
|
||||
msgid "Resources"
|
||||
msgstr ""
|
||||
|
||||
msgid "Restart\\Restart the mission from the beginning"
|
||||
msgstr "Neu anfangen\\Die Mission von vorne anfangen"
|
||||
|
||||
|
@ -1506,9 +1512,15 @@ msgstr "Zielscheibe"
|
|||
msgid "Target bot"
|
||||
msgstr "Mobile Zielscheibe"
|
||||
|
||||
msgid "Terrain relief"
|
||||
msgstr ""
|
||||
|
||||
msgid "Texture filtering\\Texture filtering"
|
||||
msgstr ""
|
||||
|
||||
msgid "Textures"
|
||||
msgstr ""
|
||||
|
||||
msgid "The expression must return a boolean value"
|
||||
msgstr "Der Ausdruck muss einen boolschen Wert ergeben"
|
||||
|
||||
|
|
12
po/fr.po
12
po/fr.po
|
@ -644,6 +644,9 @@ msgstr "Jeu\\Options de jouabilité"
|
|||
msgid "Gantry crane"
|
||||
msgstr "Portique"
|
||||
|
||||
msgid "Generating"
|
||||
msgstr ""
|
||||
|
||||
msgid "Gold Edition development by:"
|
||||
msgstr "Edition d'Or développé par :"
|
||||
|
||||
|
@ -1256,6 +1259,9 @@ msgstr "Ce mot est réservé"
|
|||
msgid "Resolution"
|
||||
msgstr "Résolution"
|
||||
|
||||
msgid "Resources"
|
||||
msgstr ""
|
||||
|
||||
msgid "Restart\\Restart the mission from the beginning"
|
||||
msgstr "Recommencer\\Recommencer la mission au début"
|
||||
|
||||
|
@ -1502,9 +1508,15 @@ msgstr "Cible"
|
|||
msgid "Target bot"
|
||||
msgstr "Cible d'entraînement"
|
||||
|
||||
msgid "Terrain relief"
|
||||
msgstr ""
|
||||
|
||||
msgid "Texture filtering\\Texture filtering"
|
||||
msgstr ""
|
||||
|
||||
msgid "Textures"
|
||||
msgstr ""
|
||||
|
||||
msgid "The expression must return a boolean value"
|
||||
msgstr "L'expression doit ętre un boolean"
|
||||
|
||||
|
|
12
po/pl.po
12
po/pl.po
|
@ -651,6 +651,9 @@ msgstr "Gra\\Ustawienia gry"
|
|||
msgid "Gantry crane"
|
||||
msgstr "Żuraw przesuwalny"
|
||||
|
||||
msgid "Generating"
|
||||
msgstr "Generowanie"
|
||||
|
||||
msgid "Gold Edition development by:"
|
||||
msgstr "Twórcy Złotej Edycji:"
|
||||
|
||||
|
@ -1258,6 +1261,9 @@ msgstr "Słowo zarezerwowane języka CBOT"
|
|||
msgid "Resolution"
|
||||
msgstr "Rozdzielczość"
|
||||
|
||||
msgid "Resources"
|
||||
msgstr "Zasoby"
|
||||
|
||||
msgid "Restart\\Restart the mission from the beginning"
|
||||
msgstr "Uruchom ponownie\\Uruchamia ponownie misję od początku"
|
||||
|
||||
|
@ -1500,9 +1506,15 @@ msgstr "Cel"
|
|||
msgid "Target bot"
|
||||
msgstr "Robot cel"
|
||||
|
||||
msgid "Terrain relief"
|
||||
msgstr "Rzeźba terenu"
|
||||
|
||||
msgid "Texture filtering\\Texture filtering"
|
||||
msgstr ""
|
||||
|
||||
msgid "Textures"
|
||||
msgstr "Tekstury"
|
||||
|
||||
msgid "The expression must return a boolean value"
|
||||
msgstr "Wyrażenie musi zwrócić wartość logiczną"
|
||||
|
||||
|
|
12
po/ru.po
12
po/ru.po
|
@ -643,6 +643,9 @@ msgstr "Игра\\Настройки игры"
|
|||
msgid "Gantry crane"
|
||||
msgstr "Козловой кран"
|
||||
|
||||
msgid "Generating"
|
||||
msgstr ""
|
||||
|
||||
msgid "Gold Edition development by:"
|
||||
msgstr "\"Золотое издание\" было разработано:"
|
||||
|
||||
|
@ -1256,6 +1259,9 @@ msgstr "Резервное ключевое слово языка CBOT"
|
|||
msgid "Resolution"
|
||||
msgstr "Разрешение"
|
||||
|
||||
msgid "Resources"
|
||||
msgstr ""
|
||||
|
||||
msgid "Restart\\Restart the mission from the beginning"
|
||||
msgstr "Заново\\Начать данную миссию с начала"
|
||||
|
||||
|
@ -1498,9 +1504,15 @@ msgstr "Цель"
|
|||
msgid "Target bot"
|
||||
msgstr "Целевой бот"
|
||||
|
||||
msgid "Terrain relief"
|
||||
msgstr ""
|
||||
|
||||
msgid "Texture filtering\\Texture filtering"
|
||||
msgstr ""
|
||||
|
||||
msgid "Textures"
|
||||
msgstr ""
|
||||
|
||||
msgid "The expression must return a boolean value"
|
||||
msgstr "Выражение должно возвращать логическое значение"
|
||||
|
||||
|
|
|
@ -156,6 +156,10 @@ void InitializeRestext()
|
|||
stringsText[RT_LOADING_PROGRAMS] = TR("Loading programs");
|
||||
stringsText[RT_LOADING_CBOT_SAVE] = TR("Restoring CBot execution state");
|
||||
stringsText[RT_LOADING_FINISHED] = TR("Loading finished!");
|
||||
stringsText[RT_LOADING_TERRAIN_RELIEF] = TR("Terrain relief");
|
||||
stringsText[RT_LOADING_TERRAIN_RES] = TR("Resources");
|
||||
stringsText[RT_LOADING_TERRAIN_TEX] = TR("Textures");
|
||||
stringsText[RT_LOADING_TERRAIN_GEN] = TR("Generating");
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -155,6 +155,10 @@ enum ResTextType
|
|||
RT_LOADING_PROGRAMS = 217,
|
||||
RT_LOADING_CBOT_SAVE = 218,
|
||||
RT_LOADING_FINISHED = 219,
|
||||
RT_LOADING_TERRAIN_RELIEF = 220,
|
||||
RT_LOADING_TERRAIN_RES = 221,
|
||||
RT_LOADING_TERRAIN_TEX = 222,
|
||||
RT_LOADING_TERRAIN_GEN = 223,
|
||||
|
||||
|
||||
RT_MAX //! < number of values
|
||||
|
|
|
@ -3267,6 +3267,7 @@ void CRobotMain::CreateScene(bool soluce, bool fixScene, bool resetObject)
|
|||
|
||||
if (line->GetCommand() == "TerrainRelief" && !resetObject)
|
||||
{
|
||||
m_ui->GetLoadingScreen()->SetProgress(0.2f+(1.f/5.f)*0.05f, RT_LOADING_TERRAIN, RT_LOADING_TERRAIN_RELIEF);
|
||||
m_terrain->LoadRelief(
|
||||
line->GetParam("image")->AsPath("textures"),
|
||||
line->GetParam("factor")->AsFloat(1.0f),
|
||||
|
@ -3276,12 +3277,14 @@ void CRobotMain::CreateScene(bool soluce, bool fixScene, bool resetObject)
|
|||
|
||||
if (line->GetCommand() == "TerrainRandomRelief" && !resetObject)
|
||||
{
|
||||
m_ui->GetLoadingScreen()->SetProgress(0.2f+(1.f/5.f)*0.05f, RT_LOADING_TERRAIN, RT_LOADING_TERRAIN_RELIEF);
|
||||
m_terrain->RandomizeRelief();
|
||||
continue;
|
||||
}
|
||||
|
||||
if (line->GetCommand() == "TerrainResource" && !resetObject)
|
||||
{
|
||||
m_ui->GetLoadingScreen()->SetProgress(0.2f+(2.f/5.f)*0.05f, RT_LOADING_TERRAIN, RT_LOADING_TERRAIN_RES);
|
||||
m_terrain->LoadResources(line->GetParam("image")->AsPath("textures"));
|
||||
continue;
|
||||
}
|
||||
|
@ -3333,6 +3336,7 @@ void CRobotMain::CreateScene(bool soluce, bool fixScene, bool resetObject)
|
|||
|
||||
if (line->GetCommand() == "TerrainInitTextures" && !resetObject)
|
||||
{
|
||||
m_ui->GetLoadingScreen()->SetProgress(0.2f+(3.f/5.f)*0.05f, RT_LOADING_TERRAIN, RT_LOADING_TERRAIN_TEX);
|
||||
std::string name = "../" + line->GetParam("image")->AsPath("textures");
|
||||
if (name.find(".") == std::string::npos)
|
||||
name += ".png";
|
||||
|
@ -3400,6 +3404,7 @@ void CRobotMain::CreateScene(bool soluce, bool fixScene, bool resetObject)
|
|||
|
||||
if (line->GetCommand() == "TerrainLevel" && !resetObject)
|
||||
{
|
||||
m_ui->GetLoadingScreen()->SetProgress(0.2f+(3.f/5.f)*0.05f, RT_LOADING_TERRAIN, RT_LOADING_TERRAIN_TEX);
|
||||
int id[50]; //TODO: I have no idea how TerrainLevel works, but maybe we should remove the limit to 50?
|
||||
if (line->GetParam("id")->IsDefined())
|
||||
{
|
||||
|
@ -3430,6 +3435,7 @@ void CRobotMain::CreateScene(bool soluce, bool fixScene, bool resetObject)
|
|||
|
||||
if (line->GetCommand() == "TerrainCreate" && !resetObject)
|
||||
{
|
||||
m_ui->GetLoadingScreen()->SetProgress(0.2f+(4.f/5.f)*0.05f, RT_LOADING_TERRAIN, RT_LOADING_TERRAIN_GEN);
|
||||
m_terrain->CreateObjects();
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -146,9 +146,18 @@ void CScreenLoading::SetProgress(float progress, const std::string& text, const
|
|||
pg->SetLevel(progress);
|
||||
}
|
||||
|
||||
SetBackground("textures/interface/interface.png");
|
||||
m_engine->SetBackForce(true);
|
||||
m_app->Render();
|
||||
if (progress != m_lastProgress ||
|
||||
text != m_lastText ||
|
||||
details != m_lastDetails )
|
||||
{
|
||||
SetBackground("textures/interface/interface.png");
|
||||
m_engine->SetBackForce(true);
|
||||
m_app->Render();
|
||||
}
|
||||
|
||||
m_lastProgress = progress;
|
||||
m_lastText = text;
|
||||
m_lastDetails = details;
|
||||
}
|
||||
|
||||
void CScreenLoading::SetProgress(float progress, ResTextType text, const std::string& details)
|
||||
|
@ -158,4 +167,11 @@ void CScreenLoading::SetProgress(float progress, ResTextType text, const std::st
|
|||
SetProgress(progress, name, details);
|
||||
}
|
||||
|
||||
void CScreenLoading::SetProgress(float progress, ResTextType text, ResTextType details)
|
||||
{
|
||||
std::string name;
|
||||
GetResource(RES_TEXT, details, name);
|
||||
SetProgress(progress, text, name);
|
||||
}
|
||||
|
||||
} // namespace Ui
|
||||
|
|
|
@ -39,9 +39,14 @@ public:
|
|||
|
||||
void SetProgress(float progress, const std::string& text, const std::string& details = "");
|
||||
void SetProgress(float progress, ResTextType text, const std::string& details = "");
|
||||
void SetProgress(float progress, ResTextType text, ResTextType details);
|
||||
|
||||
protected:
|
||||
bool m_visible;
|
||||
|
||||
float m_lastProgress;
|
||||
std::string m_lastText;
|
||||
std::string m_lastDetails;
|
||||
};
|
||||
|
||||
} // namespace Ui
|
||||
|
|
Loading…
Reference in New Issue