forked from NotAShelf/rogged
various: consolidate game state into a GameState struct
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I9d8998707c02e64cf177a6eeb51e399e6a6a6964
This commit is contained in:
parent
d3798cc99f
commit
786fce3814
13 changed files with 105 additions and 102 deletions
|
|
@ -7,8 +7,7 @@
|
|||
void player_init(Player *p, int x, int y);
|
||||
|
||||
// Move player, return 1 if moved/attacked, 0 if blocked
|
||||
int player_move(Player *p, int dx, int dy, Map *map, Enemy *enemies,
|
||||
int enemy_count, Item *items, int item_count);
|
||||
int player_move(Player *p, int dx, int dy, Map *map, Enemy *enemies, int enemy_count, Item *items, int item_count);
|
||||
|
||||
// Player attacks enemy (deal damage)
|
||||
void player_attack(Player *p, Enemy *e);
|
||||
|
|
@ -25,4 +24,4 @@ int player_use_first_item(Player *p);
|
|||
// Get item at inventory index, returns NULL if invalid
|
||||
Item *player_get_inventory_item(Player *p, int index);
|
||||
|
||||
#endif // PLAYER_H
|
||||
#endif // PLAYER_H
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue