mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-28 02:31:15 +00:00
Change
This commit is contained in:
parent
96cd48d3e0
commit
89f042f9b7
@ -79,7 +79,7 @@ inline Result CreateMesh(
|
||||
rpMesh->groupMesh = pD3DRM;
|
||||
|
||||
for (int i = 0; i < count; i++) {
|
||||
if (*((unsigned char*) &faceIndices[i] + 3) & 0x80) {
|
||||
if (*((unsigned char*) ((unsigned short*) &faceIndices[i] + 1) + 1) & 0x80) {
|
||||
unsigned long j = *(unsigned short*) &faceIndices[i];
|
||||
vertices[index].position.x = pPositions[j][0];
|
||||
vertices[index].position.y = pPositions[j][1];
|
||||
@ -112,8 +112,10 @@ inline Result CreateMesh(
|
||||
}
|
||||
|
||||
if (!Succeeded(result)) {
|
||||
delete rpMesh->groupMesh;
|
||||
rpMesh->groupMesh = NULL;
|
||||
if (rpMesh) {
|
||||
delete rpMesh;
|
||||
}
|
||||
rpMesh = NULL;
|
||||
}
|
||||
else {
|
||||
result = MeshSetTextureMappingMode(rpMesh, PerspectiveCorrect);
|
||||
@ -127,10 +129,6 @@ inline Result CreateMesh(
|
||||
delete[] vertices;
|
||||
}
|
||||
|
||||
if (!Succeeded(result)) {
|
||||
delete rpMesh;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user