Adoranda/include/player.h

32 lines
749 B
C

#pragma once
#include "animation.h"
#include "engine.h"
#include "vec2.h"
#include "stats.h"
struct Player {
/*current position of the player on the map - Tile*/
struct Vec2 pos;
/*current position of the player on the map - pixels */
struct Vec2f pos_visual;
struct Stats stats;
/*player mid - offset pixels*/
int x_mid, y_mid;
/*the direction the player facing to*/
int direction;
/*if the player is sprinting*/
int sprint;
/*current frame of the animation*/
int frame;
/*where to draw the player on the screen*/
int show_x, show_y;
/*the current animation*/
int idle;
struct AnimData anim;
};
/*return the info tile value the player is facing to*/
int player_facing(struct Game const *game);
struct Player init_player(void);