diff options
Diffstat (limited to 'src/player.c')
-rw-r--r-- | src/player.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/player.c b/src/player.c index c6a3323..5456d0f 100644 --- a/src/player.c +++ b/src/player.c @@ -5,7 +5,7 @@ #include "rotrect.h" #include <math.h> -IMPL_UPDATE() { +IMPL(update) { const int on_ground = entity_collide(this, g, 0, 1); this->vel[0] = 2.0 * this->player.dirx; @@ -71,15 +71,15 @@ IMPL_UPDATE() { if (entity_place_meeting(this, g, entity_type("exit")) != NULL) g->queue_next_scene = true; -} IMPL_END +} -IMPL_DRAW() { +IMPL(draw) { LZY_DrawSetColor(BLACK); const double width = this->width * this->player.scale_x + 2; const double height = this->height * this->player.scale_y + 2; rotrect(this->pos[0] - 1, this->pos[1] - 1, width, height, this->player.angle); -} IMPL_END +} IMPL_INIT(player) { this->width = 10; |