nexus/nexus.h

48 lines
2.0 KiB
C

#include "defs.h"
celltype_t *addcelltype(int id, char *name, int glyph, int colour, int altcol, int solid, int transparent, enum MATERIAL mat, int floorheight, int hp, int volumemod, int absobent);
warning_t *addwarning(char *text, int lifetime);
void checkdeath(void);
void checkendgame(void);
void cleanup(void);
void dbtime(char *text);
void dbtimeend(char *text);
void dbtimeendlf(lifeform_t *lf);
void dbtimestart(char *text);
void dbtimestartlf(lifeform_t *lf);
void dobresnham(int d, int xinc1, int yinc1, int dinc1, int xinc2, int yinc2, int dinc2, int *xinc, int *yinc, int *dinc);
void donextturn(map_t *map);
command_t *findcommand(enum COMMAND id);
warning_t *findwarning(char *text);
void gettrrange(int depth, int *min, int *max, int range, int oodok);
int getoption(enum OPTION id);
enum COLOUR getpctcol(float num, float max);
char getpctletter(float num, float max);
void getrarityrange(int depth, int *min, int *max, int range, int oodok);
int init(void);
void inctime(long nunits);
void calcbresnham(map_t *m, int x1, int y1, int x2, int y2, cell_t **retcell, int *numpixels);
void initbresnham(int x1, int y1, int x2, int y2, int *xinc1, int *yinc1, int *dinc1, int *xinc2, int *yinc2, int *dinc2, int *numpixels, int *d);
int isplayerturn(void);
void killwarning(warning_t *w);
void killwarningtext(char *text);
int limit(int *what, int min, int max);
int limitf(float *what, float min, float max);
int limitd(double *what, double min, double max);
int loadnpcnames(void);
void *mymalloc(size_t sz);
int onein(int howmany);
int parseplayerfile(FILE *f, lifeform_t *lf);
int pctchance(int pct);
float pctof(float pct, float num);
int rnd(int min, int max);
int real_roll(char *string, int wantmax);
int roll(char *string);
int rolldie(int ndice, int sides);
int rollhitdice(lifeform_t *lf, int wantmax);
int rollmpdice(lifeform_t *lf, int wantmax);
void setcurtime(int hours, int minutes);
//void sortlf(map_t *map);
void timeeffectsworld(map_t *map, int updategametime);
void usage(char *progname);