Defines | Functions | Variables

dogmove.c File Reference

#include "hack.h"
#include "mfndpos.h"
#include "edog.h"
Include dependency graph for dogmove.c:

Defines

#define DDIST(x, y)   (dist2(x,y,omx,omy))
#define SQSRCHRADIUS   5
#define FARAWAY   (COLNO + 2)
#define GDIST(x, y)   (dist2(x,y,gx,gy))

Functions

STATIC_DCL boolean FDECL (dog_hunger,(struct monst *, struct edog *))
STATIC_DCL int FDECL (dog_invent,(struct monst *, struct edog *, int))
STATIC_DCL int FDECL (dog_goal,(struct monst *, struct edog *, int, int, int))
STATIC_DCL struct objFDECL (DROPPABLES,(struct monst *))
STATIC_DCL boolean FDECL (can_reach_location,(struct monst *, XCHAR_P, XCHAR_P, XCHAR_P, XCHAR_P))
STATIC_DCL boolean FDECL (could_reach_item,(struct monst *, XCHAR_P, XCHAR_P))
STATIC_OVL boolean FDECL (cursed_object_at,(int, int))
STATIC_PTR void FDECL (wantdoor,(int, int, genericptr_t))
STATIC_OVL boolean cursed_object_at (int x, int y)
int dog_nutrition (struct monst *mtmp, struct obj *obj)
int dog_eat (struct monst *mtmp, struct obj *obj, int x, int y, boolean devour)
STATIC_OVL boolean dog_hunger (struct monst *mtmp, struct edog *edog)
STATIC_OVL int dog_invent (struct monst *mtmp, struct edog *edog, int udist)
STATIC_OVL int dog_goal (struct monst *mtmp, struct edog *edog, int after, int udist, int whappr)
int dog_move (struct monst *mtmp, int after)
STATIC_OVL boolean could_reach_item (struct monst *mon, xchar nx, xchar ny)
STATIC_OVL boolean can_reach_location (struct monst *mon, xchar mx, xchar my, xchar fx, xchar fy)
STATIC_PTR void wantdoor (int x, int y, genericptr_t distance)

Variables

boolean notonhead
STATIC_OVL struct obj
*register struct monst
mon
STATIC_VAR xchar gtyp
STATIC_VAR xchar gx
STATIC_VAR xchar gy

Define Documentation

#define DDIST (   x,
 
)    (dist2(x,y,omx,omy))

Referenced by dog_goal().

#define FARAWAY   (COLNO + 2)

Referenced by dog_goal().

#define GDIST (   x,
 
)    (dist2(x,y,gx,gy))

Referenced by dog_move(), move_special(), and shk_move().

#define SQSRCHRADIUS   5

Referenced by dog_goal(), and m_move().


Function Documentation

STATIC_OVL boolean can_reach_location ( struct monst mon,
xchar  mx,
xchar  my,
xchar  fx,
xchar  fy 
)

References could_reach_item(), D_CLOSED, D_LOCKED, dist2(), doormask, FALSE, IS_DOOR, IS_ROCK, isok(), levl, may_dig(), passes_walls, TRUE, and tunnels.

Referenced by dog_goal().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL boolean could_reach_item ( struct monst mon,
xchar  nx,
xchar  ny 
)

References BOULDER, FALSE, is_lava(), is_pool(), is_swimmer, likes_lava, sobj_at(), throws_rocks, and TRUE.

Referenced by can_reach_location(), dog_goal(), and dog_invent().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL boolean cursed_object_at ( int  x,
int  y 
)

References FALSE, level, dlevel_t::objects, otmp, and TRUE.

Referenced by dog_goal(), and dog_move().

Here is the caller graph for this function:

int dog_eat ( struct monst mtmp,
struct obj obj,
int  x,
int  y,
boolean  devour 
)
STATIC_OVL int dog_goal ( struct monst mtmp,
struct edog edog,
int  after,
int  udist,
int  whappr 
)
STATIC_OVL boolean dog_hunger ( struct monst mtmp,
struct edog edog 
)

References beg(), cansee, carnivorous, couldsee, FALSE, Hallucination, herbivorous, edog::hungrytime, mondied(), Monnam(), monstermoves, pline(), STEED, stop_occupation(), TRUE, u, and y_monnam().

Referenced by dog_move().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL int dog_invent ( struct monst mtmp,
struct edog edog,
int  udist 
)
int dog_move ( struct monst mtmp,
int  after 
)
int dog_nutrition ( struct monst mtmp,
struct obj obj 
)
STATIC_DCL boolean FDECL ( dog_hunger  ,
(struct monst *, struct edog *)   
)
STATIC_DCL struct obj* FDECL ( DROPPABLES  ,
(struct monst *)   
) [read]
STATIC_DCL int FDECL ( dog_invent  ,
(struct monst *, struct edog *, int)   
)
STATIC_DCL int FDECL ( dog_goal  ,
(struct monst *, struct edog *, int, int, int)   
)
STATIC_OVL boolean FDECL ( cursed_object_at  ,
(int, int)   
)
STATIC_DCL boolean FDECL ( can_reach_location  ,
(struct monst *, XCHAR_P, XCHAR_P, XCHAR_P, XCHAR_P)   
)
STATIC_PTR void FDECL ( wantdoor  ,
(int, int, genericptr_t  
)
STATIC_DCL boolean FDECL ( could_reach_item  ,
(struct monst *, XCHAR_P, XCHAR_P)   
)
STATIC_PTR void wantdoor ( int  x,
int  y,
genericptr_t  distance 
)

References distu.

Referenced by dog_goal().

Here is the caller graph for this function:


Variable Documentation

STATIC_VAR xchar gtyp
STATIC_VAR xchar gx
STATIC_VAR xchar gy
STATIC_OVL struct obj* register struct monst* mon