mirror of
https://git.planet-casio.com/Slyvtt/Collab_RPG.git
synced 2025-01-01 14:33:39 +01:00
39 lines
1.1 KiB
C
39 lines
1.1 KiB
C
#ifndef PLAYER_H
|
|
#define PLAYER_H
|
|
|
|
#include <stdbool.h>
|
|
#include "config.h"
|
|
#include "game.h"
|
|
#include "memory.h"
|
|
|
|
|
|
/* Structure 'Player' has been moved to game.h */
|
|
/* to avoid circular references between map.h, game.h and player.h */
|
|
/* only methods propotypes are now in dedicated header files */
|
|
|
|
|
|
/* Draws the player player. This function should be called after drawing the
|
|
* map! */
|
|
void player_draw(Game *game);
|
|
|
|
/* Move the player player in the direction direction. */
|
|
void player_move(Game *game, Direction direction);
|
|
|
|
/* (Mibi88) TODO: Describe this function please, I've no idea what she's for! */
|
|
void player_action(Game *game);
|
|
|
|
/* Check if the player is in collision with the map or a NPC. Checkpos is used
|
|
* to check the axis where the player is not moving. */
|
|
bool player_collision(Game *game, Direction direction,
|
|
Checkpos nomov_axis_check);
|
|
|
|
/* Fix the position of the player so that he's not a bit inside of a hard block
|
|
* after a collision. */
|
|
void player_fix_position(Game *game, bool fix_x, bool fix_y);
|
|
|
|
|
|
/* Apply damage to player */
|
|
void player_damage(Game *game, int amount);
|
|
|
|
#endif
|
|
|