mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-12-07 03:37:48 +00:00
fix: compilation on linux
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
#include "BSP.h"
|
#include "BSP.h"
|
||||||
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
namespace BSP
|
namespace BSP
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
#include "MapEntsLinker.h"
|
#include "MapEntsLinker.h"
|
||||||
#include "SkinnedVertsLinker.h"
|
#include "SkinnedVertsLinker.h"
|
||||||
|
|
||||||
|
#include <cstring>
|
||||||
#include <format>
|
#include <format>
|
||||||
|
|
||||||
using namespace T6;
|
using namespace T6;
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
#include <cstring>
|
||||||
|
|
||||||
using namespace T6;
|
using namespace T6;
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
#include "Utils/Pack.h"
|
#include "Utils/Pack.h"
|
||||||
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
#include <cstring>
|
||||||
#include <format>
|
#include <format>
|
||||||
|
|
||||||
using namespace T6;
|
using namespace T6;
|
||||||
@@ -232,7 +233,7 @@ namespace BSP
|
|||||||
|
|
||||||
// visdata is written to by the game
|
// visdata is written to by the game
|
||||||
// all visdata is aligned by 128
|
// all visdata is aligned by 128
|
||||||
const auto alignedModelCount = utils::Align(modelCount, 128uz);
|
const auto alignedModelCount = utils::Align(modelCount, 128u);
|
||||||
gfxWorld.dpvs.smodelVisDataCount = static_cast<unsigned int>(alignedModelCount);
|
gfxWorld.dpvs.smodelVisDataCount = static_cast<unsigned int>(alignedModelCount);
|
||||||
gfxWorld.dpvs.smodelVisData[0] = m_memory.Alloc<char>(alignedModelCount);
|
gfxWorld.dpvs.smodelVisData[0] = m_memory.Alloc<char>(alignedModelCount);
|
||||||
gfxWorld.dpvs.smodelVisData[1] = m_memory.Alloc<char>(alignedModelCount);
|
gfxWorld.dpvs.smodelVisData[1] = m_memory.Alloc<char>(alignedModelCount);
|
||||||
|
|||||||
@@ -61,8 +61,6 @@ namespace
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string loadMapEnts() {}
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
namespace BSP
|
namespace BSP
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ namespace
|
|||||||
const auto js = nlohmann::json::parse(*file.m_stream.get());
|
const auto js = nlohmann::json::parse(*file.m_stream.get());
|
||||||
|
|
||||||
std::string techSetName = js["name"];
|
std::string techSetName = js["name"];
|
||||||
techniqueSet->name = _strdup(techSetName.c_str());
|
techniqueSet->name = m_memory.Dup(techSetName.c_str());
|
||||||
techniqueSet->worldVertFormat = (unsigned char)js["worldVertFormat"];
|
techniqueSet->worldVertFormat = (unsigned char)js["worldVertFormat"];
|
||||||
|
|
||||||
for (int i = 0; i < 36; i++)
|
for (int i = 0; i < 36; i++)
|
||||||
@@ -50,7 +50,7 @@ namespace
|
|||||||
techniqueSet->techniques[i] = technique;
|
techniqueSet->techniques[i] = technique;
|
||||||
|
|
||||||
std::string techName = techniqueJs["name"];
|
std::string techName = techniqueJs["name"];
|
||||||
technique->name = _strdup(techName.c_str());
|
technique->name = m_memory.Dup(techName.c_str());
|
||||||
technique->flags = techniqueJs["flags"];
|
technique->flags = techniqueJs["flags"];
|
||||||
technique->passCount = techniqueJs["passCount"];
|
technique->passCount = techniqueJs["passCount"];
|
||||||
assert(technique->passCount == 1);
|
assert(technique->passCount == 1);
|
||||||
@@ -91,7 +91,7 @@ namespace
|
|||||||
consts[1] = currArgJs["u"]["const1"];
|
consts[1] = currArgJs["u"]["const1"];
|
||||||
consts[2] = currArgJs["u"]["const2"];
|
consts[2] = currArgJs["u"]["const2"];
|
||||||
consts[3] = currArgJs["u"]["const3"];
|
consts[3] = currArgJs["u"]["const3"];
|
||||||
currArg->u.literalConst = (float(*)[4])consts;
|
currArg->u.literalConst = (float (*)[4])consts;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -127,7 +127,7 @@ namespace
|
|||||||
currPass->pixelShader = new MaterialPixelShader;
|
currPass->pixelShader = new MaterialPixelShader;
|
||||||
|
|
||||||
std::string pixelName = passJs["pixelShader"]["name"];
|
std::string pixelName = passJs["pixelShader"]["name"];
|
||||||
currPass->pixelShader->name = _strdup(pixelName.c_str());
|
currPass->pixelShader->name = m_memory.Dup(pixelName.c_str());
|
||||||
currPass->pixelShader->prog.ps = nullptr;
|
currPass->pixelShader->prog.ps = nullptr;
|
||||||
|
|
||||||
const auto psFileName = shader::GetFileNameForPixelShaderAssetName(pixelName);
|
const auto psFileName = shader::GetFileNameForPixelShaderAssetName(pixelName);
|
||||||
@@ -151,7 +151,7 @@ namespace
|
|||||||
currPass->vertexShader = new MaterialVertexShader;
|
currPass->vertexShader = new MaterialVertexShader;
|
||||||
|
|
||||||
std::string vertexName = passJs["vertexShader"]["name"];
|
std::string vertexName = passJs["vertexShader"]["name"];
|
||||||
currPass->vertexShader->name = _strdup(vertexName.c_str());
|
currPass->vertexShader->name = m_memory.Dup(vertexName.c_str());
|
||||||
currPass->vertexShader->prog.vs = nullptr;
|
currPass->vertexShader->prog.vs = nullptr;
|
||||||
|
|
||||||
const auto vsFileName = shader::GetFileNameForVertexShaderAssetName(vertexName);
|
const auto vsFileName = shader::GetFileNameForVertexShaderAssetName(vertexName);
|
||||||
|
|||||||
Reference in New Issue
Block a user