diff options
-rw-r--r-- | src/player.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/player.c b/src/player.c index d0b3f51..a6bab2e 100644 --- a/src/player.c +++ b/src/player.c @@ -95,12 +95,6 @@ mf_player_get_vector(struct mf_player *p, int *x, int *y, int *travel, } } -static void -_mf_player_move(struct mf_player *p, enum _mf_player_dir dir) -{ - p->new_dir = dir; -} - void mf_player_key_event(struct mf_player *p, SDL_Event *e) { @@ -108,16 +102,16 @@ mf_player_key_event(struct mf_player *p, SDL_Event *e) case SDL_KEYDOWN: switch (e->key.keysym.sym) { case SDLK_UP: - _mf_player_move(p, MF_PLAYER_DIR_U_); + p->new_dir = MF_PLAYER_DIR_U_; break; case SDLK_DOWN: - _mf_player_move(p, MF_PLAYER_DIR_D_); + p->new_dir = MF_PLAYER_DIR_D_; break; case SDLK_LEFT: - _mf_player_move(p, MF_PLAYER_DIR_L_); + p->new_dir = MF_PLAYER_DIR_L_; break; case SDLK_RIGHT: - _mf_player_move(p, MF_PLAYER_DIR_R_); + p->new_dir = MF_PLAYER_DIR_R_; break; default: break; |