diff options
Diffstat (limited to 'src/char.h')
-rw-r--r-- | src/char.h | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/src/char.h b/src/char.h new file mode 100644 index 0000000..bf5e85b --- /dev/null +++ b/src/char.h @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2021 P. J. McDermott + * + * This file is part of Maze Fight + * + * Maze Fight is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Maze Fight is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Maze Fight. If not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef MF_CHAR_H +#define MF_CHAR_H + +#include <SDL.h> +#include "maze.h" + +struct mf_char; + +struct mf_char * +mf_player_new(struct mf_maze *maze, int cell_width); + +void +mf_char_get_vector(struct mf_char *c, int *x, int *y, int *travel, + int *dx, int *dy); + +void +mf_player_key_event(struct mf_char *c, SDL_Event *e); + +int +mf_char_update(struct mf_char *c); + +int +mf_char_render(struct mf_char *c, SDL_Renderer *renderer); + +void +mf_char_destroy(struct mf_char **c_c); + +#endif /* MF_CHAR_H */ |