2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2025-11-27 15:02:06 +00:00

chore: do not use using namespace in headers

This commit is contained in:
Jan Laupetin
2025-11-06 19:08:07 +01:00
parent c3d9f91a2a
commit c4152ff039
19 changed files with 78 additions and 65 deletions

View File

@@ -7,6 +7,8 @@
#include "MapEntsLinker.h"
#include "SkinnedVertsLinker.h"
using namespace T6;
namespace BSP
{
FootstepTableDef* BSPLinker::addEmptyFootstepTableAsset(std::string assetName)

View File

@@ -14,7 +14,7 @@ namespace BSP
bool linkBSP(BSPData* bsp);
private:
FootstepTableDef* addEmptyFootstepTableAsset(std::string assetName);
T6::FootstepTableDef* addEmptyFootstepTableAsset(std::string assetName);
bool addDefaultRequiredAssets(BSPData* bsp);
MemoryManager& m_memory;

View File

@@ -2,6 +2,8 @@
#include "../BSPUtil.h"
using namespace T6;
namespace BSP
{
ClipMapLinker::ClipMapLinker(MemoryManager& memory, ISearchPath& searchPath, AssetCreationContext& context)

View File

@@ -12,29 +12,29 @@ namespace BSP
{
public:
ClipMapLinker(MemoryManager& memory, ISearchPath& searchPath, AssetCreationContext& context);
clipMap_t* linkClipMap(BSPData* bsp);
T6::clipMap_t* linkClipMap(BSPData* bsp);
private:
MemoryManager& m_memory;
ISearchPath& m_search_path;
AssetCreationContext& m_context;
void loadBoxData(clipMap_t* clipMap);
void loadVisibility(clipMap_t* clipMap);
void loadDynEnts(clipMap_t* clipMap);
void loadRopesAndConstraints(clipMap_t* clipMap);
void loadSubModelCollision(clipMap_t* clipMap, BSPData* bsp);
void loadXModelCollision(clipMap_t* clipMap);
void loadBoxData(T6::clipMap_t* clipMap);
void loadVisibility(T6::clipMap_t* clipMap);
void loadDynEnts(T6::clipMap_t* clipMap);
void loadRopesAndConstraints(T6::clipMap_t* clipMap);
void loadSubModelCollision(T6::clipMap_t* clipMap, BSPData* bsp);
void loadXModelCollision(T6::clipMap_t* clipMap);
std::vector<cplane_s> planeVec;
std::vector<cNode_t> nodeVec;
std::vector<cLeaf_s> leafVec;
std::vector<CollisionAabbTree> AABBTreeVec;
std::vector<T6::cplane_s> planeVec;
std::vector<T6::cNode_t> nodeVec;
std::vector<T6::cLeaf_s> leafVec;
std::vector<T6::CollisionAabbTree> AABBTreeVec;
size_t highestLeafObjectCount = 0;
void addAABBTreeFromLeaf(clipMap_t* clipMap, BSPTree* tree, size_t* out_parentCount, size_t* out_parentStartIndex);
int16_t loadBSPNode(clipMap_t* clipMap, BSPTree* tree);
void loadBSPTree(clipMap_t* clipMap, BSPData* bsp);
bool loadPartitions(clipMap_t* clipMap, BSPData* bsp);
bool loadWorldCollision(clipMap_t* clipMap, BSPData* bsp);
void addAABBTreeFromLeaf(T6::clipMap_t* clipMap, BSPTree* tree, size_t* out_parentCount, size_t* out_parentStartIndex);
int16_t loadBSPNode(T6::clipMap_t* clipMap, BSPTree* tree);
void loadBSPTree(T6::clipMap_t* clipMap, BSPData* bsp);
bool loadPartitions(T6::clipMap_t* clipMap, BSPData* bsp);
bool loadWorldCollision(T6::clipMap_t* clipMap, BSPData* bsp);
};
} // namespace BSP

View File

@@ -1,5 +1,7 @@
#include "ComWorldLinker.h"
using namespace T6;
namespace BSP
{
ComWorldLinker::ComWorldLinker(MemoryManager& memory, ISearchPath& searchPath, AssetCreationContext& context)

View File

@@ -11,7 +11,7 @@ namespace BSP
{
public:
ComWorldLinker(MemoryManager& memory, ISearchPath& searchPath, AssetCreationContext& context);
ComWorld* linkComWorld(BSPData* bsp);
T6::ComWorld* linkComWorld(BSPData* bsp);
private:
MemoryManager& m_memory;

View File

@@ -1,5 +1,7 @@
#include "GameWorldMpLinker.h"
using namespace T6;
namespace BSP
{
GameWorldMpLinker::GameWorldMpLinker(MemoryManager& memory, ISearchPath& searchPath, AssetCreationContext& context)

View File

@@ -11,7 +11,7 @@ namespace BSP
{
public:
GameWorldMpLinker(MemoryManager& memory, ISearchPath& searchPath, AssetCreationContext& context);
GameWorldMp* linkGameWorldMp(BSPData* bsp);
T6::GameWorldMp* linkGameWorldMp(BSPData* bsp);
private:
MemoryManager& m_memory;

View File

@@ -4,6 +4,8 @@
#include "Utils/Alignment.h"
#include "Utils/Pack.h"
using namespace T6;
namespace BSP
{
GfxWorldLinker::GfxWorldLinker(MemoryManager& memory, ISearchPath& searchPath, AssetCreationContext& context)

View File

@@ -11,27 +11,27 @@ namespace BSP
{
public:
GfxWorldLinker(MemoryManager& memory, ISearchPath& searchPath, AssetCreationContext& context);
GfxWorld* linkGfxWorld(BSPData* bsp);
T6::GfxWorld* linkGfxWorld(BSPData* bsp);
private:
MemoryManager& m_memory;
ISearchPath& m_search_path;
AssetCreationContext& m_context;
void loadDrawData(BSPData* projInfo, GfxWorld* gfxWorld);
bool loadMapSurfaces(BSPData* projInfo, GfxWorld* gfxWorld);
void loadXModels(BSPData* projInfo, GfxWorld* gfxWorld);
void cleanGfxWorld(GfxWorld* gfxWorld);
void loadGfxLights(GfxWorld* gfxWorld);
void loadLightGrid(GfxWorld* gfxWorld);
void loadGfxCells(GfxWorld* gfxWorld);
void loadModels(GfxWorld* gfxWorld);
bool loadReflectionProbeData(GfxWorld* gfxWorld);
bool loadLightmapData(GfxWorld* gfxWorld);
void loadSkyBox(BSPData* projInfo, GfxWorld* gfxWorld);
void loadDynEntData(GfxWorld* gfxWorld);
bool loadOutdoors(GfxWorld* gfxWorld);
void loadSunData(GfxWorld* gfxWorld);
void loadWorldBounds(GfxWorld* gfxWorld);
void loadDrawData(BSPData* projInfo, T6::GfxWorld* gfxWorld);
bool loadMapSurfaces(BSPData* projInfo, T6::GfxWorld* gfxWorld);
void loadXModels(BSPData* projInfo, T6::GfxWorld* gfxWorld);
void cleanGfxWorld(T6::GfxWorld* gfxWorld);
void loadGfxLights(T6::GfxWorld* gfxWorld);
void loadLightGrid(T6::GfxWorld* gfxWorld);
void loadGfxCells(T6::GfxWorld* gfxWorld);
void loadModels(T6::GfxWorld* gfxWorld);
bool loadReflectionProbeData(T6::GfxWorld* gfxWorld);
bool loadLightmapData(T6::GfxWorld* gfxWorld);
void loadSkyBox(BSPData* projInfo, T6::GfxWorld* gfxWorld);
void loadDynEntData(T6::GfxWorld* gfxWorld);
bool loadOutdoors(T6::GfxWorld* gfxWorld);
void loadSunData(T6::GfxWorld* gfxWorld);
void loadWorldBounds(T6::GfxWorld* gfxWorld);
};
} // namespace BSP

View File

@@ -3,7 +3,9 @@
#include "../BSPUtil.h"
#include <nlohmann/json.hpp>
using namespace nlohmann;
using namespace T6;
namespace
{

View File

@@ -11,7 +11,7 @@ namespace BSP
{
public:
MapEntsLinker(MemoryManager& memory, ISearchPath& searchPath, AssetCreationContext& context);
MapEnts* linkMapEnts(BSPData* bsp);
T6::MapEnts* linkMapEnts(BSPData* bsp);
private:
MemoryManager& m_memory;

View File

@@ -9,11 +9,11 @@ namespace BSP
{
}
SkinnedVertsDef* SkinnedVertsLinker::linkSkinnedVerts(BSPData* bsp)
T6::SkinnedVertsDef* SkinnedVertsLinker::linkSkinnedVerts(BSPData* bsp)
{
// Pretty sure maxSkinnedVerts relates to the max amount of xmodel skinned verts a map will have
// But setting it to the world vertex count seems to work
SkinnedVertsDef* skinnedVerts = m_memory.Alloc<SkinnedVertsDef>();
T6::SkinnedVertsDef* skinnedVerts = m_memory.Alloc<T6::SkinnedVertsDef>();
skinnedVerts->name = m_memory.Dup("skinnedverts");
skinnedVerts->maxSkinnedVerts = static_cast<unsigned int>(bsp->gfxWorld.vertices.size());

View File

@@ -11,7 +11,7 @@ namespace BSP
{
public:
SkinnedVertsLinker(MemoryManager& memory, ISearchPath& searchPath, AssetCreationContext& context);
SkinnedVertsDef* linkSkinnedVerts(BSPData* bsp);
T6::SkinnedVertsDef* linkSkinnedVerts(BSPData* bsp);
private:
MemoryManager& m_memory;