aboutsummaryrefslogtreecommitdiffstats
path: root/src/world.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/world.c')
-rw-r--r--src/world.c27
1 files changed, 21 insertions, 6 deletions
diff --git a/src/world.c b/src/world.c
index 0dde09d..ee465b2 100644
--- a/src/world.c
+++ b/src/world.c
@@ -515,20 +515,35 @@ void generateWorldSamanthasPlace(World* world, Color* heightmap,
world->entities[*placeId] = samantha;
*placeId = *placeId + 1;
- // Trash yippee!
- Vector3 trashcanPosition = (Vector3){-SAMANTHAS_SPOT,
- 0.0,
- SAMANTHAS_SPOT_SIZE / 1.5};
+ // Trashcans yippee!
+ Vector3 trashPosition = (Vector3){-SAMANTHAS_SPOT,
+ 0.0,
+ SAMANTHAS_SPOT_SIZE / 2.0};
for (int index = 0; index < SAMANTHAS_SPOT_TRASHCAN_COUNT; ++index)
{
Entity trashcan = createEntity(TRASHCAN,
- Vector3Add(trashcanPosition, center));
+ Vector3Add(trashPosition, center));
world->entities[*placeId] = trashcan;
*placeId = *placeId + 1;
- trashcanPosition.x += (float)(SAMANTHAS_SPOT_SIZE * 2.0)
+ trashPosition.x += (float)(SAMANTHAS_SPOT_SIZE * 2.0)
/ SAMANTHAS_SPOT_TRASHCAN_COUNT;
}
+
+ // Trash and medical trash yippee!
+ trashPosition = (Vector3){-SAMANTHAS_SPOT,
+ 0.0,
+ SAMANTHAS_SPOT_SIZE / 1.5};
+
+ for (int index = 0; index < SAMANTHAS_SPOT_TRASH_COUNT; ++index)
+ {
+ Entity trash = createEntity(index % 2 == 0 ? TRASH : MEDICAL_TRASH,
+ Vector3Add(trashPosition, center));
+ world->entities[*placeId] = trash;
+ *placeId = *placeId + 1;
+ trashPosition.x += (float)(SAMANTHAS_SPOT_SIZE * 2.0)
+ / SAMANTHAS_SPOT_TRASH_COUNT;
+ }
}
Seed generateWorldPlants(World* world, Seed seed, int start, int end)