aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.World/ImprovedNoise.cpp
diff options
context:
space:
mode:
authorLoki Rautio <lokirautio@gmail.com>2026-03-07 21:12:22 -0600
committerLoki Rautio <lokirautio@gmail.com>2026-03-07 21:12:22 -0600
commit087b7e7abfe81dd7f0fdcdea36ac9f245950df1a (patch)
tree69454763e73ca764af4e682d3573080b13138a0e /Minecraft.World/ImprovedNoise.cpp
parenta9be52c41a02d207233199e98898fe7483d7e817 (diff)
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 a9be52c41a02d207233199e98898fe7483d7e817.
Diffstat (limited to 'Minecraft.World/ImprovedNoise.cpp')
-rw-r--r--Minecraft.World/ImprovedNoise.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/Minecraft.World/ImprovedNoise.cpp b/Minecraft.World/ImprovedNoise.cpp
index 47f39085..8be9e385 100644
--- a/Minecraft.World/ImprovedNoise.cpp
+++ b/Minecraft.World/ImprovedNoise.cpp
@@ -46,9 +46,9 @@ double ImprovedNoise::noise(double _x, double _y, double _z)
double y = _y + yo;
double z = _z + zo;
- int xf = static_cast<int>(x);
- int yf = static_cast<int>(y);
- int zf = static_cast<int>(z);
+ int xf = (int) x;
+ int yf = (int) y;
+ int zf = (int) z;
if (x < xf) xf--;
if (y < yf) yf--;
@@ -125,7 +125,7 @@ void ImprovedNoise::add(doubleArray buffer, double _x, double _y, double _z, int
for (int xx = 0; xx < xSize; xx++)
{
double x = _x + (xx) * xs + xo;
- int xf = static_cast<int>(x);
+ int xf = (int) x;
if (x < xf) xf--;
int X = xf & 255;
x -= xf;
@@ -134,7 +134,7 @@ void ImprovedNoise::add(doubleArray buffer, double _x, double _y, double _z, int
for (int zz = 0; zz < zSize; zz++)
{
double z = _z + (zz) * zs + zo;
- int zf = static_cast<int>(z);
+ int zf = (int) z;
if (z < zf) zf--;
int Z = zf & 255;
z -= zf;
@@ -163,7 +163,7 @@ void ImprovedNoise::add(doubleArray buffer, double _x, double _y, double _z, int
for (int xx = 0; xx < xSize; xx++)
{
double x = _x + (xx) * xs + xo;
- int xf = static_cast<int>(x);
+ int xf = (int) x;
if (x < xf) xf--;
int X = xf & 255;
x -= xf;
@@ -173,7 +173,7 @@ void ImprovedNoise::add(doubleArray buffer, double _x, double _y, double _z, int
for (int zz = 0; zz < zSize; zz++)
{
double z = _z + (zz) * zs + zo;
- int zf = static_cast<int>(z);
+ int zf = (int) z;
if (z < zf) zf--;
int Z = zf & 255;
z -= zf;
@@ -183,7 +183,7 @@ void ImprovedNoise::add(doubleArray buffer, double _x, double _y, double _z, int
for (int yy = 0; yy < ySize; yy++)
{
double y = _y + (yy) * ys + yo;
- int yf = static_cast<int>(y);
+ int yf = (int) y;
if (y < yf) yf--;
int Y = yf & 255;
y -= yf;