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

@@ -30,7 +30,7 @@ void Dimension::updateLightRamp()
float ambientLight = 0.00f;
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;
}
}
@@ -70,7 +70,7 @@ Dimension::~Dimension()
{
delete[] brightnessRamp;
if(biomeSource != nullptr)
if(biomeSource != NULL)
delete biomeSource;
}
@@ -115,7 +115,7 @@ bool Dimension::isValidSpawn(int x, int z) const
float Dimension::getTimeOfDay(int64_t time, float a) const
{
int dayStep = static_cast<int>(time % Level::TICKS_PER_DAY);
int dayStep = (int) (time % Level::TICKS_PER_DAY);
float td = (dayStep + a) / Level::TICKS_PER_DAY - 0.25f;
if (td < 0) td += 1;
if (td > 1) td -= 1;
@@ -127,7 +127,7 @@ float Dimension::getTimeOfDay(int64_t time, float a) const
int Dimension::getMoonPhase(int64_t time) const
{
return static_cast<int>(time / Level::TICKS_PER_DAY) % 8;
return ((int) (time / Level::TICKS_PER_DAY)) % 8;
}
bool Dimension::isNaturalDimension()
@@ -161,7 +161,7 @@ float *Dimension::getSunriseColor(float td, float a)
return sunriseCol;
}
return nullptr;
return NULL;
}
Vec3 *Dimension::getFogColor(float td, float a) const
@@ -192,12 +192,12 @@ Dimension *Dimension::getNew(int id)
if (id == 0) return new NormalDimension();
if (id == 1) return new TheEndDimension();
return nullptr;
return NULL;
}
float Dimension::getCloudHeight()
{
return static_cast<float>(Level::genDepth);
return (float)Level::genDepth;
}
bool Dimension::hasGround()
@@ -207,7 +207,7 @@ bool Dimension::hasGround()
Pos *Dimension::getSpawnPos()
{
return nullptr;
return NULL;
}
int Dimension::getSpawnYPosition()