A retro platform game
git clone git://soophie.de/freezo
blob: 099d524f94f069c809e44daa51e610338ced2aea (681 bytes)[raw]
1
#pragma once3
typedef struct Player player_t;5
#include "util.h"6
#include "enemy.h"7
#include "game.h"8
#include "entity.h"10
#define PLAYER_MAX_HEALTH 612
struct Player {13
pos_t pos;14
int health;15
int max_health;16
bool on_ground;17
float velocity;18
float gravity;19
int dir;20
bool sneaking;21
bool shooting;22
int damage_timer;23
float fall_height;24
enemy_t *held_enemy;25
bool moving;26
fz_timer_t *timer_walking;27
fz_timer_t *timer_sneaking;28
entity_t *target_entity;29
float shooting_distance;30
};32
player_t *player_create(pos_t pos);33
void player_update(player_t *player, game_t *game);34
void player_draw(player_t *player, game_t *game);35
void player_free(player_t *player);