summaryrefslogtreecommitdiff
path: root/Week1-Pacman/src/pacman.h
diff options
context:
space:
mode:
Diffstat (limited to 'Week1-Pacman/src/pacman.h')
-rw-r--r--Week1-Pacman/src/pacman.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/Week1-Pacman/src/pacman.h b/Week1-Pacman/src/pacman.h
index b56e95d..e1610af 100644
--- a/Week1-Pacman/src/pacman.h
+++ b/Week1-Pacman/src/pacman.h
@@ -3,20 +3,23 @@
#include <SDL2/SDL.h>
#include "animation.h"
+#include "demo.h"
enum facing {
- FACING_UP,
+ FACING_RIGHT,
FACING_DOWN,
FACING_LEFT,
- FACING_RIGHT
+ FACING_UP
};
struct pacman {
- int xpos;
- int ypos;
+ /*
+ * Coolest bug I have ever seen in my life
+ */
+ float xpos;
+ float ypos;
enum facing facing;
- float frame_time;
/* One for each face */
struct animation animations[4];
@@ -24,6 +27,6 @@ struct pacman {
void handle_pacman_input(SDL_Event* e, struct pacman* pacman);
void update_pacman(struct pacman* pacman, float dt);
-void draw_pacman(SDL_Renderer* ren, const struct pacman* pacman);
+void draw_pacman(struct demo* demo, const struct pacman* pacman);
#endif // PACMAN_H_