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-03-04 12:22:36 +11:00
|
|
|
lifeform_t *addmonster(cell_t *c, enum RACE raceid, int jobok, int amt);
|
2011-02-01 06:16:13 +11:00
|
|
|
void addrandomob(cell_t *c);
|
2011-03-24 16:09:31 +11:00
|
|
|
void addrandomthing(cell_t *c, int obchance);
|
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);
|
2011-04-06 17:27:55 +10:00
|
|
|
void getcellglyph(glyph_t *g, cell_t *c, lifeform_t *viewer);
|
2011-02-01 06:16:13 +11:00
|
|
|
enum CELLTYPE getemptycelltype(enum HABITAT hab);
|
2011-04-14 09:44:29 +10:00
|
|
|
enum CELLTYPE getwallcelltype(enum HABITAT hab);
|
2011-02-01 06:16:13 +11:00
|
|
|
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-04-08 13:18:54 +10:00
|
|
|
void createmap(map_t *map, int depth, int habitat);
|
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-03-18 12:25:18 +11:00
|
|
|
void explodesinglecell(cell_t *c, int dam, int killwalls, object_t *o, cell_t *centre);
|
2011-04-14 09:44:29 +10:00
|
|
|
void explodecells(cell_t *c, int dam, int killwalls, object_t *o, int range, int dirtype, int wantannounce);
|
|
|
|
celltype_t *findcelltype(enum CELLTYPE cid);
|
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);
|
2011-04-08 13:18:54 +10:00
|
|
|
object_t *findobidinmap(map_t *m, long id);
|
2011-02-01 06:16:13 +11:00
|
|
|
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-04-06 17:27:55 +10:00
|
|
|
cell_t *getrandomadjcell(cell_t *c, int wantempty, int allowexpand);
|
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-04-14 09:44:29 +10:00
|
|
|
void getroomcells(map_t *m, int roomid, cell_t **retcell, int *ncells);
|
2011-03-04 12:22:36 +11:00
|
|
|
int getslipperyness(cell_t *c, object_t **slipob);
|
2011-04-08 13:18:54 +10:00
|
|
|
cell_t *getstairdestination(object_t *o);
|
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);
|
2011-04-11 15:05:45 +10:00
|
|
|
int isdark(cell_t *c);
|
2011-02-01 06:16:13 +11:00
|
|
|
int isdiggable(cell_t *c);
|
|
|
|
int isdoor(object_t *o, int *isopen);
|
|
|
|
int isempty(cell_t *c);
|
2011-04-01 10:54:44 +11:00
|
|
|
int isinscanrange(cell_t *c, void **thing, char *desc, glyph_t *glyph);
|
2011-02-01 06:16:13 +11:00
|
|
|
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);
|
2011-04-08 13:18:54 +10:00
|
|
|
int linkstairs(object_t *o);
|
2010-12-02 12:17:54 +11:00
|
|
|
void makedoor(cell_t *cell);
|
2011-03-10 16:47:18 +11:00
|
|
|
void makelit(cell_t *c, enum LIGHTLEV how, int howlong);
|
|
|
|
void makelitradius(cell_t *c, int radius, enum LIGHTLEV how, int howlong);
|
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);
|