summaryrefslogtreecommitdiff
path: root/Week1-Pacman/src/pacman.h
diff options
context:
space:
mode:
authorBoredGuy <osome3717@gmail.com>2025-01-03 11:38:13 +0300
committerBoredGuy <osome3717@gmail.com>2025-01-03 11:38:13 +0300
commit5f7e0d8cf88d0adb9739e2cc7e26ba26243975f8 (patch)
tree099937e59239471f0f611602b5b7788dfde91814 /Week1-Pacman/src/pacman.h
parent1d1554652888fa4f0cd12a51fda8d9bd54dbcee6 (diff)
Minor optimization
Animations can now share a single texture
Diffstat (limited to 'Week1-Pacman/src/pacman.h')
-rw-r--r--Week1-Pacman/src/pacman.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/Week1-Pacman/src/pacman.h b/Week1-Pacman/src/pacman.h
index e2a3c4d..65137cd 100644
--- a/Week1-Pacman/src/pacman.h
+++ b/Week1-Pacman/src/pacman.h
@@ -13,6 +13,12 @@ enum facing {
FACING_UP
};
+struct pacman_init {
+ float initial_xpos;
+ float initial_ypos;
+ enum facing initial_facing;
+};
+
struct pacman {
/*
* Coolest bug I have ever seen in my life
@@ -26,6 +32,8 @@ struct pacman {
struct animation animations[4];
};
+void load_pacman_spritesheet(struct demo* demo);
+void init_pacman(struct pacman* pacman, struct pacman_init* init);
void handle_pacman_input(struct pacman* pacman, struct map* map);
void update_pacman(struct pacman* pacman, float dt, struct map* map);
void draw_pacman(struct demo* demo, const struct pacman* pacman);