diff --git a/docs/eu07m-format.md b/docs/eu07m-format.md index 668f05bb3..580cfc606 100644 --- a/docs/eu07m-format.md +++ b/docs/eu07m-format.md @@ -1,4 +1,4 @@ -# Format modeli EU07M (`.eu07m`) +# Format modeli EU07M (`.r3a`) Następca E3D: w pełni binarny format modeli. Plik czyta się prawie bez przetwarzania, prosto do buforów OpenGL 4.6 i Vulkana 1.4. Niesie węzły TRS, skinning, typowane komponenty i metadane węzłów oraz grup wierzchołków. Rozszerza się bez @@ -215,7 +215,7 @@ Odwołania wewnątrz danych to indeksy: string, węzeł albo komponent; `0xFFFFF ## Konwersja z E3D i T3D -`eu07 -eu07m convert [dynamic]` wczytuje model istniejącym loaderem (jak `-e3d`) i zapisuje +`eu07 -eu07m convert [dynamic]` wczytuje model istniejącym loaderem (jak `-e3d`) i zapisuje go w EU07M: - Submodel staje się węzłem. Kolejność dzieci i nazwy zostają, więc `GetFromName`, `.mmd` i eventy działają po staremu. @@ -228,13 +228,13 @@ go w EU07M: zgaduje je na nowo gra, z prawdziwym materiałem. Model pojazdu konwertuje się z `.e3d`, który robi z niego gra, nie z `.t3d`. - Wymienna skóra `-k` w przebiegu przezroczystym (bit k−1 flag E3D) ma w `MATL` flagę `translucent`. -Pozostałe polecenia: `eu07 -eu07m dump ` (zawartość jako tekst) i `eu07 -eu07m validate ` (sprawdzenie +Pozostałe polecenia: `eu07 -eu07m dump ` (zawartość jako tekst) i `eu07 -eu07m validate ` (sprawdzenie pliku wraz z hashem zawartości). ## W grze -Z `modelformat eu07m` w `eu07.ini` model z plikiem `.eu07m` obok `.e3d` / `.t3d` jest wczytywany z niego (`TModel3d::LoadFromEU07M`). -Domyślne `modelformat legacy` zostawia pliki `.eu07m` w spokoju. +Z `modelformat r3a` w `eu07.ini` model z plikiem `.r3a` obok `.e3d` / `.t3d` jest wczytywany z niego (`TModel3d::LoadFromEU07M`). +Domyślne `modelformat legacy` zostawia pliki `.r3a` w spokoju. - **Renderer Vulkan** trzyma strumienie modelu EU07M tak, jak leżą w pliku: pozycje (12 B), atrybuty z `VATT` (16 B), dane użytkownika i indeksy, każde w osobnym buforze banku (`vertex_kind::scene_compact`). Shadery czytają pozycję i UV jak dotąd, @@ -288,5 +288,5 @@ egzemplarz osobno. Dotyczy to modeli EU07M i E3D tak samo. ## Zgodność wstecz -E3D i T3D są czytane jak dotąd. Plik `.eu07m` jest wczytywany tylko wtedy, gdy istnieje, za przełącznikiem `modelformat eu07m` -w `eu07.ini`. Obecne wydanie nie czyta `.eu07m`. +E3D i T3D są czytane jak dotąd. Plik `.r3a` jest wczytywany tylko wtedy, gdy istnieje, za przełącznikiem `modelformat r3a` +w `eu07.ini`. Obecne wydanie nie czyta `.r3a`. diff --git a/model/MdlMngr.cpp b/model/MdlMngr.cpp index 4ced75029..ce3198d1a 100644 --- a/model/MdlMngr.cpp +++ b/model/MdlMngr.cpp @@ -167,8 +167,8 @@ TModelsManager::find_on_disk( std::string const &Name ) { std::vector extensions { { ".e3d" }, { ".t3d" } }; if( Global.modelformat_eu07m ) { - // a model may come as an .eu07m alone - extensions.emplace_back( ".eu07m" ); + // a model may come as an .r3a alone + extensions.emplace_back( ".r3a" ); } for( auto const &extension : extensions ) { diff --git a/model/Model3d.cpp b/model/Model3d.cpp index 24e1b4ed0..f53b3a287 100644 --- a/model/Model3d.cpp +++ b/model/Model3d.cpp @@ -1817,7 +1817,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 const Sources) { @@ -1939,10 +1939,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); diff --git a/model/eu07m/eu07m_convert.cpp b/model/eu07m/eu07m_convert.cpp index 3e6ac0676..f52c78613 100644 --- a/model/eu07m/eu07m_convert.cpp +++ b/model/eu07m/eu07m_convert.cpp @@ -315,7 +315,7 @@ bool load_source(std::string const &Input, bool const Dynamic, TModel3d &Source, auto const start{std::chrono::steady_clock::now()}; if (extension_of(Input) == ".e3d") Source.LoadFromBinFile(Input, Dynamic); - else if (extension_of(Input) == ".eu07m") + else if (extension_of(Input) == ".r3a") Source.LoadFromEU07M(Input, Dynamic); else Source.LoadFromTextFile(Input, Dynamic); @@ -476,7 +476,7 @@ void model_diff::geometry(TSubModel const &Left, TSubModel const &Right) { int command_diff(int const Argc, char *Argv[]) { if (Argc < 5) { - std::cerr << "usage: -eu07m diff [dynamic 0|1]\n"; + std::cerr << "usage: -eu07m diff [dynamic 0|1]\n"; return 2; } if (false == start_tools(Argc, Argv)) @@ -501,7 +501,7 @@ int command_diff(int const Argc, char *Argv[]) { int command_convert(int const Argc, char *Argv[]) { if (Argc < 5) { - std::cerr << "usage: -eu07m convert [dynamic 0|1] [convertmodels flags]\n"; + std::cerr << "usage: -eu07m convert [dynamic 0|1] [convertmodels flags]\n"; return 2; } std::string const input{Argv[3]}; @@ -543,7 +543,7 @@ int command_convert(int const Argc, char *Argv[]) { int command_read(int const Argc, char *Argv[], bool const Dump) { if (Argc < 4) { - std::cerr << std::format("usage: -eu07m {} \n", Dump ? "dump" : "validate"); + std::cerr << std::format("usage: -eu07m {} \n", Dump ? "dump" : "validate"); return 2; } auto const file{read_whole_file(Argv[3])}; diff --git a/utilities/Globals.cpp b/utilities/Globals.cpp index d772569fd..2ba17be91 100644 --- a/utilities/Globals.cpp +++ b/utilities/Globals.cpp @@ -1001,10 +1001,10 @@ bool global_settings::ConfigParseSimulation(cParser& Parser, const std::string& if (token == "modelformat") { - // eu07m: a model with an .eu07m file beside its .e3d / .t3d is loaded from it; legacy: the .eu07m files are left alone + // r3a: a model with an .r3a file beside its .e3d / .t3d is loaded from it; legacy: the .r3a files are left alone std::string value; ParseOne(Parser, value, 1); - modelformat_eu07m = value == "eu07m"; + modelformat_eu07m = value == "r3a"; return true; } @@ -2695,7 +2695,7 @@ global_settings::export_as_text( std::ostream &Output ) const { export_as_text( Output, "hiddenevents", iHiddenEvents ); export_as_text( Output, "pause", ( iPause & 1 ) != 0 ); export_as_text(Output, "priorityLoadText3D", priorityLoadText3D); - export_as_text(Output, "modelformat", std::string{modelformat_eu07m ? "eu07m" : "legacy"}); + export_as_text(Output, "modelformat", std::string{modelformat_eu07m ? "r3a" : "legacy"}); export_as_text( Output, "lang", asLang ); export_as_text( Output, "python.updatetime", PythonScreenUpdateRate ); Output diff --git a/utilities/Globals.h b/utilities/Globals.h index c400e97f1..2314f02d6 100644 --- a/utilities/Globals.h +++ b/utilities/Globals.h @@ -121,7 +121,7 @@ struct global_settings { int file_binary_terrain_skipped{0}; // number of terrain includes left out by the parser during the current scenery load // logs bool priorityLoadText3D{false}; // ladowanie T3D priorytetowo - bool modelformat_eu07m{false}; // modelformat eu07m: models are loaded from their .eu07m files where there are some + bool modelformat_eu07m{false}; // modelformat r3a: models are loaded from their .r3a files where there are some int iWriteLogEnabled{ 3 }; // maska bitowa: 1-zapis do pliku, 2-okienko, 4-nazwy torów bool MultipleLogs{ false }; bool crashdump_full{ false }; // crash dump with the whole memory of the process instead of the small one