mirror of
https://github.com/ZDoom/ZDRay.git
synced 2024-11-21 19:50:54 +00:00
Minor possible fixes
This commit is contained in:
parent
13178635b7
commit
5c0e9e0db2
1 changed files with 7 additions and 4 deletions
|
@ -420,6 +420,7 @@ void LevelMesh::CreateTextures()
|
|||
if (bShouldLookupTexture)
|
||||
{
|
||||
sortedSurfaces.push_back(surface.get());
|
||||
surface->atlasPageIndex = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1217,7 +1218,9 @@ struct SurfaceEntry
|
|||
}
|
||||
}
|
||||
|
||||
int version = 2;
|
||||
printf(" Writing %u surfaces out of %llu\n", surfaceCount, surfaces.size());
|
||||
|
||||
const int version = 2;
|
||||
|
||||
const uint32_t headerSize = sizeof(int) + 3 * sizeof(uint32_t);
|
||||
const uint32_t bytesPerSurfaceEntry = sizeof(uint32_t) * 6 + sizeof(uint16_t) * 2;
|
||||
|
@ -1297,9 +1300,9 @@ struct SurfaceEntry
|
|||
|
||||
for (const auto& pixel : surface->texPixels)
|
||||
{
|
||||
lumpFile.Write16(floatToHalf(pixel.r));
|
||||
lumpFile.Write16(floatToHalf(pixel.g));
|
||||
lumpFile.Write16(floatToHalf(pixel.b));
|
||||
lumpFile.Write16(floatToHalf(clamp(pixel.r, 0.0f, 65000.0f)));
|
||||
lumpFile.Write16(floatToHalf(clamp(pixel.g, 0.0f, 65000.0f)));
|
||||
lumpFile.Write16(floatToHalf(clamp(pixel.b, 0.0f, 65000.0f)));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue