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);
|
|
|
|
void addrandomthing(cell_t *c);
|
|
|
|
cell_t *getcellat(map_t *map, int x, int y);
|
|
|
|
int getcelldist(cell_t *src, cell_t *dst);
|
|
|
|
int calcroompos(map_t *map, int w, int h, int *bx, int *by);
|
|
|
|
int countadjcellsoftype(cell_t *cell, int id);
|
|
|
|
int countcellexits(cell_t *cell);
|
|
|
|
void createmap(map_t *map, int habitat);
|
|
|
|
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);
|
|
|
|
map_t *findmap(int mid);
|
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);
|
|
|
|
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);
|
|
|
|
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);
|
|
|
|
void setcelltype(cell_t *cell, int id);
|
2010-12-07 18:34:26 +11:00
|
|
|
void updateknowncells(void);
|