nexus/move.h

43 lines
2.3 KiB
C

#include "defs.h"
int canandwillmove(lifeform_t *lf, int dir, enum ERROR *error);
int canswapwith(lifeform_t *lf, lifeform_t *lf2);
int celldangerous(lifeform_t *lf, cell_t *cell, int onlyifknown, enum ERROR *error);
int cellwalkable(lifeform_t *lf, cell_t *cell, enum ERROR *error);
int closedoorat(lifeform_t *lf, cell_t *c);
int closedoor(lifeform_t *lf, object_t *o);
enum RELATIVEDIR getrelativedir(lifeform_t *lf, int dir);
int diropposite(int dir);
int dorandommove(lifeform_t *lf, int badmovesok, int restonfail, int strafe);
int getdiraway(cell_t *src, cell_t *dst, lifeform_t *srclf, int wantcheck, int dirtype, int keepinlof);
int getdirtowards(cell_t *src, cell_t *dst, lifeform_t *srclf, int wantcheck, int dirtype);
cell_t *getdodgecell(lifeform_t *lf);
int getwalkoffdir(lifeform_t *lf, int dir);
int knockback(lifeform_t *lf, int dir, int howfar, lifeform_t *pusher, int fallcheckdiff, int wantannounce, int dodam);
int makeorthogonal(int dir);
int moveawayfrom(lifeform_t *lf, cell_t *dst, int dirtype, int keepinlof, int strafe, int onpurpose);
int moveclear(lifeform_t *lf, int dir, enum ERROR *error);
int moveeffects(lifeform_t *lf, int moved);
int movelf(lifeform_t *lf, cell_t *newcell, int onpurpose);
int movelfsoutofway(cell_t *newcell);
int moveto(lifeform_t *lf, cell_t *newcell, int onpurpose, int dontclearmsg);
int movetowards(lifeform_t *lf, cell_t *dst, int dirtype, int strafe);
int move_will_hurt(lifeform_t *lf);
int opendoorat(lifeform_t *lf, cell_t *c);
int opendoor(lifeform_t *lf, object_t *o);
int pullnextto(lifeform_t *lf, cell_t *c);
int initiatemove(lifeform_t *lf, cell_t *cell, int onpurpose, int *didmsg);
int isorthogonal(int dir);
int ispossiblemove(lifeform_t *lf, int dir);
int rotatedir(int origdir, enum TURNDIR whichway, int amt);
void standup(lifeform_t *lf);
void swapplaces(lifeform_t *lf1, lifeform_t *lf2, int changedir1, int changedir2, int onpurpose);
int teleportto(lifeform_t *lf, cell_t *c, int wantsmoke);
void triggertrap(lifeform_t *lf, object_t *o, object_t *trapob, cell_t *where);
int trymove(lifeform_t *lf, int dir, int onpurpose, int strafe);
int tryrun(lifeform_t *lf, int dir);
int trysneak(lifeform_t *lf, int dir);
int walkoffmap(lifeform_t *lf, int dir, int onpurpose);
int whichwayto(cell_t *start, cell_t *end, lifeform_t *srclf, int wantcheck);
int willmove(lifeform_t *lf, int dir, enum ERROR *error);