mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-11-23 05:12:05 +00:00
chore: fix some minor typos
This commit is contained in:
@@ -17,7 +17,7 @@ namespace
|
|||||||
assert(node->attrib_type == UFBX_ELEMENT_MESH);
|
assert(node->attrib_type == UFBX_ELEMENT_MESH);
|
||||||
|
|
||||||
if (mesh->instances.count != 1)
|
if (mesh->instances.count != 1)
|
||||||
con::warn("mesh {} has {} instances, only the 1st instace will be used.", node->name.data, mesh->instances.count);
|
con::warn("mesh {} has {} instances, only the 1st instance will be used.", node->name.data, mesh->instances.count);
|
||||||
|
|
||||||
if (mesh->num_triangles == 0)
|
if (mesh->num_triangles == 0)
|
||||||
{
|
{
|
||||||
@@ -84,9 +84,9 @@ namespace
|
|||||||
ufbx_face* face = &mesh->faces.data[faceIndex];
|
ufbx_face* face = &mesh->faces.data[faceIndex];
|
||||||
|
|
||||||
// Triangulate the face into the indices vector
|
// Triangulate the face into the indices vector
|
||||||
uint32_t triangluatedTriCount = ufbx_triangulate_face(tempIndices.data(), tempIndices.size(), mesh, *face);
|
uint32_t triangulatedTriCount = ufbx_triangulate_face(tempIndices.data(), tempIndices.size(), mesh, *face);
|
||||||
|
|
||||||
for (uint32_t idxOfIndex = 0; idxOfIndex < triangluatedTriCount * 3; idxOfIndex++)
|
for (uint32_t idxOfIndex = 0; idxOfIndex < triangulatedTriCount * 3; idxOfIndex++)
|
||||||
{
|
{
|
||||||
BSPVertex vertex;
|
BSPVertex vertex;
|
||||||
uint32_t index = tempIndices[idxOfIndex];
|
uint32_t index = tempIndices[idxOfIndex];
|
||||||
@@ -234,7 +234,7 @@ namespace BSP
|
|||||||
const auto colFile = searchPath.Open(colFbxPath);
|
const auto colFile = searchPath.Open(colFbxPath);
|
||||||
if (!colFile.IsOpen())
|
if (!colFile.IsOpen())
|
||||||
{
|
{
|
||||||
con::warn("Failed to open map collison fbx file: {}. map gfx will be used for collision instead.", colFbxPath);
|
con::warn("Failed to open map collision fbx file: {}. map gfx will be used for collision instead.", colFbxPath);
|
||||||
colScene = gfxScene;
|
colScene = gfxScene;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -397,7 +397,7 @@ namespace BSP
|
|||||||
nodeVec.emplace_back();
|
nodeVec.emplace_back();
|
||||||
|
|
||||||
cNode_t node;
|
cNode_t node;
|
||||||
node.plane = nullptr; // initalised after the BSP tree has been loaded
|
node.plane = nullptr; // initialised after the BSP tree has been loaded
|
||||||
node.children[0] = loadBSPNode(clipMap, *tree.node->front);
|
node.children[0] = loadBSPNode(clipMap, *tree.node->front);
|
||||||
node.children[1] = loadBSPNode(clipMap, *tree.node->back);
|
node.children[1] = loadBSPNode(clipMap, *tree.node->back);
|
||||||
|
|
||||||
@@ -414,7 +414,7 @@ namespace BSP
|
|||||||
for (unsigned int vertIdx = 0; vertIdx < clipMap.vertCount; vertIdx++)
|
for (unsigned int vertIdx = 0; vertIdx < clipMap.vertCount; vertIdx++)
|
||||||
{
|
{
|
||||||
vec3_t vertex = clipMap.verts[vertIdx];
|
vec3_t vertex = clipMap.verts[vertIdx];
|
||||||
// initalise AABB with the first vertex
|
// initialise AABB with the first vertex
|
||||||
if (vertIdx == 0)
|
if (vertIdx == 0)
|
||||||
{
|
{
|
||||||
worldMins = vertex;
|
worldMins = vertex;
|
||||||
|
|||||||
@@ -231,7 +231,7 @@ namespace BSP
|
|||||||
gfxWorld.dpvs.smodelDrawInsts = m_memory.Alloc<GfxStaticModelDrawInst>(modelCount);
|
gfxWorld.dpvs.smodelDrawInsts = m_memory.Alloc<GfxStaticModelDrawInst>(modelCount);
|
||||||
|
|
||||||
// visdata is written to by the game
|
// visdata is written to by the game
|
||||||
// all visdata is alligned by 128
|
// all visdata is aligned by 128
|
||||||
const auto alignedModelCount = utils::Align(modelCount, 128u);
|
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);
|
||||||
|
|||||||
Reference in New Issue
Block a user