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 <cstdint>
|
||||
#include <memory>
|
||||
|
||||
namespace BSP
|
||||
{
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include "MapEntsLinker.h"
|
||||
#include "SkinnedVertsLinker.h"
|
||||
|
||||
#include <cstring>
|
||||
#include <format>
|
||||
|
||||
using namespace T6;
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <cstring>
|
||||
|
||||
using namespace T6;
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "Utils/Pack.h"
|
||||
|
||||
#include <cassert>
|
||||
#include <cstring>
|
||||
#include <format>
|
||||
|
||||
using namespace T6;
|
||||
@@ -232,7 +233,7 @@ namespace BSP
|
||||
|
||||
// visdata is written to by the game
|
||||
// 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.smodelVisData[0] = m_memory.Alloc<char>(alignedModelCount);
|
||||
gfxWorld.dpvs.smodelVisData[1] = m_memory.Alloc<char>(alignedModelCount);
|
||||
|
||||
@@ -61,8 +61,6 @@ namespace
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
std::string loadMapEnts() {}
|
||||
} // namespace
|
||||
|
||||
namespace BSP
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace
|
||||
const auto js = nlohmann::json::parse(*file.m_stream.get());
|
||||
|
||||
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"];
|
||||
|
||||
for (int i = 0; i < 36; i++)
|
||||
@@ -50,7 +50,7 @@ namespace
|
||||
techniqueSet->techniques[i] = technique;
|
||||
|
||||
std::string techName = techniqueJs["name"];
|
||||
technique->name = _strdup(techName.c_str());
|
||||
technique->name = m_memory.Dup(techName.c_str());
|
||||
technique->flags = techniqueJs["flags"];
|
||||
technique->passCount = techniqueJs["passCount"];
|
||||
assert(technique->passCount == 1);
|
||||
@@ -127,7 +127,7 @@ namespace
|
||||
currPass->pixelShader = new MaterialPixelShader;
|
||||
|
||||
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;
|
||||
|
||||
const auto psFileName = shader::GetFileNameForPixelShaderAssetName(pixelName);
|
||||
@@ -151,7 +151,7 @@ namespace
|
||||
currPass->vertexShader = new MaterialVertexShader;
|
||||
|
||||
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;
|
||||
|
||||
const auto vsFileName = shader::GetFileNameForVertexShaderAssetName(vertexName);
|
||||
|
||||
Reference in New Issue
Block a user