?
This commit is contained in:
parent
ad9bcac7d2
commit
5860408378
@ -111,7 +111,7 @@
|
|||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
<LinkIncremental>true</LinkIncremental>
|
<LinkIncremental>true</LinkIncremental>
|
||||||
<IncludePath>$(ProjectDir)\external\irrKlang-1.6.0\include$(MSBuildProjectDirectory)$(MSBuildProjectDirectory);external\glew170\include;external\devil178\include;external\sfml23\include;$(IncludePath)</IncludePath>
|
<IncludePath>$(ProjectDir)\external\irrKlang-1.6.0\include$(MSBuildProjectDirectory)$(MSBuildProjectDirectory);external\glew170\include;external\devil178\include;external\sfml23\include;$(IncludePath)</IncludePath>
|
||||||
<LibraryPath>external\glew170\lib;external\devil178\lib;external\sfml23\lib;$(LibraryPath);D:\Repos\SQCSim2021\SQCSim2021\external\irrKlang-1.6.0\lib\Win32-visualStudio</LibraryPath>
|
<LibraryPath>external\glew170\lib;external\devil178\lib;external\sfml23\lib;$(LibraryPath);external\irrKlang-1.6.0\lib\Win32-visualStudio</LibraryPath>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
<LinkIncremental>true</LinkIncremental>
|
<LinkIncremental>true</LinkIncremental>
|
||||||
|
@ -102,12 +102,18 @@ void Chunk::Update(BlockInfo* blockinfo[BTYPE_LAST], World* world) {
|
|||||||
void Chunk::AddBlockToMesh(VertexBuffer::VertexData* vd, int& count, BlockType bt,
|
void Chunk::AddBlockToMesh(VertexBuffer::VertexData* vd, int& count, BlockType bt,
|
||||||
int x, int y, int z, float u, float v, float s, World* world) {
|
int x, int y, int z, float u, float v, float s, World* world) {
|
||||||
|
|
||||||
|
static Perlin perlin = Perlin(2, 4.f, 1.f, 362436);
|
||||||
int cex, cey;
|
int cex, cey;
|
||||||
|
|
||||||
world->GetScope(cex, cey);
|
world->GetScope(cex, cey);
|
||||||
|
|
||||||
int cx = x + (m_posX - cex) * CHUNK_SIZE_X, cy = z + (m_posY - cey) * CHUNK_SIZE_Z;
|
int cx = x + (m_posX - cex) * CHUNK_SIZE_X, cy = z + (m_posY - cey) * CHUNK_SIZE_Z;
|
||||||
|
|
||||||
|
if (perlin.Get(x, y, z) + .1f > 1.5f) {
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
if (y == CHUNK_SIZE_Y - 1 || GetBlock(x, y + 1, z) == BTYPE_AIR) { // y
|
if (y == CHUNK_SIZE_Y - 1 || GetBlock(x, y + 1, z) == BTYPE_AIR) { // y
|
||||||
vd[count++] = VertexBuffer::VertexData(x, y + 1.f, z, .8f, .8f, .8f, u, v);
|
vd[count++] = VertexBuffer::VertexData(x, y + 1.f, z, .8f, .8f, .8f, u, v);
|
||||||
vd[count++] = VertexBuffer::VertexData(x, y + 1.f, z + 1.f, .8f, .8f, .8f, u, v + s);
|
vd[count++] = VertexBuffer::VertexData(x, y + 1.f, z + 1.f, .8f, .8f, .8f, u, v + s);
|
||||||
|
Loading…
Reference in New Issue
Block a user