18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-12-02 02:42:46 +01:00

Merge branch 'feat/eu07m-gref' into feat/eu07m-geometry-streaming

Brings the .r3a extension and modelformat r3a (2fe1064f9). Globals keeps this branch's modelstreaming settings, with r3a written for modelformat. What this branch adds is renamed with it: the model files .r3a, the family store .r3p.
This commit is contained in:
maj00r
2026-11-30 22:13:14 +01:00
13 changed files with 56 additions and 49 deletions
+3 -3
View File
@@ -1831,7 +1831,7 @@ glm::vec3 TSubModel::offset(float const Geometrytestoffsetthreshold) const
namespace
{
// modelformat eu07m: an .eu07m older than the .e3d / .t3d it was made from isn't used, the model was changed after it was
// modelformat r3a: an .r3a 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)
{
@@ -1953,10 +1953,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 + ".eu07m") : std::string{}};
else if (auto const eu07mfile{Global.modelformat_eu07m ? FileCased(name + ".r3a") : std::string{}};
(false == eu07mfile.empty()) && eu07m_up_to_date(eu07mfile, {binaryfile, textfile}) && LoadFromEU07M(eu07mfile, dynamic))
{
// modelformat eu07m: the .eu07m made from the model takes its place; one which doesn't load leaves the .e3d / .t3d to go on
// modelformat r3a: the .r3a 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);