summaryrefslogtreecommitdiff
path: root/src/player.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/player.c')
-rw-r--r--src/player.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/src/player.c b/src/player.c
index 36a5131..eea0137 100644
--- a/src/player.c
+++ b/src/player.c
@@ -1,20 +1,11 @@
#include "entityimpl.h"
-IMPL(draw) {
- TZR_DrawSetColor(1, 1, 1, 0.5);
- TZR_DrawRectangle(this->pos[0] - this->width / 2,
- this->pos[1] - this->height / 2,
- this->width, this->height, .fill=true);
+IMPL_INIT(player, 0) {
+ this->id = atoi(this->name);
}
-IMPL(update) {
- this->vel[0] = 2 * TZR_IsKeyDown(SDL_SCANCODE_RIGHT)
- - 2 * TZR_IsKeyDown(SDL_SCANCODE_LEFT);
- entity_move(this, g);
- entity_init(game_create_entity(g), entity_type("part"), NULL,
- this->pos[0], this->pos[1], 0, 0);
+IMPL(draw) {
}
-IMPL_INIT(player, 0) {
- this->height = this->width = 12;
+IMPL(update) {
}