From 18266845a6c525323735ebb23f512a75157c7cea Mon Sep 17 00:00:00 2001 From: lllzebralll Date: Wed, 10 Aug 2022 20:24:13 +0300 Subject: [PATCH] delete comment --- src/graphics/VoxelRenderer.cpp | 38 ---------------------------------- src/voxels/WorldGenerator.cpp | 14 ------------- 2 files changed, 52 deletions(-) diff --git a/src/graphics/VoxelRenderer.cpp b/src/graphics/VoxelRenderer.cpp index ce44e1f4..76f984c1 100644 --- a/src/graphics/VoxelRenderer.cpp +++ b/src/graphics/VoxelRenderer.cpp @@ -450,41 +450,3 @@ const float* VoxelRenderer::render(Chunk* chunk, const Chunk** chunks, size_t& s size = buffer.size(); return &buffer[0]; } - - - - // float lr0 = (LIGHT(x+1,y-1,z-1,0) + lr*30 + LIGHT(x+1,y,z-1,0) + LIGHT(x+1,y-1,z,0)) / 75.0f; - // float lr1 = (LIGHT(x+1,y+1,z-1,0) + lr*30 + LIGHT(x+1,y,z-1,0) + LIGHT(x+1,y+1,z,0)) / 75.0f; - // float lr2 = (LIGHT(x+1,y+1,z+1,0) + lr*30 + LIGHT(x+1,y,z+1,0) + LIGHT(x+1,y+1,z,0)) / 75.0f; - // float lr3 = (LIGHT(x+1,y-1,z+1,0) + lr*30 + LIGHT(x+1,y,z+1,0) + LIGHT(x+1,y-1,z,0)) / 75.0f; - // float lr4 = (LIGHT(x+1,y-1,z-1,0) + lr*30 + LIGHT(x+1,y,z-1,0) + LIGHT(x+1,y-1,z,0)) / 75.0f; - // float lr5 = (LIGHT(x+1,y+1,z-1,0) + lr*30 + LIGHT(x+1,y,z-1,0) + LIGHT(x+1,y+1,z,0)) / 75.0f; - // float lr6 = (LIGHT(x+1,y+1,z+1,0) + lr*30 + LIGHT(x+1,y,z+1,0) + LIGHT(x+1,y+1,z,0)) / 75.0f; - // float lr7 = (LIGHT(x+1,y-1,z+1,0) + lr*30 + LIGHT(x+1,y,z+1,0) + LIGHT(x+1,y-1,z,0)) / 75.0f; - - // float lg0 = (LIGHT(x+1,y-1,z-1,1) + lg*30 + LIGHT(x+1,y,z-1,1) + LIGHT(x+1,y-1,z,1)) / 75.0f; - // float lg1 = (LIGHT(x+1,y+1,z-1,1) + lg*30 + LIGHT(x+1,y,z-1,1) + LIGHT(x+1,y+1,z,1)) / 75.0f; - // float lg2 = (LIGHT(x+1,y+1,z+1,1) + lg*30 + LIGHT(x+1,y,z+1,1) + LIGHT(x+1,y+1,z,1)) / 75.0f; - // float lg3 = (LIGHT(x+1,y-1,z+1,1) + lg*30 + LIGHT(x+1,y,z+1,1) + LIGHT(x+1,y-1,z,1)) / 75.0f; - // float lg4 = (LIGHT(x+1,y-1,z-1,0) + lg*30 + LIGHT(x+1,y,z-1,0) + LIGHT(x+1,y-1,z,0)) / 75.0f; - // float lg5 = (LIGHT(x+1,y+1,z-1,0) + lg*30 + LIGHT(x+1,y,z-1,0) + LIGHT(x+1,y+1,z,0)) / 75.0f; - // float lg6 = (LIGHT(x+1,y+1,z+1,0) + lg*30 + LIGHT(x+1,y,z+1,0) + LIGHT(x+1,y+1,z,0)) / 75.0f; - // float lg7 = (LIGHT(x+1,y-1,z+1,0) + lg*30 + LIGHT(x+1,y,z+1,0) + LIGHT(x+1,y-1,z,0)) / 75.0f; - - // float lb0 = (LIGHT(x+1,y-1,z-1,2) + lb*30 + LIGHT(x+1,y,z-1,2) + LIGHT(x+1,y-1,z,2)) / 75.0f; - // float lb1 = (LIGHT(x+1,y+1,z-1,2) + lb*30 + LIGHT(x+1,y,z-1,2) + LIGHT(x+1,y+1,z,2)) / 75.0f; - // float lb2 = (LIGHT(x+1,y+1,z+1,2) + lb*30 + LIGHT(x+1,y,z+1,2) + LIGHT(x+1,y+1,z,2)) / 75.0f; - // float lb3 = (LIGHT(x+1,y-1,z+1,2) + lb*30 + LIGHT(x+1,y,z+1,2) + LIGHT(x+1,y-1,z,2)) / 75.0f; - // float lb4 = (LIGHT(x+1,y-1,z-1,0) + lb*30 + LIGHT(x+1,y,z-1,0) + LIGHT(x+1,y-1,z,0)) / 75.0f; - // float lb5 = (LIGHT(x+1,y+1,z-1,0) + lb*30 + LIGHT(x+1,y,z-1,0) + LIGHT(x+1,y+1,z,0)) / 75.0f; - // float lb6 = (LIGHT(x+1,y+1,z+1,0) + lb*30 + LIGHT(x+1,y,z+1,0) + LIGHT(x+1,y+1,z,0)) / 75.0f; - // float lb7 = (LIGHT(x+1,y-1,z+1,0) + lb*30 + LIGHT(x+1,y,z+1,0) + LIGHT(x+1,y-1,z,0)) / 75.0f; - - // float ls0 = (LIGHT(x+1,y-1,z-1,3) + ls*30 + LIGHT(x+1,y,z-1,3) + LIGHT(x+1,y-1,z,3)) / 75.0f; - // float ls1 = (LIGHT(x+1,y+1,z-1,3) + ls*30 + LIGHT(x+1,y,z-1,3) + LIGHT(x+1,y+1,z,3)) / 75.0f; - // float ls2 = (LIGHT(x+1,y+1,z+1,3) + ls*30 + LIGHT(x+1,y,z+1,3) + LIGHT(x+1,y+1,z,3)) / 75.0f; - // float ls3 = (LIGHT(x+1,y-1,z+1,3) + ls*30 + LIGHT(x+1,y,z+1,3) + LIGHT(x+1,y-1,z,3)) / 75.0f; - // float ls4 = (LIGHT(x+1,y-1,z-1,0) + ls*30 + LIGHT(x+1,y,z-1,0) + LIGHT(x+1,y-1,z,0)) / 75.0f; - // float ls5 = (LIGHT(x+1,y+1,z-1,0) + ls*30 + LIGHT(x+1,y,z-1,0) + LIGHT(x+1,y+1,z,0)) / 75.0f; - // float ls6 = (LIGHT(x+1,y+1,z+1,0) + ls*30 + LIGHT(x+1,y,z+1,0) + LIGHT(x+1,y+1,z,0)) / 75.0f; - // float ls7 = (LIGHT(x+1,y-1,z+1,0) + ls*30 + LIGHT(x+1,y,z+1,0) + LIGHT(x+1,y-1,z,0)) / 75.0f; \ No newline at end of file diff --git a/src/voxels/WorldGenerator.cpp b/src/voxels/WorldGenerator.cpp index c9f694b7..46d6e3dc 100644 --- a/src/voxels/WorldGenerator.cpp +++ b/src/voxels/WorldGenerator.cpp @@ -17,17 +17,6 @@ public: } int rand(){ - // seed = ((unsigned short)8253729 xor seed + (unsigned short)2396403 xor (unsigned short)time(0)) * (seed xor (unsigned short)2124678); - // unsigned short a = seed xor 0xf1ad; - // unsigned short b = seed * 0x7fb7; - // unsigned short c = a * 0xa77c; - // unsigned short d = b xor c; - // unsigned short e = d * seed % 0x6a; - // unsigned short f = c < seed % 0x10; - - // seed = (f % e) - a; - // seed = ((a + d) * b - c) * e + f; - seed = (seed + 0x7ed5 + (seed << 6)); seed = (seed ^ 0xc23c ^ (seed >> 9)); seed = (seed + 0x1656 + (seed << 3)); @@ -45,7 +34,6 @@ public: }; float calc_height(fnl_state *noise, int real_x, int real_z){ - // const float s = 0.18f; float height = fnlGetNoise3D(noise, real_x*0.0125f*8,real_z*0.0125f*8, 0.0f); height += fnlGetNoise3D(noise, real_x*0.025f*8,real_z*0.025f*8, 0.0f)*0.5f; height += fnlGetNoise3D(noise, real_x*0.05f*8,real_z*0.05f*8, 0.0f)*0.25f; @@ -63,7 +51,6 @@ float calc_height(fnl_state *noise, int real_x, int real_z){ } float calc_height_faster(fnl_state *noise, int real_x, int real_z){ - // const float s = 0.18f; float height = fnlGetNoise3D(noise, real_x*0.0125f*8,real_z*0.0125f*8, 0.0f); height += fnlGetNoise3D(noise, real_x*0.025f*8,real_z*0.025f*8, 0.0f)*0.5f; height += fnlGetNoise3D(noise, real_x*0.05f*8,real_z*0.05f*8, 0.0f)*0.25f; @@ -72,7 +59,6 @@ float calc_height_faster(fnl_state *noise, int real_x, int real_z){ real_z*0.2f*8 + fnlGetNoise3D(noise, real_x*0.1f*8+4363,real_z*0.1f*8, 0.0f)*50, 0.0f)*0.1f; height += fnlGetNoise3D(noise, real_x*0.1f*8,real_z*0.1f*8, 0.0f)*0.125f; - // height += fnlGetNoise3D(noise, real_x*0.4f*8,real_z*0.4f*8, 0.0f)*0.125f*0.5F; height *= fnlGetNoise3D(noise, real_x*0.0125f*8+1000,real_z*0.0125f*8+1000, 0.0f)/2+0.5f; height += 1.0f; height *= 64.0f;