summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBoredGuy <osome3717@gmail.com>2025-09-05 08:55:43 +0300
committerBoredGuy <osome3717@gmail.com>2025-09-05 08:55:43 +0300
commit8886377977fbc79bb30310543e2978ff0c7febfe (patch)
treebf6b69f7af9d369ff484e834fb246ec41a214bb7 /include
parent1562dd67d16d328e919db28cfd48206c8c868fe4 (diff)
Player module refactor
- Also changed the background to something cozier
Diffstat (limited to 'include')
-rw-r--r--include/player_data.h8
-rw-r--r--include/utils.h6
2 files changed, 10 insertions, 4 deletions
diff --git a/include/player_data.h b/include/player_data.h
index bcd3bae..f8e937a 100644
--- a/include/player_data.h
+++ b/include/player_data.h
@@ -6,10 +6,10 @@
#define PLAYER_SPEED 300.0f
static const Rectangle shadowDestRect = (Rectangle) {
- .x = -30,
- .y = 100,
- .width = 140,
- .height = 40
+ .x = -20,
+ .y = 115,
+ .width = 128,
+ .height = 20
};
static const Rectangle physicsCollider = (Rectangle) {
diff --git a/include/utils.h b/include/utils.h
index cb1770e..7437860 100644
--- a/include/utils.h
+++ b/include/utils.h
@@ -76,5 +76,11 @@ static inline Rectangle GetEntityHurtboxGlobal(const Entity* e, int hbIndex) {
return hurtBoxGlobal;
}
+static inline void ResetAnimation(Animation* animation) {
+ animation->currentFrame = 0;
+ animation->currentFrameTimer = 0;
+ animation->isComplete = false;
+}
+
#endif // UTILS_H_