home · contact · privacy
Improved comments for windows library header file.
[plomrogue] / src / map_object_actions.h
1 /* map_object_actions.h
2  *
3  * Routines for the actions available to map objects.
4  */
5
6 #ifndef MAP_OBJECT_ACTIONS_H
7 #define MAP_OBJECT_ACTIONS_H
8
9
10
11 #include "yx_uint16.h" /* for yx_uint16 coordinates */
12 struct World;
13 struct Map;
14 struct Monster;
15
16
17
18 /* Try to move "monster" in random direction. On contact with other monster,
19  * only bump. On contact with player, fight / reduce player's hitpoints,
20  * and thereby potentially trigger the player's death. Update the log for any
21  * contact action.
22  */
23 extern void move_monster(struct World * world, struct Monster * monster);
24
25
26
27 /* Try to move player in direction "d". On contact with monster, fight / reduce
28  * monster's hitpoints, and thereby potentially trigger the monster's death.
29  * Update the log on whatever the player did and turn control over to the enemy.
30  */
31 extern void move_player (struct World * world, enum dir d);
32
33
34
35 /* Make player wait one turn, i.e. only update_log with a "you wait" message
36  * and turn control over to the enemy.
37  */
38 extern void player_wait(struct World * world);
39
40
41
42 /* Check if coordinate pos on (or beyond) map is accessible to map object
43  * movement.
44  */
45 extern char is_passable (struct Map * map, struct yx_uint16 pos);
46
47
48
49 #endif