diff --git a/engine/inc/uf/ext/ttlg/bin.h b/engine/inc/uf/ext/lgs/bin.h similarity index 86% rename from engine/inc/uf/ext/ttlg/bin.h rename to engine/inc/uf/ext/lgs/bin.h index 4723735e..8f33db65 100644 --- a/engine/inc/uf/ext/ttlg/bin.h +++ b/engine/inc/uf/ext/lgs/bin.h @@ -4,7 +4,7 @@ #include namespace ext { - namespace ttlg { + namespace lgs { bool UF_API loadBin( pod::Graph& graph, const uf::stl::string& filename ); } } \ No newline at end of file diff --git a/engine/inc/uf/ext/ttlg/common.h b/engine/inc/uf/ext/lgs/common.h similarity index 100% rename from engine/inc/uf/ext/ttlg/common.h rename to engine/inc/uf/ext/lgs/common.h diff --git a/engine/inc/uf/ext/ttlg/mis.h b/engine/inc/uf/ext/lgs/mis.h similarity index 88% rename from engine/inc/uf/ext/ttlg/mis.h rename to engine/inc/uf/ext/lgs/mis.h index b05b60fc..3e97ae5d 100644 --- a/engine/inc/uf/ext/ttlg/mis.h +++ b/engine/inc/uf/ext/lgs/mis.h @@ -4,7 +4,7 @@ #include namespace ext { - namespace ttlg { + namespace lgs { void UF_API loadMis( pod::Graph& graph, const uf::stl::string& filename, const uf::Serializer& metadata ); } } \ No newline at end of file diff --git a/engine/inc/uf/ext/ttlg/pcx.h b/engine/inc/uf/ext/lgs/pcx.h similarity index 91% rename from engine/inc/uf/ext/ttlg/pcx.h rename to engine/inc/uf/ext/lgs/pcx.h index 32601abb..e01a02ce 100644 --- a/engine/inc/uf/ext/ttlg/pcx.h +++ b/engine/inc/uf/ext/lgs/pcx.h @@ -4,7 +4,7 @@ #include namespace ext { - namespace ttlg { + namespace lgs { bool UF_API loadPalette( const uf::stl::string& family, uf::stl::vector& palette ); bool UF_API loadPcx( pod::Image& image, const uf::stl::vector& buffer, const uint8_t* paletteData = NULL ); } diff --git a/engine/src/engine/graph/decode.cpp b/engine/src/engine/graph/decode.cpp index 3c124d35..5e7ea8d1 100644 --- a/engine/src/engine/graph/decode.cpp +++ b/engine/src/engine/graph/decode.cpp @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #define UF_GRAPH_LOAD_MULTITHREAD 0 @@ -307,7 +307,7 @@ void uf::graph::load( pod::Graph& graph, const uf::stl::string& filename, const if ( extension == "bsp" ) return ext::valve::loadBsp( graph, filename, metadata ); #endif #if UF_USE_TTLG - if ( extension == "mis" ) return ext::ttlg::loadMis( graph, filename, metadata ); + if ( extension == "mis" ) return ext::lgs::loadMis( graph, filename, metadata ); #endif const uf::stl::string directory = uf::io::directory( filename ) + "/"; diff --git a/engine/src/ext/ttlg/bin.cpp b/engine/src/ext/lgs/bin.cpp similarity index 95% rename from engine/src/ext/ttlg/bin.cpp rename to engine/src/ext/lgs/bin.cpp index c441ae23..2e04c7c1 100644 --- a/engine/src/ext/ttlg/bin.cpp +++ b/engine/src/ext/lgs/bin.cpp @@ -1,5 +1,5 @@ -#include -#include +#include +#include #include #include #include @@ -126,7 +126,7 @@ namespace impl { }; } -bool ext::ttlg::loadBin( pod::Graph& graph, const uf::stl::string& filename ) { +bool ext::lgs::loadBin( pod::Graph& graph, const uf::stl::string& filename ) { uf::stl::vector buffer; if ( !uf::io::exists( filename ) ) { UF_MSG_ERROR("BIN does not exist: {}", filename); diff --git a/engine/src/ext/lgs/common.cpp b/engine/src/ext/lgs/common.cpp new file mode 100644 index 00000000..625eac42 --- /dev/null +++ b/engine/src/ext/lgs/common.cpp @@ -0,0 +1 @@ +#include diff --git a/engine/src/ext/ttlg/mis.cpp b/engine/src/ext/lgs/mis.cpp similarity index 96% rename from engine/src/ext/ttlg/mis.cpp rename to engine/src/ext/lgs/mis.cpp index 8e5b9604..788b7598 100644 --- a/engine/src/ext/ttlg/mis.cpp +++ b/engine/src/ext/lgs/mis.cpp @@ -1,7 +1,7 @@ -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -1059,9 +1059,9 @@ namespace impl { std::transform(lowerTarget.begin(), lowerTarget.end(), lowerTarget.begin(), ::tolower); if ( lowerTarget.ends_with(".pcx") ) { - if ( !family.empty() ) ext::ttlg::loadPalette( family, ctx.palettes[family] ); + if ( !family.empty() ) ext::lgs::loadPalette( family, ctx.palettes[family] ); const uint8_t* palette = (!family.empty() && !ctx.palettes[family].empty()) ? ctx.palettes[family].data() : nullptr; - if ( !ext::ttlg::loadPcx( image, buffer, palette ) ) { + if ( !ext::lgs::loadPcx( image, buffer, palette ) ) { UF_MSG_ERROR("Failed to load PCX: {}", targetPath); } else { loaded = true; @@ -1471,7 +1471,7 @@ namespace impl { node.mesh = (int32_t)std::distance(graph.meshes.begin(), it); } else if ( !impl::modelBlacklist.count( model ) ) { size_t meshID = graph.meshes.size(); - if ( ext::ttlg::loadBin( graph, path ) ) { + if ( ext::lgs::loadBin( graph, path ) ) { node.mesh = (int32_t)(meshID); } else { node.mesh = -1; @@ -1933,7 +1933,7 @@ namespace impl { } } -void ext::ttlg::loadMis( pod::Graph& graph, const uf::stl::string& filename, const uf::Serializer& metadata ) { +void ext::lgs::loadMis( pod::Graph& graph, const uf::stl::string& filename, const uf::Serializer& metadata ) { impl::DarkContext ctx; auto& buffer = ctx.buffer; if ( !uf::io::readAsBuffer( buffer, filename ) ) { diff --git a/engine/src/ext/ttlg/pcx.cpp b/engine/src/ext/lgs/pcx.cpp similarity index 87% rename from engine/src/ext/ttlg/pcx.cpp rename to engine/src/ext/lgs/pcx.cpp index afd9e9fd..17e329ef 100644 --- a/engine/src/ext/ttlg/pcx.cpp +++ b/engine/src/ext/lgs/pcx.cpp @@ -1,7 +1,7 @@ -#include -#include +#include +#include -bool ext::ttlg::loadPalette( const uf::stl::string& family, uf::stl::vector& palette ) { +bool ext::lgs::loadPalette( const uf::stl::string& family, uf::stl::vector& palette ) { if ( family.empty() ) return false; if ( !palette.empty() ) return true; @@ -32,7 +32,7 @@ bool ext::ttlg::loadPalette( const uf::stl::string& family, uf::stl::vector& buffer, const uint8_t* paletteData ) { +bool ext::lgs::loadPcx( pod::Image& image, const uf::stl::vector& buffer, const uint8_t* paletteData ) { if ( buffer.size() < 128 ) return false; if ( buffer[0] != 10 || buffer[2] != 1 ) return false; diff --git a/engine/src/ext/ttlg/common.cpp b/engine/src/ext/ttlg/common.cpp deleted file mode 100644 index 30c21f7e..00000000 --- a/engine/src/ext/ttlg/common.cpp +++ /dev/null @@ -1 +0,0 @@ -#include