18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-12-01 04:47:06 +01:00

refactor(model): the new model format is EU07M (.eu07m), not E4D

E4D read as the next version of E3D, which the format isn't meant to be tied to; EU07M goes with the world format .eu07.
The format isn't released, so nothing reads the old name.

- The extension .eu07m, the magic EU7M (the four bytes of the header), model/eu07m/ with eu07m_*.{h,cpp},
  namespace eu07m, docs/eu07m-format.md, tests/unit/test_eu07m.cpp.
- The command line -eu07m convert|dump|validate|diff, TModel3d::LoadFromEU07M, and the key modelformat eu07m|legacy
  of eu07.ini (Global.modelformat_eu07m).
- Nothing else changes: the sections, the records and the components are the same, so a converted file needs only its
  magic and its extension changed.

Unit tests 1189/1189.
This commit is contained in:
maj00r
2026-11-28 22:02:05 +01:00
parent 5185d69dc9
commit 92cc2dcc28
29 changed files with 300 additions and 300 deletions
+4 -4
View File
@@ -50,7 +50,7 @@ Stele, firleju, szociu, hunter, ZiomalCl, OLI_EU and others
void export_e3d_standalone(std::string in, std::string out, int flags, bool dynamic);
int export_btf_standalone(std::string in, std::string out);
namespace e4d {
namespace eu07m {
int run_command_line(int Argc, char *Argv[]);
}
int generate_nodebank_previews(int Argc, char *Argv[]);
@@ -149,10 +149,10 @@ int main(int argc, char *argv[])
int dynamic = std::stoi(std::string(argv[5]));
export_e3d_standalone(in, out, flags, dynamic);
}
// standalone conversion, listing and checking of E4D models: -e4d convert|dump|validate ...
else if (argc >= 2 && std::string(argv[1]) == "-e4d")
// standalone conversion, listing and checking of EU07M models: -eu07m convert|dump|validate ...
else if (argc >= 2 && std::string(argv[1]) == "-eu07m")
{
auto const result{e4d::run_command_line(argc, argv)};
auto const result{eu07m::run_command_line(argc, argv)};
fflush(stdout);
fflush(stderr);
std::_Exit(result);