18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-12-01 22:07:55 +01:00

feat(model): the EU07M model files take the .ng3d extension, the switch is modelformat ng3d

In place of .r3a (2fe1064f9): the model files are .ng3d and eu07.ini selects them with modelformat ng3d. The format keeps its name (EU07M), its magic and the -eu07m command line tool. Neither name has been released.
This commit is contained in:
maj00r
2026-11-30 22:26:29 +01:00
parent 2fe1064f9a
commit 8637101d96
6 changed files with 20 additions and 20 deletions
+3 -3
View File
@@ -1790,7 +1790,7 @@ glm::vec3 TSubModel::offset(float const Geometrytestoffsetthreshold) const
namespace
{
// modelformat r3a: an .r3a older than the .e3d / .t3d it was made from isn't used, the model was changed after it was
// modelformat ng3d: an .ng3d older than the .e3d / .t3d it was made from isn't used, the model was changed after it was
// converted (the hash of the source in its header would need the source read whole to be compared)
bool eu07m_up_to_date(std::string const &Eu07m, std::initializer_list<std::string> const Sources)
{
@@ -1912,10 +1912,10 @@ bool TModel3d::LoadFromFile(std::string const &FileName, bool dynamic)
Init();
assign_lod_ranges(Root, name);
}
else if (auto const eu07mfile{Global.modelformat_eu07m ? FileCased(name + ".r3a") : std::string{}};
else if (auto const eu07mfile{Global.modelformat_eu07m ? FileCased(name + ".ng3d") : std::string{}};
(false == eu07mfile.empty()) && eu07m_up_to_date(eu07mfile, {binaryfile, textfile}) && LoadFromEU07M(eu07mfile, dynamic))
{
// modelformat r3a: the .r3a made from the model takes its place; one which doesn't load leaves the .e3d / .t3d to go on
// modelformat ng3d: the .ng3d made from the model takes its place; one which doesn't load leaves the .e3d / .t3d to go on
asBinary = "";
Init();
assign_lod_ranges(Root, name);