mirror of
https://github.com/XProger/OpenLara.git
synced 2025-08-16 01:54:38 +02:00
#15 TR3 PSX format loader (WIP)
This commit is contained in:
1057
src/format.h
1057
src/format.h
File diff suppressed because it is too large
Load Diff
17
src/mesh.h
17
src/mesh.h
@@ -443,7 +443,7 @@ struct MeshBuilder {
|
||||
TR::Model &model = level.models[i];
|
||||
for (int j = 0; j < model.mCount; j++) {
|
||||
int index = level.meshOffsets[model.mStart + j];
|
||||
if (!index && model.mStart + j > 0)
|
||||
if (index == -1)
|
||||
continue;
|
||||
TR::Mesh &mesh = level.meshes[index];
|
||||
iCount += (mesh.rCount * 6 + mesh.tCount * 3) * DOUBLE_SIDED;
|
||||
@@ -562,13 +562,14 @@ struct MeshBuilder {
|
||||
#endif
|
||||
|
||||
int index = level.meshOffsets[model.mStart + j];
|
||||
if (index || model.mStart + j <= 0) {
|
||||
TR::Mesh &mesh = level.meshes[index];
|
||||
#ifndef MERGE_MODELS
|
||||
geom.getNextRange(vStartModel, iCount, 0xFFFF, 0xFFFF);
|
||||
#endif
|
||||
buildMesh(geom, blendMask, mesh, level, indices, vertices, iCount, vCount, vStartModel, j, 0, 0, 0, 0, COLOR_WHITE);
|
||||
}
|
||||
if (index == -1)
|
||||
continue;
|
||||
|
||||
TR::Mesh &mesh = level.meshes[index];
|
||||
#ifndef MERGE_MODELS
|
||||
geom.getNextRange(vStartModel, iCount, 0xFFFF, 0xFFFF);
|
||||
#endif
|
||||
buildMesh(geom, blendMask, mesh, level, indices, vertices, iCount, vCount, vStartModel, j, 0, 0, 0, 0, COLOR_WHITE);
|
||||
|
||||
#ifndef MERGE_MODELS
|
||||
geom.finish(iCount);
|
||||
|
Reference in New Issue
Block a user