forked from NotAShelf/rogged
refactor(movement): generalize movement and use vectors
This commit is contained in:
parent
1d738c35d4
commit
d01a54161d
9 changed files with 134 additions and 85 deletions
|
|
@ -6,8 +6,8 @@
|
|||
// Initialize player at position
|
||||
void player_init(Player *p, int x, int y);
|
||||
|
||||
// Move player to (x+dx, y+dy); returns 1 if moved, 0 if blocked
|
||||
int player_move(Player *p, int dx, int dy, Map *map);
|
||||
// Apply status effect, healing ect
|
||||
void player_on_move(Player *p);
|
||||
|
||||
// Find a living enemy at tile (x, y); returns NULL if none
|
||||
Enemy *player_find_enemy_at(Enemy *enemies, int count, int x, int y);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue