Adoranda/include/player.h

21 lines
465 B
C
Raw Normal View History

2021-07-29 18:33:22 +02:00
#pragma once
#include "animation.h"
2021-08-07 01:49:03 +02:00
#include "engine.h"
2021-07-29 18:33:22 +02:00
struct player {
2021-08-08 01:43:26 +02:00
/*current position of the player on the map*/
2021-07-29 18:33:22 +02:00
int x, y;
2021-08-08 01:43:26 +02:00
/*the direction the player facing to*/
2021-07-29 18:33:22 +02:00
int direction;
2021-08-08 01:43:26 +02:00
/*current frame of the animation*/
2021-07-29 18:33:22 +02:00
int frame;
2021-08-08 01:43:26 +02:00
/*where to draw the player on the screen*/
2021-08-04 20:12:53 +02:00
int show_x, show_y;
2021-08-08 01:43:26 +02:00
/*the current animation*/
int idle;
struct anim_data anim;
2021-07-29 18:33:22 +02:00
};
2021-08-08 01:43:26 +02:00
/*return the info tile value the player is facing to*/
2021-08-07 01:49:03 +02:00
int player_facing(struct game const *game);