X-Git-Url: https://plomlompom.com/repos/berlin_corona.txt?a=blobdiff_plain;f=src%2Fmap_object_actions.h;h=1b2d95b80aa9f10df62f30899935bb3f3f39887b;hb=d701e79e9297470b56315eefd431c62c9aba28b2;hp=3041c9c2fc0c4089d40feb4fac3f71931fce2889;hpb=aafa0cb49e7ec8600dad902411de6e76e111c939;p=plomrogue diff --git a/src/map_object_actions.h b/src/map_object_actions.h index 3041c9c..1b2d95b 100644 --- a/src/map_object_actions.h +++ b/src/map_object_actions.h @@ -6,22 +6,18 @@ #ifndef MAP_OBJECT_ACTIONS_H #define MAP_OBJECT_ACTIONS_H - - #include "yx_uint16.h" /* for yx_uint16 coordinates */ -struct World; struct Map; struct MapObj; -/* Try to move "actor" one step in direction "d" and handle the consequences: - * either the move succeeds, or another actor is encountered and hit (which leads - * to its lifepoint decreasing by one and potentially its death), or the target - * square is not passable and the move fails. +/* Try to move "actor" one step in direction "d" (where east is 'E', north 'N' + * etc.) and handle the consequences: either the move succeeds, or another actor + * is encountered and hit (which leads to its lifepoint decreasing by one and + * potentially its death), or the target square is not passable, the move fails. */ -extern uint8_t move_actor(struct World * world, struct MapObj * actor, - enum dir d); +extern uint8_t move_actor(struct MapObj * actor, char d); @@ -29,14 +25,14 @@ extern uint8_t move_actor(struct World * world, struct MapObj * actor, * the game log with appropriate messages on the move attempt and its results; * turns over to turn_over() when finished. */ -extern void move_player(struct World * world, enum dir d); +extern void move_player(char d); /* Make player wait one turn, i.e. only update_log with a "you wait" message * and turn control over to the enemy. */ -extern void player_wait(struct World * world); +extern void player_wait(); @@ -47,4 +43,12 @@ extern char is_passable(struct Map * map, struct yx_uint16 pos); +/* Make player drop to ground map ojbect indexed by world.inventory_select. */ +extern void player_drop(); + +/* Make player pick up map object from ground. */ +extern void player_pick(); + + + #endif