2010-12-02 12:17:54 +11:00
|
|
|
#include "defs.h"
|
|
|
|
|
|
|
|
cell_t *addcell(map_t *map, int x, int y);
|
|
|
|
map_t *addmap(void);
|
2011-02-16 05:21:33 +11:00
|
|
|
lifeform_t *addmonster(cell_t *c, enum RACE raceid, int jobok);
|
2011-02-01 06:16:13 +11:00
|
|
|
void addrandomob(cell_t *c);
|
2010-12-02 12:17:54 +11:00
|
|
|
void addrandomthing(cell_t *c);
|
2011-02-01 06:16:13 +11:00
|
|
|
int cellhaslos(cell_t *c1, cell_t *dest);
|
2010-12-02 12:17:54 +11:00
|
|
|
cell_t *getcellat(map_t *map, int x, int y);
|
|
|
|
int getcelldist(cell_t *src, cell_t *dst);
|
2011-02-01 06:16:13 +11:00
|
|
|
int getcelldistorth(cell_t *src, cell_t *dst);
|
|
|
|
enum CELLTYPE getemptycelltype(enum HABITAT hab);
|
|
|
|
object_t *gettopobject(cell_t *where);
|
|
|
|
void calclight(map_t *map);
|
2010-12-02 12:17:54 +11:00
|
|
|
int calcroompos(map_t *map, int w, int h, int *bx, int *by);
|
|
|
|
int countadjcellsoftype(cell_t *cell, int id);
|
2011-02-01 06:16:13 +11:00
|
|
|
int countadjcellswithflag(cell_t *cell, enum FLAG fid);
|
2010-12-02 12:17:54 +11:00
|
|
|
int countcellexits(cell_t *cell);
|
2011-02-01 06:16:13 +11:00
|
|
|
void createmap(map_t *map, int depth, int habitat, map_t *parentmap, objecttype_t *returnstairtype);
|
2010-12-02 12:17:54 +11:00
|
|
|
void createroom(map_t *map, int minx, int miny, int w, int h, int roomid);
|
|
|
|
int dirtox(int dt, int dir);
|
|
|
|
int dirtoy(int dt, int dir);
|
|
|
|
void dumpmap(map_t *map);
|
2011-02-01 06:16:13 +11:00
|
|
|
void explodesinglecell(cell_t *c, int dam, int killwalls, object_t *o);
|
|
|
|
void explodecells(cell_t *c, int dam, int killwalls, object_t *o, int range, int wantannounce);
|
2010-12-02 12:17:54 +11:00
|
|
|
map_t *findmap(int mid);
|
2011-02-01 06:16:13 +11:00
|
|
|
map_t *findmapofdepth(int depth);
|
|
|
|
cell_t *findobinmap(map_t *m, enum OBCLASS oid);
|
2010-12-07 18:34:26 +11:00
|
|
|
void forgetcells(map_t *map, int amt);
|
2010-12-02 12:17:54 +11:00
|
|
|
cell_t *getcellindir(cell_t *cell, int dir);
|
|
|
|
int getnewdigdir(cell_t *cell, int lastdir, int turnpct, int *moved);
|
|
|
|
int getobchance(int habitat);
|
2011-02-01 06:16:13 +11:00
|
|
|
cell_t *getrandomadjcell(cell_t *c, int wantempty);
|
2010-12-02 12:17:54 +11:00
|
|
|
cell_t *getrandomcell(map_t *map);
|
|
|
|
cell_t *getrandomcelloftype(map_t *map, int id);
|
|
|
|
int getrandomdir(int dirtype);
|
|
|
|
cell_t *getrandomroomcell(map_t *map, int roomid);
|
2011-02-16 05:21:33 +11:00
|
|
|
object_t *hasenterableobject(cell_t *c);
|
2011-02-01 06:16:13 +11:00
|
|
|
lifeform_t *haslf(cell_t *c);
|
|
|
|
int hasobject(cell_t *c);
|
|
|
|
int isadjacent(cell_t *src, cell_t *dst);
|
|
|
|
int isdiggable(cell_t *c);
|
|
|
|
int isdoor(object_t *o, int *isopen);
|
|
|
|
int isempty(cell_t *c);
|
|
|
|
int isinscanrange(cell_t *c, void **thing, char *desc, char *glyph);
|
|
|
|
int islit(cell_t *c);
|
2010-12-02 12:17:54 +11:00
|
|
|
int isloopdirok(cell_t *cell, int dir);
|
|
|
|
int isnewcellok(cell_t *cell, char *err);
|
|
|
|
int isonmap(map_t *map, int x, int y);
|
|
|
|
int iswallindir(cell_t *cell, int dir);
|
|
|
|
void makedoor(cell_t *cell);
|
2011-02-01 06:16:13 +11:00
|
|
|
void makelit(cell_t *c, int how);
|
|
|
|
void makelitradius(cell_t *c, int radius, int how);
|
2010-12-02 12:17:54 +11:00
|
|
|
void setcelltype(cell_t *cell, int id);
|
2010-12-07 18:34:26 +11:00
|
|
|
void updateknowncells(void);
|