aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/entity.c2
-rw-r--r--src/world.c10
2 files changed, 7 insertions, 5 deletions
diff --git a/src/entity.c b/src/entity.c
index bc6bb99..8de3eab 100644
--- a/src/entity.c
+++ b/src/entity.c
@@ -79,7 +79,7 @@ Entity createEntity(EntityId id, Vector3 position)
void updateEntity(Entity* entity, Game* game)
{
- DrawBoundingBox(entity->box, RED);
+ //DrawBoundingBox(entity->box, RED);
switch (entity->id)
{
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
};