aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornathan <nathansmith@disroot.org>2025-09-19 12:17:18 +0000
committernathan <nathansmith@disroot.org>2025-09-19 12:17:18 +0000
commit5e3794220e5eb520c207a80aee5e706c28bcd743 (patch)
treee5b03ed8c0a9afecde628ca8bdbd8b35b7ec5150
parent64cc26bc8a22ff8078a3650509aa7ecaa4f8fb5e (diff)
downloadFindThings-5e3794220e5eb520c207a80aee5e706c28bcd743.tar.gz
FindThings-5e3794220e5eb520c207a80aee5e706c28bcd743.tar.bz2
FindThings-5e3794220e5eb520c207a80aee5e706c28bcd743.zip
no no to magic numbers
-rw-r--r--src/entity.c3
-rw-r--r--src/entity.h1
2 files changed, 3 insertions, 1 deletions
diff --git a/src/entity.c b/src/entity.c
index ef77e8f..b7548be 100644
--- a/src/entity.c
+++ b/src/entity.c
@@ -100,7 +100,8 @@ void updateEntity(Entity* entity, Game* game)
game->assets.models[SAMANTHA_MODEL].materials[0]
.maps[MATERIAL_MAP_DIFFUSE].texture =
game->assets.textures[
- SAMANTHA_1_TEXTURE + ((int)(GetTime() * SAMANTHA_STATIC_SPEED) % 4)];
+ SAMANTHA_1_TEXTURE + ((int)(GetTime() * SAMANTHA_STATIC_SPEED) %
+ SAMANTHA_STATIC_FRAMES)];
DrawModel(game->assets.models[SAMANTHA_MODEL], entity->position, 1.0,
WHITE);
diff --git a/src/entity.h b/src/entity.h
index 177df79..aaf0e82 100644
--- a/src/entity.h
+++ b/src/entity.h
@@ -21,6 +21,7 @@
#define SAMANTHA_HEIGHT 28.5382/2.0
#define SAMANTHA_THICKNESS 13.0529/2.0
#define SAMANTHA_STATIC_SPEED 24
+#define SAMANTHA_STATIC_FRAMES 4
typedef int8_t EntityId;