aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornathan <nathansmith@disroot.org>2025-12-04 11:27:34 +0000
committernathan <nathansmith@disroot.org>2025-12-04 11:27:34 +0000
commitcc592f8603973e89d8a16be2f46596c772be36b8 (patch)
treecc22942bb753526b7337c7e7d95f46411fa4fcd7
parentece5a7781aac05e396b246306fac5ad187fbc88a (diff)
downloadFindThings-cc592f8603973e89d8a16be2f46596c772be36b8.tar.gz
FindThings-cc592f8603973e89d8a16be2f46596c772be36b8.tar.bz2
FindThings-cc592f8603973e89d8a16be2f46596c772be36b8.zip
Pond renders in map preview
-rw-r--r--src/map.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/map.c b/src/map.c
index 58b3021..90a9b5e 100644
--- a/src/map.c
+++ b/src/map.c
@@ -3,6 +3,7 @@
#include "world.h"
#include "player.h"
#include "entity.h"
+#include "entitiesInclude.h"
void repositionMap(Map* map)
{
@@ -19,6 +20,14 @@ void renderMapEntityPreview(Image* map, Entity entity, const World* world)
switch (entity.id)
{
case POND:
+ {
+ float pondSize = roundf(WORLD_IMAGE_WIDTH / world->size.x * POND_SIZE);
+ position = Vector2SubtractValue(position, pondSize);
+ pondSize *= 2.0;
+
+ ImageDrawRectangle(map, position.x, position.y, pondSize, pondSize, BLUE);
+ ImageDrawText(map, "Pond", position.x, position.y, 10, BLACK);
+ }
break;
default:
break;