breakhack/src/player.h

27 lines
524 B
C
Raw Normal View History

2017-11-30 21:00:47 +01:00
#ifndef PLAYER_H_
#define PLAYER_H_
#include <SDL2/SDL.h>
#include "sprite.h"
#include "stats.h"
2017-11-30 21:00:47 +01:00
enum PlayerClass { ENGINEER, MAGE, PALADIN, ROGUE, WARRIOR };
typedef enum PlayerClass class_t;
2017-12-15 08:08:45 +01:00
typedef struct Player_t {
Sprite *sprite;
Stats stats;
2017-12-17 13:43:41 +01:00
unsigned int xp;
unsigned int total_steps;
unsigned int steps;
2017-12-15 08:08:45 +01:00
void (*handle_event)(struct Player_t*, RoomMatrix*, SDL_Event*);
} Player;
Player* player_create(class_t, SDL_Renderer*);
2017-12-17 13:43:41 +01:00
void player_print(Player*);
void player_destroy(Player*);
2017-11-30 21:00:47 +01:00
#endif // PLAYER_H_