diff --git a/Minecraft.Client/GameRenderer.cpp b/Minecraft.Client/GameRenderer.cpp index e1eb6c5f..9de2da69 100644 --- a/Minecraft.Client/GameRenderer.cpp +++ b/Minecraft.Client/GameRenderer.cpp @@ -2243,19 +2243,6 @@ void GameRenderer::setupFog(int i, float alpha) if (i == 999) { __debugbreak(); - // 4J TODO - /* - glFog(GL_FOG_COLOR, getBuffer(0, 0, 0, 1)); - glFogi(GL_FOG_MODE, GL_LINEAR); - glFogf(GL_FOG_START, 0); - glFogf(GL_FOG_END, 8); - - if (GLContext.getCapabilities().GL_NV_fog_distance) { - glFogi(NVFogDistance.GL_FOG_DISTANCE_MODE_NV, NVFogDistance.GL_EYE_RADIAL_NV); - } - - glFogf(GL_FOG_START, 0); - */ return; } @@ -2346,14 +2333,8 @@ void GameRenderer::setupFog(int i, float alpha) glFogf(GL_FOG_START, distance * 0.25f); glFogf(GL_FOG_END, distance); } - /* 4J - removed - TODO investigate - if (GLContext.getCapabilities().GL_NV_fog_distance) - { - glFogi(NVFogDistance.GL_FOG_DISTANCE_MODE_NV, NVFogDistance.GL_EYE_RADIAL_NV); - } - */ - if (mc->level->dimension->isFoggyAt(static_cast(player->x), static_cast(player->z))) + if (mc->level->getBiome(static_cast(player->x), static_cast(player->z))->isFoggy()) { glFogf(GL_FOG_START, distance * 0.05f); glFogf(GL_FOG_END, min(distance, 16 * 16 * .75f) * .5f); diff --git a/Minecraft.World/Dimension.cpp b/Minecraft.World/Dimension.cpp index 3b309c76..2f5096f5 100644 --- a/Minecraft.World/Dimension.cpp +++ b/Minecraft.World/Dimension.cpp @@ -222,11 +222,6 @@ double Dimension::getClearColorScale() return 1.0 / 32.0; } -bool Dimension::isFoggyAt(int x, int z) -{ - return false; -} - int Dimension::getXZSize() { return level->getLevelData()->getXZSize(); diff --git a/Minecraft.World/Dimension.h b/Minecraft.World/Dimension.h index 76931270..8fe0c861 100644 --- a/Minecraft.World/Dimension.h +++ b/Minecraft.World/Dimension.h @@ -55,7 +55,6 @@ public: int getSpawnYPosition(); virtual bool hasBedrockFog(); double getClearColorScale(); - virtual bool isFoggyAt(int x, int z); // 4J Added virtual int getXZSize(); diff --git a/Minecraft.World/HellDimension.cpp b/Minecraft.World/HellDimension.cpp index ce4aaa94..552e5895 100644 --- a/Minecraft.World/HellDimension.cpp +++ b/Minecraft.World/HellDimension.cpp @@ -65,11 +65,6 @@ bool HellDimension::mayRespawn() const return false; } -bool HellDimension::isFoggyAt(int x, int z) -{ - return true; -} - int HellDimension::getXZSize() { return ceil(static_cast(level->getLevelData()->getXZSize()) / level->getLevelData()->getHellScale()); diff --git a/Minecraft.World/HellDimension.h b/Minecraft.World/HellDimension.h index 7ac537a9..f097df3c 100644 --- a/Minecraft.World/HellDimension.h +++ b/Minecraft.World/HellDimension.h @@ -15,7 +15,6 @@ public: virtual bool isValidSpawn(int x, int y) const; virtual float getTimeOfDay(int64_t time, float a) const; virtual bool mayRespawn() const; - virtual bool isFoggyAt(int x, int z); // 4J Added virtual int getXZSize(); diff --git a/Minecraft.World/SwampBiome.cpp b/Minecraft.World/SwampBiome.cpp index 33403d90..a3d7dfeb 100644 --- a/Minecraft.World/SwampBiome.cpp +++ b/Minecraft.World/SwampBiome.cpp @@ -12,31 +12,11 @@ SwampBiome::SwampBiome(int id) : Biome(id) decorator->reedsCount = 10; decorator->clayCount = 1; decorator->waterlilyCount = 4; - - // waterColor = 0xe0ffae; enemies.push_back(new MobSpawnerData(eTYPE_SLIME, 1, 1, 1)); } - Feature *SwampBiome::getTreeFeature(Random *random) { return new SwampTreeFeature(); // 4J used to return member swampTree, now returning newly created object so that caller can be consistently resposible for cleanup -} - -// 4J Stu - Not using these any more -//int SwampBiome::getGrassColor() -//{ -// double temp = getTemperature(); -// double rain = getDownfall(); -// -// return ((GrassColor::get(temp, rain) & 0xfefefe) + 0x4e0e4e) / 2; -//} -// -//int SwampBiome::getFolageColor() -//{ -// double temp = getTemperature(); -// double rain = getDownfall(); -// -// return ((FoliageColor::get(temp, rain) & 0xfefefe) + 0x4e0e4e) / 2; -//} \ No newline at end of file +} \ No newline at end of file diff --git a/Minecraft.World/TheEndDimension.cpp b/Minecraft.World/TheEndDimension.cpp index ddf3c5ea..202e0caf 100644 --- a/Minecraft.World/TheEndDimension.cpp +++ b/Minecraft.World/TheEndDimension.cpp @@ -63,11 +63,6 @@ Pos *TheEndDimension::getSpawnPos() return new Pos(100, 50, 0); } -bool TheEndDimension::isFoggyAt(int x, int z) -{ - return true; -} - int TheEndDimension::getSpawnYPosition() { return 50; diff --git a/Minecraft.World/TheEndDimension.h b/Minecraft.World/TheEndDimension.h index 04005495..be33fab3 100644 --- a/Minecraft.World/TheEndDimension.h +++ b/Minecraft.World/TheEndDimension.h @@ -15,6 +15,5 @@ public: virtual bool isValidSpawn(int x, int z) const; virtual Pos *getSpawnPos(); virtual int getSpawnYPosition(); - virtual bool isFoggyAt(int x, int z); virtual int getBlockLightColour(); // TU25 };