aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornathan <nathansmith@disroot.org>2025-09-20 20:27:00 +0000
committernathan <nathansmith@disroot.org>2025-09-20 20:27:00 +0000
commit96b7a7205751c76f74d6a5fecb3b5b2ff168b9cd (patch)
tree8ae031318cf8d7681ae452f876fc198f3f44e05e
parent382c97573213414ebdfee30743ba516e4feb7602 (diff)
downloadFindThings-96b7a7205751c76f74d6a5fecb3b5b2ff168b9cd.tar.gz
FindThings-96b7a7205751c76f74d6a5fecb3b5b2ff168b9cd.tar.bz2
FindThings-96b7a7205751c76f74d6a5fecb3b5b2ff168b9cd.zip
Flat is flat
-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
};