X-Git-Url: https://plomlompom.com/repos/berlin_corona.txt?a=blobdiff_plain;f=src%2Fmap_object_actions.h;h=7cc98433b19ccbe2dfe7d9f9b71c3a7692bfe6d2;hb=42f6cd9789e06f0257a078a33fa13aaea0714fce;hp=46dc92c13ec8239cac7d8c8d334264ab7ecef202;hpb=7290dec4219eaa2325aa00ef6139f715743dba3a;p=plomrogue diff --git a/src/map_object_actions.h b/src/map_object_actions.h index 46dc92c..7cc9843 100644 --- a/src/map_object_actions.h +++ b/src/map_object_actions.h @@ -12,43 +12,38 @@ 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 MapObj * actor, enum dir d); - - +extern uint8_t move_actor(struct MapObj * actor, char d); /* Wrapper for using move_actor() on the MapObj representing the player; updates * the game log with appropriate messages on the move attempt and its results; * turns over to turn_over() when finished. */ -extern void move_player(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(); - - /* Check if coordinate pos on (or beyond) map is accessible to map object * movement. */ 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(); +/* Make player use object indexed by world.inventory_select. */ +extern void player_use(); + #endif