aboutsummaryrefslogtreecommitdiffstats
path: root/src/world.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/world.c')
-rw-r--r--src/world.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/world.c b/src/world.c
index a32bec2..74c5fec 100644
--- a/src/world.c
+++ b/src/world.c
@@ -489,12 +489,14 @@ void generateWorldSamanthasPlace(World* world, Color* heightmap,
WorldUID* placeId)
{
// Make area flat.
- float width = WORLD_IMAGE_WIDTH / world->size.x * SAMANTHAS_SPOT_SIZE;
- float height = WORLD_IMAGE_HEIGHT / world->size.z * SAMANTHAS_SPOT_SIZE;
+ float width = SAMANTHAS_SPOT_SIZE * (WORLD_IMAGE_WIDTH / world->size.x)
+ * 2.0;
+ float height = SAMANTHAS_SPOT_SIZE * (WORLD_IMAGE_HEIGHT / world->size.z)
+ * 2.0;
Rectangle area = (Rectangle){
- .x = WORLD_IMAGE_WIDTH / 2.0 - width,
- .y = WORLD_IMAGE_HEIGHT / 2.0 - height,
+ .x = WORLD_IMAGE_WIDTH / 2.0 - width / 2.0,
+ .y = WORLD_IMAGE_HEIGHT / 2.0 - height / 2.0,
.width = width,
.height = height
};