format everything

This commit is contained in:
Tropical
2026-04-01 13:48:29 -05:00
parent 3e813592e4
commit dd93cfe91e
380 changed files with 2698 additions and 2595 deletions
@@ -37,11 +37,11 @@ bool TreeFeature::place(Level* level, Random* random, int x, int y, int z) {
// 4J Stu Added to stop tree features generating areas previously place by
// game rule generation
if (app.getLevelGenerationOptions() != nullptr) {
LevelGenerationOptions* levelGenOptions =
LevelGenerationOptions* levelGenOptions =
app.getLevelGenerationOptions();
bool intersects = levelGenOptions->checkIntersects(
x - 2, y - 1, z - 2, x + 2, y + treeHeight, z + 2);
if (intersects) {
// app.DebugPrintf("Skipping reeds feature generation as it overlaps
// a game rule structure\n");
@@ -77,7 +77,7 @@ bool TreeFeature::place(Level* level, Random* random, int x, int y, int z) {
placeBlock(level, x, y - 1, z, Tile::dirt_Id, 0);
int grassHeight = 3;
int grassHeight = 3;
int extraWidth = 0;
// 4J Stu - Generate leaves from the top down to stop having to recalc
// heightmaps
@@ -97,8 +97,8 @@ bool TreeFeature::place(Level* level, Random* random, int x, int y, int z) {
}
}
}
for (int hh = 0; hh < treeHeight; hh++) {
for (int hh = 0; hh < treeHeight; hh++) {
int t = level->getTile(x, y + hh, z);
if (t == 0 || t == Tile::leaves_Id) {
placeBlock(level, x, y + hh, z, Tile::treeTrunk_Id, trunkType);
@@ -126,9 +126,9 @@ bool TreeFeature::place(Level* level, Random* random, int x, int y, int z) {
}
}
}
if (addJungleFeatures) {
for (int yy = y - 3 + treeHeight; yy <= y + treeHeight; yy++) {
for (int yy = y - 3 + treeHeight; yy <= y + treeHeight; yy++) {
int yo = yy - (y + treeHeight);
int offs = 2 - yo / 2;
for (int xx = x - offs; xx <= x + offs; xx++) {
@@ -156,10 +156,10 @@ bool TreeFeature::place(Level* level, Random* random, int x, int y, int z) {
}
}
}
// also chance for cocoa plants around stem
if (random->nextInt(5) == 0 && treeHeight > 5) {
for (int rows = 0; rows < 2; rows++) {
for (int rows = 0; rows < 2; rows++) {
for (int dir = 0; dir < 4; dir++) {
if (random->nextInt(4 - rows) == 0) {
int age = random->nextInt(3);
@@ -173,7 +173,6 @@ bool TreeFeature::place(Level* level, Random* random, int x, int y, int z) {
}
}
}
}
}