renamed ttlg => lgs (because it makes slightly more sense as it follows the naming convention of ext::valve for Valve formats, although it might be better to instead be dark/source or darkengine/sourceengine)

This commit is contained in:
ecker 2026-07-20 16:41:18 -05:00
parent 4fba288af5
commit afd04c317e
10 changed files with 21 additions and 21 deletions

View File

@ -4,7 +4,7 @@
#include <uf/engine/graph/graph.h>
namespace ext {
namespace ttlg {
namespace lgs {
bool UF_API loadBin( pod::Graph& graph, const uf::stl::string& filename );
}
}

View File

@ -4,7 +4,7 @@
#include <uf/engine/graph/graph.h>
namespace ext {
namespace ttlg {
namespace lgs {
void UF_API loadMis( pod::Graph& graph, const uf::stl::string& filename, const uf::Serializer& metadata );
}
}

View File

@ -4,7 +4,7 @@
#include <uf/engine/graph/graph.h>
namespace ext {
namespace ttlg {
namespace lgs {
bool UF_API loadPalette( const uf::stl::string& family, uf::stl::vector<uint8_t>& palette );
bool UF_API loadPcx( pod::Image& image, const uf::stl::vector<uint8_t>& buffer, const uint8_t* paletteData = NULL );
}

View File

@ -9,7 +9,7 @@
#include <uf/utils/camera/camera.h>
#include <uf/ext/xatlas/xatlas.h>
#include <uf/ext/valve/bsp.h>
#include <uf/ext/ttlg/mis.h>
#include <uf/ext/lgs/mis.h>
#include <uf/utils/io/fmt.h>
#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 ) + "/";

View File

@ -1,5 +1,5 @@
#include <uf/ext/ttlg/bin.h>
#include <uf/ext/ttlg/common.h>
#include <uf/ext/lgs/bin.h>
#include <uf/ext/lgs/common.h>
#include <uf/ext/valve/common.h>
#include <uf/ext/zlib/zlib.h>
#include <uf/utils/memory/reader.h>
@ -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<uint8_t> buffer;
if ( !uf::io::exists( filename ) ) {
UF_MSG_ERROR("BIN does not exist: {}", filename);

View File

@ -0,0 +1 @@
#include <uf/ext/lgs/common.h>

View File

@ -1,7 +1,7 @@
#include <uf/ext/ttlg/common.h>
#include <uf/ext/ttlg/mis.h>
#include <uf/ext/ttlg/bin.h>
#include <uf/ext/ttlg/pcx.h>
#include <uf/ext/lgs/common.h>
#include <uf/ext/lgs/mis.h>
#include <uf/ext/lgs/bin.h>
#include <uf/ext/lgs/pcx.h>
#include <uf/ext/valve/common.h>
#include <uf/ext/zlib/zlib.h>
@ -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 ) ) {

View File

@ -1,7 +1,7 @@
#include <uf/ext/ttlg/common.h>
#include <uf/ext/ttlg/pcx.h>
#include <uf/ext/lgs/common.h>
#include <uf/ext/lgs/pcx.h>
bool ext::ttlg::loadPalette( const uf::stl::string& family, uf::stl::vector<uint8_t>& palette ) {
bool ext::lgs::loadPalette( const uf::stl::string& family, uf::stl::vector<uint8_t>& 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<uint
return true;
}
bool ext::ttlg::loadPcx( pod::Image& image, const uf::stl::vector<uint8_t>& buffer, const uint8_t* paletteData ) {
bool ext::lgs::loadPcx( pod::Image& image, const uf::stl::vector<uint8_t>& buffer, const uint8_t* paletteData ) {
if ( buffer.size() < 128 ) return false;
if ( buffer[0] != 10 || buffer[2] != 1 ) return false;

View File

@ -1 +0,0 @@
#include <uf/ext/ttlg/common.h>