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