Revert "Project modernization (#630)"

This code was not tested and breaks in Release builds, reverting to restore
functionality of the nightly. All in-game menus do not work and generating
a world crashes.

This reverts commit a9be52c41a.
This commit is contained in:
Loki Rautio
2026-03-07 21:12:22 -06:00
parent a9be52c41a
commit 087b7e7abf
1373 changed files with 19449 additions and 19903 deletions

View File

@@ -23,9 +23,9 @@ Vec3 *HellDimension::getFogColor(float td, float a) const
byte greenComponent = ((colour>>8)&0xFF);
byte blueComponent = ((colour)&0xFF);
float rr = static_cast<float>(redComponent)/256;//0.2f;
float gg = static_cast<float>(greenComponent)/256;//0.03f;
float bb = static_cast<float>(blueComponent)/256;//0.03f;
float rr = (float)redComponent/256;//0.2f;
float gg = (float)greenComponent/256;//0.03f;
float bb = (float)blueComponent/256;//0.03f;
return Vec3::newTemp(rr, gg, bb);
}
@@ -34,7 +34,7 @@ void HellDimension::updateLightRamp()
float ambientLight = 0.10f;
for (int i = 0; i <= Level::MAX_BRIGHTNESS; i++)
{
float v = (1 - i / static_cast<float>(Level::MAX_BRIGHTNESS));
float v = (1 - i / (float) (Level::MAX_BRIGHTNESS));
brightnessRamp[i] = ((1 - v) / (v * 3 + 1)) * (1 - ambientLight) + ambientLight;
}
}
@@ -85,5 +85,5 @@ bool HellDimension::isFoggyAt(int x, int z)
int HellDimension::getXZSize()
{
return ceil(static_cast<float>(level->getLevelData()->getXZSize()) / level->getLevelData()->getHellScale());
return ceil((float)level->getLevelData()->getXZSize() / level->getLevelData()->getHellScale());
}