fogleman / Craft

A simple Minecraft clone written in C using modern OpenGL (shaders).
http://www.michaelfogleman.com/craft/
MIT License
10.38k stars 1.39k forks source link

experimenting #295

Open clqnts opened 2 years ago

clqnts commented 2 years ago

Changing the world.c trees to the following int ok = 0;//SHOW_TREES; // if (dx - 4 < 0 || dz - 4 < 0 || // dx + 4 >= CHUNK_SIZE || dz + 4 >= CHUNK_SIZE) // { // ok = 0; // } if (ok && simplex2(x, z, 6, 0.5, 2) > 0.84) { for (int y = h + 3; y < h + 8; y++) { for (int ox = -3; ox <= 3; ox++) { for (int oz = -3; oz <= 3; oz++) { int d = (ox ox) + (oz oz) + (y - (h + 4)) * (y - (h + 4)); if (d < 11) { func(x + ox, y, z + oz, 15, arg); } } } } for (int y = h; y < h + 7; y++) { func(x, y, z, 5, arg); } } }