nexus/text.h

95 lines
4.4 KiB
C

#include "defs.h"
plural_t *addplural(char *singulartext, char *pluraltext, int stopafter);
void addengineeringinfo(lifeform_t *lf, char *buf, cell_t *c);
int needan(char *text);
char *capitalise(char *text);
char *capitaliseall(char *text);
enum COLOUR chartocol(char ch);
char *construct_hit_string(lifeform_t *lf, lifeform_t *victim, char *attackername, char *victimname, char *victimbpname, object_t *wep, enum DAMTYPE damtype, int dam, int maxhp, int damidx, int critical, int backstab, int fatal, int isunarmed, char *retbuf);
char *dicetotext(int ndice, int nsides, int bonus, int *min, int *max, char *dicebuf, char *minmaxbuf);
int flip(int ch);
char *getaccuracyname(int accpct);
int getaccuracymodnum(int accmodpct);
int getaccuracynum(int accpct);
char *getalignmentname(enum ALIGNMENT al);
char *getattackverb(lifeform_t *lf, object_t *wep, enum DAMTYPE damtype, int dam, int maxhp);
char *getattrabbrev(enum ATTRIB att);
char *getattrbracketname(enum ATTRIB whichatt, enum ATTRBRACKET brack);
char getattrletter(enum ATTRIB att);
char *getattrname(enum ATTRIB att);
char *getdamname(enum DAMTYPE damtype);
char *getdamnamenoun(enum DAMTYPE damtype);
char *getdirname(int dir);
char *getdirnameshort(int dir);
void getdisttext(cell_t *src, cell_t *dst,char *distbuf, char *distbufapprox, char *dirbuf);
char *getfillingname(int nutrition);
char *getflagsourcetext(flag_t *f);
int gethitconferlifetime(char *text, int *min, int *max);
char *getjobcatname(enum JOBCATEGORY jc);
char *getkillverb(lifeform_t *victim, object_t *wep, enum DAMTYPE damtype, int dam, int maxhp);
char *getpctname(int pct);
char *getpoisondamverb(enum POISONTYPE ptype);
//char *getpoisondesc(enum POISONTYPE ptype);
//char *getpoisonname(enum POISONTYPE ptype);
char *getpossessive(char *text);
char *getdrunkdesc(lifeform_t *lf, flag_t *drunkflag, char *buf);
char *getdrunktext(flag_t *drunkflag);
char *getilluminationdesc(enum ILLUMINATION il);
char *getinjuredbpname(enum BODYPART bp);
char *getinjuryname(enum DAMTYPE dt);
char *getinjurydesc(enum BODYPART bp, enum DAMTYPE dt);
char *getobmodprefix(object_t *o, obmod_t *om);
char *getrarityname(enum RARITY rr);
char *getregionname(char *buf, map_t *m, region_t *r, enum REGIONNAMEFORMAT how);
char *getreldirname(int reldir);
char *getsizetext(enum LFSIZE sz);
char *getschoolname(enum SPELLSCHOOL sch);
char *getschoolnameshort(enum SPELLSCHOOL sch);
char *getskillcheckname(enum CHECKTYPE ct);
char *gettimephasename(enum TIMEPHASE tp);
char *gettimetext(char *retbuf);
char *gettimetextfuzzy(char *retbuf, int wantpm);
char *getwaterdepthname(enum DEPTH d);
char *getweighttext(float weight, char *buf, int shortfmt);
int hoursto12(int h);
char *is(lifeform_t *lf);
char *it(lifeform_t *lf);
int isvowel(char c);
void killplural(plural_t *w);
void makegunaimstring(lifeform_t *lf, int lfid, char *retbuf);
char *makekillertext(char *retbuf, char *killverb, char *lastdam, map_t *where, int wantextra, int wantlocation);
char *makelowercase(char *text);
char *makeplural(char *text);
char *makethrowaccstring(lifeform_t *lf, cell_t *c, flag_t *throwflag, char *retbuf);
char *makeuppercase(char *text);
char *makewearstring(lifeform_t *lf, object_t *o, int wantyour, char *posbuf);
char *makewearstringsingle(lifeform_t *lf, flag_t *f, char *yourbuf, char *posbuf);
int needses(char *text);
char *noprefix(char *obname);
char *numtotext(int num, char *buf);
int parserange(char *rangetext);
char *readuntil(char *retbuf, char *src, char delim);
char *roman(int num);
int speedtokph(int speed);
void splittime(int *hours, int *mins, int *secs);
char *strrep(char *text, char *oldtok, char *newtok, int *rv);
char *dostrrep(char* in, char** out, char* oldtok, char* newtok, int *rv);
int streq(char *a, char *b);
char *strends(char *a, char *suffix);
char *strcasestarts(char *a, char *prefix);
material_t *strmatchesmaterial(char *p);
char *strstarts(char *a, char *prefix);
char *strstartswitha(char *text, char *retprefix);
int strlen_without_colours(char *buf);
int strpixmatch(char *haystack, char *needle);
enum VAULTTHING strtovt(char *text);
int texttodice(char *text, int *ndice, int *nsides, int *bonus);
int texttospellopts(char *text, ... );
int timeisbetween(int h, int start, int end);
//void texttospellopts(char *text, int *power, char *damstr, int *needgrab, int *range, char *racestr);
char *you(lifeform_t *lf);
char *you_l(lifeform_t *lf);
char *your(lifeform_t *lf);
char *your_l(lifeform_t *lf);