adding extra headers
This commit is contained in:
parent
7f5404d2d1
commit
2b61d7e66c
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,445 @@
|
||||||
|
lifeform_t *real_addlf(cell_t *cell, enum RACE rid, int level, int controller);
|
||||||
|
poison_t *addpoisontype(enum POISONTYPE id, char *name, char *text, int causesvomit, int dampct, enum POISONSEVERITY severity);
|
||||||
|
job_t *addjob(enum JOB id, char *name, char *desc);
|
||||||
|
race_t *addrace(enum RACE id, char *name, float weight, char glyph, int glyphcolour, enum MATERIAL mat, enum RACECLASS raceclass, char *desc);
|
||||||
|
raceclass_t *addraceclass(enum RACECLASS id, char *name, char *pluralname, enum SKILL skill);
|
||||||
|
skill_t *addskill(enum SKILL id, char *name, char *desc, int traintime);
|
||||||
|
void addskilldesc(enum SKILL id, enum SKILLLEVEL lev, char *text, int wantmsg);
|
||||||
|
object_t *addtrail(lifeform_t *lf, cell_t *where, int dir, int doprints, int doscents);
|
||||||
|
void adjustdamlf(lifeform_t *lf, int *amt, enum DAMTYPE damtype);
|
||||||
|
void adjustspeedforwater(lifeform_t *lf, int *speed);
|
||||||
|
void age(lifeform_t *lf, int pct);
|
||||||
|
void adjustdamforblessings(int *dam, lifeform_t *victim, int blessed);
|
||||||
|
void applylfdammod(int *dam, lifeform_t *lf, object_t *wep);
|
||||||
|
void applywalkdam(lifeform_t *lf, int dam, enum DAMTYPE damtype, object_t *o);
|
||||||
|
int areallies(lifeform_t *lf1, lifeform_t *lf2);
|
||||||
|
int areenemies(lifeform_t *lf1, lifeform_t *lf2);
|
||||||
|
int armourfits(lifeform_t *lf, object_t *o, enum ERROR *reason);
|
||||||
|
int askforinfo(lifeform_t *lf, int diffmod);
|
||||||
|
//int askforpayment(lifeform_t *shk, lifeform_t *lf);
|
||||||
|
char *assignnpcname(lifeform_t *lf);
|
||||||
|
void autoshortcut(lifeform_t *lf, enum OBTYPE spellid);
|
||||||
|
void autoskill(lifeform_t *lf);
|
||||||
|
void autotarget(lifeform_t *lf);
|
||||||
|
void autoweild(lifeform_t *lf);
|
||||||
|
int appearsrandomly(enum RACE rid);
|
||||||
|
void awardxpfor(lifeform_t *killed, float pct);
|
||||||
|
void bleed(lifeform_t *lf, int splatter);
|
||||||
|
int bleedfrom(lifeform_t *lf, enum BODYPART bp, int splatter);
|
||||||
|
int bpcantakearmour(lifeform_t *lf, enum BODYPART bp);
|
||||||
|
void breakgrabs(lifeform_t *lf, int fromme, int tome);
|
||||||
|
void breakaitargets(lifeform_t *lf, int onlylowerlev);
|
||||||
|
long calcscore(lifeform_t *lf);
|
||||||
|
int calcxp(lifeform_t *lf);
|
||||||
|
int calcxprace(enum RACE rid);
|
||||||
|
void callguards(lifeform_t *caller, lifeform_t *victim);
|
||||||
|
int canattack(lifeform_t *lf);
|
||||||
|
int cancast(lifeform_t *lf, enum OBTYPE oid, int *mpcost);
|
||||||
|
int cancook(lifeform_t *lf, recipe_t *rec, enum ERROR *reason);
|
||||||
|
int canclimb(lifeform_t *lf, enum ERROR *reason);
|
||||||
|
int candrink(lifeform_t *lf, object_t *o);
|
||||||
|
int caneat(lifeform_t *lf, object_t *o);
|
||||||
|
int canhaverandombehaviour(lifeform_t *lf);
|
||||||
|
int canhear(lifeform_t *lf, cell_t *c, int volume);
|
||||||
|
int canlearn(lifeform_t *lf, enum SKILL skid);
|
||||||
|
int canmakerecipe(lifeform_t *lf, recipe_t *rec);
|
||||||
|
int canopendoors(lifeform_t *lf);
|
||||||
|
int canpickup(lifeform_t *lf, object_t *o, int amt);
|
||||||
|
int canpolymorphto(enum RACE rid);
|
||||||
|
int canpush(lifeform_t *lf, object_t *o, int dir);
|
||||||
|
int canquaff(lifeform_t *lf, object_t *o);
|
||||||
|
int canreach(lifeform_t *lf, lifeform_t *victim, int *reachpenalty);
|
||||||
|
int canreachbp(lifeform_t *lf, lifeform_t *victim, enum BODYPART bp);
|
||||||
|
int cansee(lifeform_t *viewer, lifeform_t *viewee);
|
||||||
|
int cansee_real(lifeform_t *viewer, lifeform_t *viewee, int uselos);
|
||||||
|
int cansleep(lifeform_t *lf);
|
||||||
|
int canuseweapons(lifeform_t *lf);
|
||||||
|
int canwear(lifeform_t *lf, object_t *o, enum BODYPART where);
|
||||||
|
int canweild(lifeform_t *lf, object_t *o);
|
||||||
|
int cantakeoff(lifeform_t *lf, object_t *o);
|
||||||
|
int cantalk(lifeform_t *lf);
|
||||||
|
int castspell(lifeform_t *lf, enum OBTYPE sid, lifeform_t *targlf, object_t *targob, cell_t *targcell, object_t *fromob, int *seen);
|
||||||
|
int celllitfor(lifeform_t *lf, cell_t *c, int maxvisrange, int nightvisrange);
|
||||||
|
int celltransparentfor(lifeform_t *lf, cell_t *c, int *xray, int *rangemod);
|
||||||
|
int checkburdened(lifeform_t *lf, int preburdened);
|
||||||
|
int checkfordrowning(lifeform_t *lf, object_t *o);
|
||||||
|
int check_rest_ok(lifeform_t *lf);
|
||||||
|
//void checkxp(enum RACE rid);
|
||||||
|
float comparelfs(lifeform_t *lf1, lifeform_t *lf2);
|
||||||
|
int confuse(lifeform_t *lf, int howlong);
|
||||||
|
int continuedigging(lifeform_t *lf);
|
||||||
|
int countinnateattacks(lifeform_t *lf);
|
||||||
|
int countnearbyallies(lifeform_t *lf);
|
||||||
|
int countnearbyhurtallies(lifeform_t *lf);
|
||||||
|
int countplantsinsight(lifeform_t *lf);
|
||||||
|
void debug(lifeform_t *lf);
|
||||||
|
int demandbribe(lifeform_t *lf);
|
||||||
|
void die(lifeform_t *lf);
|
||||||
|
int digcell(lifeform_t *lf, cell_t *c, object_t *o);
|
||||||
|
int digdown(lifeform_t *lf, object_t *o);
|
||||||
|
int digup(lifeform_t *lf, object_t *o);
|
||||||
|
void do_eyesight_adjust(lifeform_t *lf);
|
||||||
|
void dumplev(void);
|
||||||
|
void dumplf(void);
|
||||||
|
void dumpmonsters(void);
|
||||||
|
void dumpxp(void);
|
||||||
|
int eat(lifeform_t *lf, object_t *o);
|
||||||
|
void endlfturn(lifeform_t *lf);
|
||||||
|
void enhancerandomskill(lifeform_t *lf);
|
||||||
|
void enhanceskills(lifeform_t *lf);
|
||||||
|
int exchangeweapon(lifeform_t *lf);
|
||||||
|
void extinguishlf(lifeform_t *lf);
|
||||||
|
object_t *eyesshaded(lifeform_t *lf);
|
||||||
|
int fall(lifeform_t *lf, lifeform_t *fromlf, int announce);
|
||||||
|
int fallasleep(lifeform_t *lf, enum SLEEPTYPE how, int howlong);
|
||||||
|
int fall_from_air(lifeform_t *lf);
|
||||||
|
void fightback(lifeform_t *lf, lifeform_t *attacker);
|
||||||
|
job_t *findjob(enum JOB jobid);
|
||||||
|
job_t *findjobbyname(char *name);
|
||||||
|
lifeform_t *findlf(map_t *m, int lfid);
|
||||||
|
lifeform_t *findlfunique(enum RACE rid);
|
||||||
|
poisontype_t *findpoisontype(enum POISONTYPE id);
|
||||||
|
race_t *findrace(enum RACE id);
|
||||||
|
race_t *findracebyname(char *name);
|
||||||
|
raceclass_t *findraceclass(enum RACECLASS id);
|
||||||
|
//lifeform_t *findshopkeeper(map_t *m, int roomid);
|
||||||
|
skill_t *findskill(enum SKILL id);
|
||||||
|
skill_t *findskillbyname(char *name);
|
||||||
|
enum SKILLLEVEL findskilllevbyname(char *name);
|
||||||
|
int flee(lifeform_t *lf);
|
||||||
|
void fleefrom(lifeform_t *lf, lifeform_t *enemy, int howlong, int onpurpose);
|
||||||
|
int fovlist_contains(int *endx, int *endy, int nendcells, int x, int y);
|
||||||
|
int freezelf(lifeform_t *freezee, lifeform_t *freezer, int howlong);
|
||||||
|
void gainhp(lifeform_t *lf, int amt);
|
||||||
|
void gainlevel(lifeform_t *lf, int autotrain);
|
||||||
|
void gainmp(lifeform_t *lf, int amt);
|
||||||
|
void gainxp(lifeform_t *lf, long amt);
|
||||||
|
void genareaknowledge(flagpile_t *fp, int chancemod);
|
||||||
|
void genxplist(void);
|
||||||
|
int get_adjacent_quadrants(int dir, enum QUADRANT *start, enum QUADRANT *end);
|
||||||
|
int get_circular_fov_endpoints(lifeform_t *lf, int maxvisrange, int *endx, int *endy, int *nendcells);
|
||||||
|
int getactspeed(lifeform_t *lf);
|
||||||
|
int getadjenemies(lifeform_t *lf, lifeform_t **adjlf, int *nadjlfs);
|
||||||
|
void getwhowillfollow(lifeform_t *lf, object_t *stairob, lifeform_t **adjally, int *seen, int *nadjallies);
|
||||||
|
enum ALIGNMENT getalignment(lifeform_t *lf);
|
||||||
|
enum ALLEGIENCE getallegiance(lifeform_t *lf);
|
||||||
|
int getallouterarmour(lifeform_t *lf, object_t **ob, int *nobs);
|
||||||
|
object_t *getarmour(lifeform_t *lf, enum BODYPART bp);
|
||||||
|
int getarmournoise(lifeform_t *lf);
|
||||||
|
int getarmourrating(lifeform_t *lf, object_t **hitob, int *hitchance, enum BODYPART *hitbp, int *narms);
|
||||||
|
int getattackspeed(lifeform_t *lf);
|
||||||
|
float getattackstamloss(lifeform_t *lf);
|
||||||
|
float getattackstamloss(lifeform_t *lf);
|
||||||
|
int getattpoints(lifeform_t *lf);
|
||||||
|
int getattr(lifeform_t *lf, enum ATTRIB attr);
|
||||||
|
enum ATTRBRACKET getattrbracket(int attrval, enum ATTRIB whichatt, /*@null@*/char *buf);
|
||||||
|
int real_getattr(lifeform_t *lf, enum ATTRIB attr, int ignoreattrset);
|
||||||
|
int getavgdam(lifeform_t *lf, int forxp);
|
||||||
|
float getequippedweight(lifeform_t *lf);
|
||||||
|
int getevasion(lifeform_t *lf);
|
||||||
|
object_t *getbestthrowmissile(lifeform_t *lf, lifeform_t *target);
|
||||||
|
object_t *getbestweapon(lifeform_t *lf);
|
||||||
|
object_t *getbestfirearm(lifeform_t *lf);
|
||||||
|
int getbodyparthitchance(enum BODYPART bp);
|
||||||
|
char *getbodypartname(lifeform_t *lf, enum BODYPART bp);
|
||||||
|
char *getbodypartequipname(enum BODYPART bp);
|
||||||
|
object_t *getequippedob(obpile_t *op, enum BODYPART bp);
|
||||||
|
int getexposedlimbs(lifeform_t *lf);
|
||||||
|
object_t *getfirearm(lifeform_t *lf);
|
||||||
|
enum LOFTYPE getfirearmloftype(lifeform_t *lf);
|
||||||
|
int getfootprinttime(lifeform_t *lf);
|
||||||
|
lifeform_t *getguntarget(lifeform_t *lf);
|
||||||
|
int getguntargetid(lifeform_t *lf);
|
||||||
|
//int gethealtime(lifeform_t *lf);
|
||||||
|
int gethearingrange(lifeform_t *lf);
|
||||||
|
int gethitdice(lifeform_t *lf);
|
||||||
|
int gethitdicerace(race_t *r);
|
||||||
|
int gethitstokill(lifeform_t *lf, lifeform_t *victim, int useevasion, int usearmour);
|
||||||
|
int gethppct(lifeform_t *lf);
|
||||||
|
enum COLOUR gethungercol(enum HUNGER hlev);
|
||||||
|
enum HUNGER gethungerlevel(int hunger);
|
||||||
|
char *gethungername(lifeform_t *lf, enum HUNGER hunger, char *buf);
|
||||||
|
int gethungerval(lifeform_t *lf);
|
||||||
|
job_t *getjob(lifeform_t *lf);
|
||||||
|
int getlastdir(lifeform_t *lf);
|
||||||
|
int getleftrightwalls(lifeform_t *lf);
|
||||||
|
int getlfaccuracy(lifeform_t *lf, object_t *wep);
|
||||||
|
char getlfcol(lifeform_t *lf, enum MSGCHARCOL cc);
|
||||||
|
enum LFCONDITION getlfcondition(lifeform_t *lf);
|
||||||
|
int getflightsizemod(lifeform_t *lf);
|
||||||
|
enum SKILLLEVEL getmaxskilllevel(lifeform_t *lf, enum SKILL skid);
|
||||||
|
int getminions(lifeform_t *lf, lifeform_t **minion, int *nminions);
|
||||||
|
int getmiscastchance(lifeform_t *lf);
|
||||||
|
int getmorale(lifeform_t *lf);
|
||||||
|
int getnightvisrange(lifeform_t *lf);
|
||||||
|
int getnoisedetails(lifeform_t *lf, enum NOISETYPE nid, char *heartext,char *seetext, int *volume);
|
||||||
|
char *getlfconditionname(enum LFCONDITION cond);
|
||||||
|
object_t *getouterequippedob(lifeform_t *lf, enum BODYPART bp);
|
||||||
|
//int getowing(lifeform_t *buyer, int shopid, int *retnitems);
|
||||||
|
enum LFCONDITION getseenlfconditioncutoff(lifeform_t *lf);
|
||||||
|
char *getseenlfconditionname(lifeform_t *lf, lifeform_t *viewer);
|
||||||
|
int getsmellrange(lifeform_t *lf);
|
||||||
|
glyph_t *getlfglyph(lifeform_t *lf);
|
||||||
|
enum MATERIAL getlfmaterial(lifeform_t *lf);
|
||||||
|
enum SKILLLEVEL getlorelevel(lifeform_t *lf, enum RACECLASS rcid);
|
||||||
|
int getattacks(lifeform_t *lf, int *min, int *max);
|
||||||
|
float getmaxcarryweight(lifeform_t *lf);
|
||||||
|
float getmaxliftweight(lifeform_t *lf);
|
||||||
|
int getmaxmp(lifeform_t *lf);
|
||||||
|
float getmaxpushweight(lifeform_t *lf);
|
||||||
|
float getmaxstamina(lifeform_t *lf);
|
||||||
|
int getmr(lifeform_t *lf);
|
||||||
|
int getvisrange(lifeform_t *lf, int useambient);
|
||||||
|
void idxtoxy(lifeform_t *lf, int idx, int *x, int *y);
|
||||||
|
//void setviscell(lifeform_t *lf, cell_t *cell, int how);
|
||||||
|
//int getviscell(lifeform_t *lf, cell_t *cell);
|
||||||
|
int xytoidx(lifeform_t *lf, int x, int y);
|
||||||
|
int getmovespeed(lifeform_t *lf);
|
||||||
|
char *getmoveverb(lifeform_t *lf);
|
||||||
|
char *getmoveverbother(lifeform_t *lf);
|
||||||
|
lifeform_t *getnearbypeaceful(lifeform_t *lf);
|
||||||
|
char *getpitverb(lifeform_t *lf, int dir, int onpurpose, int climb);
|
||||||
|
char *getlfname(lifeform_t *lf, char *buf);
|
||||||
|
char *real_getlfname(lifeform_t *lf, char *buf, int usevis, int showall);
|
||||||
|
char *getlfnamea(lifeform_t *lf, char *buf);
|
||||||
|
char *real_getlfnamea(lifeform_t *lf, char *buf, int usevis, int showall);
|
||||||
|
enum LFSIZE getlfsize(lifeform_t *lf);
|
||||||
|
float getlfweight(lifeform_t *lf, int withobs);
|
||||||
|
object_t *getsecmeleeweapon(lifeform_t *lf);
|
||||||
|
object_t *getshield(lifeform_t *lf, enum DAMTYPE dt);
|
||||||
|
int getallshields(lifeform_t *lf, enum DAMTYPE damtype, object_t **retob, int *checkmod, int *nretobs);
|
||||||
|
int getshieldblockmod(lifeform_t *lf, object_t *o);
|
||||||
|
int getspellspeed(lifeform_t *lf);
|
||||||
|
int getstamina(lifeform_t *lf);
|
||||||
|
float getstamregen(lifeform_t *lf);
|
||||||
|
char *getplayername(char *buf);
|
||||||
|
char *getplayernamefull(char *buf);
|
||||||
|
//int getpoisondamchance(enum POISONTYPE ptype);
|
||||||
|
//char *getpoisondamverb(enum POISONTYPE ptype);
|
||||||
|
//char *getpoisondesc(enum POISONTYPE ptype);
|
||||||
|
//char *getpoisonname(enum POISONTYPE ptype);
|
||||||
|
//enum POISONSEVERITY getpoisonseverity(enum POISONTYPE ptype);
|
||||||
|
int getraceclass(lifeform_t *lf);
|
||||||
|
int getracerarity(map_t *map, enum RACE rid, enum RARITY *rr);
|
||||||
|
object_t *getrandomarmour(lifeform_t *lf, lifeform_t *attacker);
|
||||||
|
enum BODYPART getrandomcorebp(lifeform_t *lf, lifeform_t *attacker);
|
||||||
|
race_t *getrandomcorpserace(cell_t *c);
|
||||||
|
job_t *getrandomjob(int onlyplayerjobs);
|
||||||
|
int getrandommonlevel(race_t *r, map_t *m);
|
||||||
|
race_t *getrandomrace(cell_t *c, int forcedepth);
|
||||||
|
race_t *getreallyrandomrace(enum RACECLASS wantrc);
|
||||||
|
enum SKILL getrandomskill(void);
|
||||||
|
object_t *getrestob(lifeform_t *lf);
|
||||||
|
enum SKILLLEVEL getskill(lifeform_t *lf, enum SKILL id);
|
||||||
|
int getskilllevcost(enum SKILLLEVEL slev);
|
||||||
|
int getsounddist(int volume);
|
||||||
|
char *getspeedname(int speed, char *buf);
|
||||||
|
char *getspeednameshort(int speed, char *buf);
|
||||||
|
long getspforpoint(lifeform_t *lf);
|
||||||
|
float getstatmod(lifeform_t *lf, enum ATTRIB att);
|
||||||
|
char *getskilldesc(enum SKILL id );
|
||||||
|
char *getskillname(enum SKILL id );
|
||||||
|
char *getskilllevelname(enum SKILLLEVEL sl);
|
||||||
|
int getteachableskills(lifeform_t *teacher, lifeform_t *student, int *info, enum TRADEINFOTYPE *tradetype, int *ninfo );
|
||||||
|
char *gettradeinfoname(int what, enum TRADEINFOTYPE tradetype, char *buf);
|
||||||
|
int getthrowspeed(lifeform_t *lf);
|
||||||
|
int getturnspeed(lifeform_t *lf);
|
||||||
|
void getwantdistance(lifeform_t *lf, lifeform_t *victim, int *min, int *max, int attacking);
|
||||||
|
object_t *getweapon(lifeform_t *lf);
|
||||||
|
int getweapons(lifeform_t *lf, object_t **wep, flag_t **damflag, int *lastweaponidx, obpile_t **op, int *nweps);
|
||||||
|
enum SKILLLEVEL getweaponskill(lifeform_t *lf, object_t *o);
|
||||||
|
long getxpforlev(int level);
|
||||||
|
void givejob(lifeform_t *lf, enum JOB jobid);
|
||||||
|
int givemoney(lifeform_t *from, lifeform_t *to, int amt);
|
||||||
|
void giveobflags(lifeform_t *lf, object_t *o, enum FLAG whattype);
|
||||||
|
int giverandomobs(lifeform_t *lf, int amt);
|
||||||
|
flag_t *giveskill(lifeform_t *lf, enum SKILL id);
|
||||||
|
flag_t *giveskilllev(lifeform_t *lf, enum SKILL id, enum SKILLLEVEL slev);
|
||||||
|
void givestartobs(lifeform_t *lf, object_t *targob, flagpile_t *fp);
|
||||||
|
void givestartskills(lifeform_t *lf, flagpile_t *fp);
|
||||||
|
map_t *gotolev(lifeform_t *lf, int depth, object_t *fromstairs);
|
||||||
|
int gotosleep(lifeform_t *lf, int onpurpose);
|
||||||
|
flag_t *hasbleedinginjury(lifeform_t *lf, enum BODYPART bp);
|
||||||
|
int hasfreeaction(lifeform_t *lf);
|
||||||
|
int real_hasfreeaction(lifeform_t *lf, enum FLAG exception);
|
||||||
|
int hashealableinjuries(lifeform_t *lf);
|
||||||
|
job_t *hasjob(lifeform_t *lf, enum JOB job);
|
||||||
|
void inc_quad_range(enum QUADRANT *start, enum QUADRANT *end, int howmuch);
|
||||||
|
int injure(lifeform_t *lf, enum BODYPART where, enum DAMTYPE damtype);
|
||||||
|
int lfcanbestoned(lifeform_t *lf);
|
||||||
|
flag_t *lfhasflag(lifeform_t *lf, enum FLAG fid);
|
||||||
|
flag_t *lfhasflagval(lifeform_t *lf, enum FLAG fid, int val0, int val1, int val2, char *text);
|
||||||
|
flag_t *lfhasknownflag(lifeform_t *lf, enum FLAG fid);
|
||||||
|
flag_t *lfhasknownflagval(lifeform_t *lf, enum FLAG fid, int val0, int val1, int val2, /*@null@*/ char *text);
|
||||||
|
int lfproduceslight(lifeform_t *lf);
|
||||||
|
int lockpick(lifeform_t *lf, cell_t *targcell, object_t *target, object_t *device);
|
||||||
|
void loseobflags(lifeform_t *lf, object_t *o, int kind);
|
||||||
|
int hasbp(lifeform_t *lf, enum BODYPART bp);
|
||||||
|
flag_t *hasactivespell(lifeform_t *lf, enum OBTYPE sid);
|
||||||
|
int haslof(cell_t *src, cell_t *dest, enum LOFTYPE loftype, cell_t **newdest);
|
||||||
|
int haslof_real(cell_t *src, cell_t *dest, enum LOFTYPE loftype, cell_t **newdest, lifeform_t *srclf, int walllfsok);
|
||||||
|
int haslos(lifeform_t *viewer, cell_t *dest);
|
||||||
|
int haslosdark(lifeform_t *viewer, cell_t *dest);
|
||||||
|
int haslos_fast(lifeform_t *viewer, cell_t *dest);
|
||||||
|
void interrupt(lifeform_t *lf);
|
||||||
|
enum FLAG isairborne(lifeform_t *lf);
|
||||||
|
int isaquatic(lifeform_t *lf);
|
||||||
|
flag_t *isasleep(lifeform_t *lf);
|
||||||
|
int isbehind(lifeform_t *lf, lifeform_t *otherlf);
|
||||||
|
int isbleeding(lifeform_t *lf);
|
||||||
|
int isblind(lifeform_t *lf);
|
||||||
|
enum BURDENED isburdened(lifeform_t *lf);
|
||||||
|
int ischarmable(lifeform_t *lf);
|
||||||
|
int isclimbing(lifeform_t *lf);
|
||||||
|
int isdead(lifeform_t *lf);
|
||||||
|
int isdeaf(lifeform_t *lf);
|
||||||
|
object_t *isdualweilding(lifeform_t *lf);
|
||||||
|
int isfleeing(lifeform_t *lf);
|
||||||
|
int isfreebp(lifeform_t *lf, enum BODYPART bp);
|
||||||
|
int isfriendly(lifeform_t *lf);
|
||||||
|
int isfullyhealed(lifeform_t *lf);
|
||||||
|
int isgenius(lifeform_t *lf);
|
||||||
|
int isgod(lifeform_t *lf);
|
||||||
|
int ishelplessvictim(lifeform_t *victim, lifeform_t *attacker, enum HELPLESSTYPE *how);
|
||||||
|
flag_t *ishidingfrom(lifeform_t *hider, lifeform_t *seeker);
|
||||||
|
int ishirable(lifeform_t *lf);
|
||||||
|
int isimmobile(lifeform_t *lf);
|
||||||
|
flag_t *isimmuneto(flagpile_t *fp, enum DAMTYPE dt, int onlytemp);
|
||||||
|
int isinbattle(lifeform_t *lf, int includedistant);
|
||||||
|
int isingunrange(lifeform_t *lf, cell_t *where);
|
||||||
|
int isloreskill(enum SKILL skid);
|
||||||
|
int islowhp(lifeform_t *lf);
|
||||||
|
int isspellskill(enum SKILL skid);
|
||||||
|
int ismadeofice(lifeform_t *lf);
|
||||||
|
int ismaxedskill(lifeform_t *lf, enum SKILL skid);
|
||||||
|
int ispeaceful(lifeform_t *lf);
|
||||||
|
int ispetof(lifeform_t *lf, lifeform_t *owner);
|
||||||
|
flag_t *ispetortarget(lifeform_t *lf, lifeform_t *ownertarget);
|
||||||
|
int isplayer(lifeform_t *lf);
|
||||||
|
flag_t *ispoisoned(lifeform_t *lf);
|
||||||
|
flag_t *ispoisonedwith(lifeform_t *lf, enum POISONTYPE pt);
|
||||||
|
int ispolymorphed(lifeform_t *lf);
|
||||||
|
int isprone(lifeform_t *lf);
|
||||||
|
flag_t *isresistantto(flagpile_t *fp, enum DAMTYPE dt, int onlytemp);
|
||||||
|
flag_t *isresting(lifeform_t *lf);
|
||||||
|
int issleepingtimefor(lifeform_t *lf);
|
||||||
|
object_t *isstuck(lifeform_t *lf);
|
||||||
|
int issmellablelf(lifeform_t *lf);
|
||||||
|
int isswimming(lifeform_t *lf);
|
||||||
|
int isunconscious(lifeform_t *lf);
|
||||||
|
int isundead(lifeform_t *lf);
|
||||||
|
flag_t *isvulnto(flagpile_t *fp, enum DAMTYPE dt, int onlytemp);
|
||||||
|
int isweaponskill(enum SKILL skid);
|
||||||
|
enum FLAG iswoozy(lifeform_t *lf);
|
||||||
|
void killjob(job_t *job);
|
||||||
|
void killlf(lifeform_t *lf);
|
||||||
|
void killpoisontype(poisontype_t *pt);
|
||||||
|
void killrace(race_t *race);
|
||||||
|
flag_t *levelabilityready(lifeform_t *lf);
|
||||||
|
int loadfirearm(lifeform_t *lf, object_t *gun, object_t *ammo);
|
||||||
|
int loadfirearmfast(lifeform_t *lf, int onpurpose);
|
||||||
|
void loseconcentration(lifeform_t *lf);
|
||||||
|
int losehp(lifeform_t *lf, int amt, enum DAMTYPE damtype, lifeform_t *fromlf, char *damsrc);
|
||||||
|
int losehp_real(lifeform_t *lf, int amt, enum DAMTYPE damtype, lifeform_t *fromlf, char *damsrc, int reducedam, object_t *fromob, int retaliate);
|
||||||
|
void losemp(lifeform_t *lf, int amt);
|
||||||
|
void makefriendly(lifeform_t *lf, int howlong);
|
||||||
|
int makenauseated(lifeform_t *lf, int amt, int howlong);
|
||||||
|
void makenoise(lifeform_t *lf, enum NOISETYPE nid);
|
||||||
|
void makepeaceful(lifeform_t *lf, lifeform_t *causedby);
|
||||||
|
lifeform_t *makezombie(object_t *o);
|
||||||
|
void mayusespellschool(flagpile_t *fp, enum SPELLSCHOOL ss, enum FLAG how, int overridepower);
|
||||||
|
int meetsallattreqs(lifeform_t *lf, object_t *o);
|
||||||
|
int meetsattreq(lifeform_t *lf, flag_t *f, object_t *o, int *modpct);
|
||||||
|
int mightflee(lifeform_t *lf);
|
||||||
|
int modattr(lifeform_t *lf, enum ATTRIB attr, int amt);
|
||||||
|
void modhunger(lifeform_t *lf, int amt);
|
||||||
|
float modifybystat(float num, lifeform_t *lf, enum ATTRIB att);
|
||||||
|
void modmorale(lifeform_t *lf, int howmuch);
|
||||||
|
void modstamina(lifeform_t *lf, float howmuch);
|
||||||
|
int movecausesnoise(lifeform_t *lf);
|
||||||
|
int needstorest(lifeform_t *lf, char *validchars);
|
||||||
|
void noarmouron(race_t *r, enum BODYPART bp);
|
||||||
|
int noise(cell_t *c, lifeform_t *noisemaker, enum NOISECLASS nt, int volume, char *text, char *seetext);
|
||||||
|
enum NOISECLASS noisetypetoclass(enum NOISETYPE nt);
|
||||||
|
void outfitlf(lifeform_t *lf);
|
||||||
|
void petify(lifeform_t *lf, lifeform_t *owner);
|
||||||
|
int pickup(lifeform_t *lf, object_t *what, int howmany, int fromground, int antannounce);
|
||||||
|
void poison(lifeform_t *lf, int howlong, enum POISONTYPE ptype, int power, char *fromwhat);
|
||||||
|
//int poisoncausesvomit(enum POISONTYPE ptype);
|
||||||
|
int poisonthreatenslife(lifeform_t *lf, flag_t *f);
|
||||||
|
void practice(lifeform_t *lf, enum SKILL skid, int amt);
|
||||||
|
//void precalclos_old(lifeform_t *lf);
|
||||||
|
void precalclos(lifeform_t *lf);
|
||||||
|
void preparecorpse(lifeform_t *lf, object_t *corpse);
|
||||||
|
int push(lifeform_t *lf, object_t *o, int dir);
|
||||||
|
int readytotrain(lifeform_t *lf);
|
||||||
|
int recruit(lifeform_t *lf);
|
||||||
|
void refreshlevelabilities(lifeform_t *lf);
|
||||||
|
void relinklf(lifeform_t *src, map_t *dst);
|
||||||
|
int resizelf(lifeform_t *lf, enum LFSIZE newsize);
|
||||||
|
int rest(lifeform_t *lf, int onpurpose);
|
||||||
|
void setskillused(lifeform_t *lf, enum SKILL skid);
|
||||||
|
void spot_hiding_lf(lifeform_t *lf, lifeform_t *hider);
|
||||||
|
int startclimbing(lifeform_t *lf);
|
||||||
|
int startresting(lifeform_t *lf, int willtrain);
|
||||||
|
int rollattr(enum ATTRBRACKET bracket);
|
||||||
|
int rollstat(lifeform_t *lf, enum ATTRIB attr);
|
||||||
|
int safetorest(lifeform_t *lf);
|
||||||
|
int say(lifeform_t *lf, char *text, int volume);
|
||||||
|
int sayphrase(lifeform_t *lf, enum SAYPHRASE what, int volume, int val0, char *text);
|
||||||
|
int scare(lifeform_t *lf, lifeform_t *scarer, int howlong, int scarerbonus);
|
||||||
|
//int setammo(lifeform_t *lf, object_t *o);
|
||||||
|
void setattr(lifeform_t *lf, enum ATTRIB attr, int val);
|
||||||
|
void setbodypartname(race_t *r, enum BODYPART bp, char *name);
|
||||||
|
void setbodytype(race_t *r, enum BODYTYPE bt);
|
||||||
|
int setfacing(lifeform_t *lf, int dir);
|
||||||
|
void setfollowdistance(lifeform_t *lf, int min, int max);
|
||||||
|
void setguntarget(lifeform_t *lf, lifeform_t *targ);
|
||||||
|
void setkillverb(lifeform_t *lf, char *buf);
|
||||||
|
void setrace(lifeform_t *lf, enum RACE rid, int frompolymorph);
|
||||||
|
void setlastdam(lifeform_t *lf, char *buf);
|
||||||
|
//void setlftarget(lifeform_t *lf, lifeform_t *victim);
|
||||||
|
int setlfmaterial(lifeform_t *lf, enum MATERIAL id, int wantannounce);
|
||||||
|
void setlosdirty(lifeform_t *lf);
|
||||||
|
void setstamina(lifeform_t *lf, float howmuch);
|
||||||
|
int shoot(lifeform_t *lf);
|
||||||
|
int skillcheck(lifeform_t *lf, enum CHECKTYPE ct, int diff, int mod);
|
||||||
|
int real_skillcheck(lifeform_t *lf, enum CHECKTYPE ct, int diff, int mod, int *result);
|
||||||
|
int skillcheckvs(lifeform_t *lf1, enum CHECKTYPE ct1, int mod1, lifeform_t *lf2, enum CHECKTYPE ct2, int mod2);
|
||||||
|
int slipon(lifeform_t *lf, object_t *o);
|
||||||
|
void sortlf(map_t *map, lifeform_t *lf);
|
||||||
|
void startlfturn(lifeform_t *lf);
|
||||||
|
int steal(lifeform_t *lf, obpile_t *op, enum FLAG wantflag);
|
||||||
|
int stone(lifeform_t *lf);
|
||||||
|
int stopclimbing(lifeform_t *lf, int onpurpose);
|
||||||
|
void stopeating(lifeform_t *lf);
|
||||||
|
void stopresting(lifeform_t *lf);
|
||||||
|
void stoprunning(lifeform_t *lf);
|
||||||
|
void stopsprinting(lifeform_t *lf);
|
||||||
|
int stun(lifeform_t *lf, int nturns);
|
||||||
|
lifeform_t *summonmonster(lifeform_t *caster, cell_t *c, enum RACE rid, char *racename, int lifetime, int wantfriendly);
|
||||||
|
//int testammo(lifeform_t *lf, object_t *o);
|
||||||
|
int takeoff(lifeform_t *lf, object_t *o);
|
||||||
|
void taketime(lifeform_t *lf, long howlong);
|
||||||
|
int throwat(lifeform_t *thrower, object_t *o, cell_t *where);
|
||||||
|
void timeeffectslf(lifeform_t *lf);
|
||||||
|
int tradeknowledge(lifeform_t *lf);
|
||||||
|
int tryclimb(lifeform_t *lf, cell_t *where, char *towhat, int onpurpose);
|
||||||
|
int touch(lifeform_t *lf, object_t *o);
|
||||||
|
void turntoface(lifeform_t *lf, cell_t *dstcell);
|
||||||
|
void unequipeffects(lifeform_t *lf, object_t *o);
|
||||||
|
void unpoison(lifeform_t *lf);
|
||||||
|
void unsummon(lifeform_t *lf, int vanishobs);
|
||||||
|
int unweild(lifeform_t *lf, object_t *o);
|
||||||
|
int useability(lifeform_t *lf, enum OBTYPE aid, lifeform_t *who, cell_t *where);
|
||||||
|
int useringofmiracles(lifeform_t *lf, int charges);
|
||||||
|
int usestairs(lifeform_t *lf, object_t *o, int onpurpose, int climb);
|
||||||
|
int validateraces(void);
|
||||||
|
void wakeup(lifeform_t *lf, int howmuch);
|
||||||
|
int wear(lifeform_t *lf, object_t *o);
|
||||||
|
int weild(lifeform_t *lf, object_t *o);
|
||||||
|
int willbackstab(lifeform_t *lf, lifeform_t *victim, object_t *wep);
|
||||||
|
int willbleedfrom(lifeform_t *lf, enum BODYPART bp);
|
||||||
|
int willburden(lifeform_t *lf, object_t *o, int howmany);
|
||||||
|
int willeatlf(lifeform_t *eater, lifeform_t *eatee);
|
||||||
|
//int youhear(cell_t *c, char *text);
|
|
@ -0,0 +1,298 @@
|
||||||
|
#ifndef __OBJECTS_H
|
||||||
|
#define __OBJECTS_H
|
||||||
|
#include "defs.h"
|
||||||
|
|
||||||
|
brand_t *addbrand(enum BRAND id, char *suffix, enum BODYPART bp, enum BLESSTYPE blessed, int blesschance);
|
||||||
|
object_t *addemptyob(obpile_t *where, object_t *o);
|
||||||
|
hiddenname_t *addhiddenname(enum OBCLASS obclass, char *text);
|
||||||
|
knowledge_t *addknowledge(enum OBCLASS id, char *hiddenname, int known);
|
||||||
|
material_t *addmaterial(enum MATERIAL id, char *name, float weightrating);
|
||||||
|
objectclass_t *addoc(enum OBCLASS id, char *name, char *desc, char glyph, int glyphcolour, enum RARITY rarity);
|
||||||
|
void addocnoun(objectclass_t *oc, char *text);
|
||||||
|
object_t *addob(obpile_t *where, char *name);
|
||||||
|
object_t *addobfast(obpile_t *where, enum OBTYPE oid);
|
||||||
|
object_t *addobject(obpile_t *where, char *name, int canstack, int wantlinkholes, enum OBTYPE forceoid);
|
||||||
|
int addobburst(cell_t *where, int range, int dirtype, char *name, lifeform_t *fromlf, enum LOFTYPE needlof);
|
||||||
|
obmod_t *addobmod(enum OBMOD id, char *prefix);
|
||||||
|
obpile_t *addobpile(lifeform_t *owner, cell_t *where, object_t *parentob);
|
||||||
|
void addobsinradius(cell_t *centre, int radius, int dirtype, char *name, int allowdupes);
|
||||||
|
objecttype_t *addot(enum OBTYPE id, char *name, char *description, int material, float weight, int obclassid, enum LFSIZE size);
|
||||||
|
recipe_t *addrecipe(enum OBTYPE result, ...);
|
||||||
|
void adjustdamhardness(int *dam, enum DAMTYPE damtype, enum MATERIAL mat);
|
||||||
|
void adjustdammaterial(int *dam, enum DAMTYPE damtype, enum MATERIAL mat);
|
||||||
|
void adjustdamob(object_t *o, int *dam, enum DAMTYPE damtype);
|
||||||
|
int adjustarmourpenalty(lifeform_t *lf, float amt);
|
||||||
|
int adjustshieldpenalty(lifeform_t *lf, float amt);
|
||||||
|
//void adjustprice(objecttype_t *ot, float *price );
|
||||||
|
void appendinscription(object_t *o, char *text);
|
||||||
|
void applyobmod(object_t *o, obmod_t *om);
|
||||||
|
int blessob(object_t *o);
|
||||||
|
void brightflash(cell_t *centre, int range, lifeform_t *immunelf);
|
||||||
|
void calcshopprice(object_t *o, flag_t *shopitemflag);
|
||||||
|
int canbepoisoned(enum OBTYPE oid);
|
||||||
|
int canseeob(lifeform_t *lf, object_t *o);
|
||||||
|
object_t *canstackob(obpile_t *op, object_t *match);
|
||||||
|
object_t *canstacknewot(obpile_t *op, objecttype_t *match);
|
||||||
|
int changemat(object_t *o, enum MATERIAL mat);
|
||||||
|
int chargesknown(object_t *o);
|
||||||
|
int getcritprotection(object_t *o);
|
||||||
|
int checkobnames(char *haystack, char *needle);
|
||||||
|
void colourmatchob(object_t *o, lifeform_t *lf);
|
||||||
|
void copyobprops(object_t *dst, object_t *src);
|
||||||
|
int counthiddennames(enum OBCLASS ocid, char *text);
|
||||||
|
int countmoney(obpile_t *op);
|
||||||
|
int countnames(char **list);
|
||||||
|
int counthighestobflagvalue(obpile_t *op, enum FLAG fid);
|
||||||
|
int countobs(obpile_t *op, int onlyifknown);
|
||||||
|
int countobsoftype(obpile_t *op, enum OBTYPE oid);
|
||||||
|
int countobswithflag(obpile_t *op, enum FLAG flagid);
|
||||||
|
int countobswithflagval(obpile_t *op, enum FLAG flagid, int val0, int val1, int val2, char *text);
|
||||||
|
int countnoncosmeticobs(obpile_t *op, int onlyifknown, int includetrails);
|
||||||
|
int curseob(object_t *o);
|
||||||
|
void damageallobs(object_t *srcob, obpile_t *op, int howmuch, int damtype, lifeform_t *srclf);
|
||||||
|
int doobdieconvert(object_t *o, int wantannounce);
|
||||||
|
int doobtraps(object_t *o, lifeform_t *lf);
|
||||||
|
void dumpobrarity(void);
|
||||||
|
void explodeob(object_t *o, flag_t *f, int bigness);
|
||||||
|
void extinguish(object_t *o);
|
||||||
|
material_t *findmaterial(int id);
|
||||||
|
objectclass_t *findoc(int id);
|
||||||
|
object_t *findobbyid(obpile_t *op, long oid);
|
||||||
|
object_t *findobl(obpile_t *op, char let); // find object by letter
|
||||||
|
brand_t *findbrand(enum BRAND id);
|
||||||
|
obmod_t *findobmod(enum OBMOD id);
|
||||||
|
objecttype_t *findot(enum OBTYPE id);
|
||||||
|
objecttype_t *findotn(char *name); // find objecttype by name
|
||||||
|
recipe_t *findrecipefor(enum OBTYPE result);
|
||||||
|
int fountain_will_dryup(object_t *o);
|
||||||
|
void fragments(cell_t *centre, char *what, int speed, int howfar);
|
||||||
|
void genhiddennames(void);
|
||||||
|
enum LFSIZE getarmoursize(object_t *o);
|
||||||
|
object_t *getbestcontainer(obpile_t *op);
|
||||||
|
int getchargeinfo(object_t *o, int *cur, int *max);
|
||||||
|
int getcharges(object_t *o);
|
||||||
|
int getcritchance(lifeform_t *lf, object_t *o, lifeform_t *victim);
|
||||||
|
int getdr(object_t *o);
|
||||||
|
int checkcritprotection(lifeform_t *lf, object_t *o);
|
||||||
|
int geteffecttime(int min, int max, enum BLESSTYPE isblessed);
|
||||||
|
int getflamingobs(obpile_t *op, object_t **retob, int *nretobs);
|
||||||
|
int getingredients(obpile_t *op, recipe_t *rec, object_t **retob, int *retcount, int *retconsume, int *nretobs, int promptformulti);
|
||||||
|
objecttype_t *getlinkspell(object_t *o);
|
||||||
|
enum COLOUR getmaterialcolour(enum MATERIAL mat );
|
||||||
|
enum MATSTATE getmaterialstate(enum MATERIAL mat);
|
||||||
|
int getmissileaccuracy(lifeform_t *thrower, cell_t *where, object_t *missile, object_t *firearm, flag_t *tkthrow);
|
||||||
|
int getobaccuracy(object_t *wep, lifeform_t *weilder);
|
||||||
|
int getobbonus(object_t *o, int onlyknown);
|
||||||
|
lifeform_t *getobcreatedby(object_t *o);
|
||||||
|
int getobpoints(object_t *o);
|
||||||
|
skill_t *getobskill(flagpile_t *fp);
|
||||||
|
enum LFSIZE getobsize(object_t *o);
|
||||||
|
int getobspellpower(object_t *o, lifeform_t *lf);
|
||||||
|
int getobvalue(object_t *o);
|
||||||
|
int real_getobvalue(object_t *o, int amt);
|
||||||
|
char *getoperateverb(object_t *o);
|
||||||
|
object_t *getoutercontainer(object_t *o);
|
||||||
|
object_t *getoutercontainerop(obpile_t *op);
|
||||||
|
//int getobtypevalue(objecttype_t *ot);
|
||||||
|
object_t *getammo(object_t *gun);
|
||||||
|
objecttype_t *getbasicweaponforskill(enum SKILL skid);
|
||||||
|
object_t *getrandomammo(lifeform_t *lf);
|
||||||
|
objecttype_t *getrandomammofor(object_t *o);
|
||||||
|
brand_t *getrandombrandfor(objecttype_t *ot);
|
||||||
|
objecttype_t *getrandomobofclass(enum OBCLASS ocid, int minrarity, int maxrarity, lifeform_t *forlf);
|
||||||
|
enum OBTYPE getrandomtrapforob(void);
|
||||||
|
char *getdamname(enum DAMTYPE damtype);
|
||||||
|
char *getdamnamenoun(enum DAMTYPE damtype);
|
||||||
|
char *getfillingname(int nutrition);
|
||||||
|
int getfirearmrange(object_t *o);
|
||||||
|
int getfirearmspeed(object_t *o);
|
||||||
|
glyph_t *getglyph(object_t *o);
|
||||||
|
int gethardness(enum MATERIAL matid);
|
||||||
|
char *genhiddenname(enum OBCLASS id);
|
||||||
|
char *gethiddenname(object_t *o);
|
||||||
|
int getobattackdelay(object_t *o);
|
||||||
|
int getobhp(object_t *o, int *max);
|
||||||
|
float getobhppct(object_t *o);
|
||||||
|
int getobmaxhp(object_t *o);
|
||||||
|
int getletindex(char let);
|
||||||
|
int getmaterialvalue(enum MATERIAL mat );
|
||||||
|
int getmaxthrowrange(lifeform_t *lf, object_t *o);
|
||||||
|
char getnextletter(obpile_t *op, char *wantletter);
|
||||||
|
int getnumshards(object_t *o);
|
||||||
|
int getnutritionbase(object_t *o);
|
||||||
|
int getnutrition(object_t *o);
|
||||||
|
enum DEPTH getobdepth(object_t *o, lifeform_t *lf);
|
||||||
|
char *getobdesc(object_t *o, char *buf);
|
||||||
|
char *getobequipinfo(object_t *o, char *buf);
|
||||||
|
char *getobextrainfo(object_t *o, char *buf);
|
||||||
|
cell_t *getoblocation(object_t *o);
|
||||||
|
cell_t *getobpilelocation(obpile_t *op);
|
||||||
|
char *getobname(object_t *o, char *buf, int count);
|
||||||
|
char *getshardobname(enum MATERIAL mid, char *buf);
|
||||||
|
char *getshopobname(object_t *o, char *buf, int count);
|
||||||
|
char *getobnametrue(object_t *o, char *buf, int count);
|
||||||
|
char *real_getobname(object_t *o, char *buf, int count, int wantpremods, int wantcondition, int adjustforblind, int wantblesscurse, int showall);
|
||||||
|
float getobpileweight(obpile_t *op);
|
||||||
|
char *getobconditionname(object_t *o, char *buf);
|
||||||
|
char *getobhurtname(object_t *o, enum DAMTYPE damtype);
|
||||||
|
float getobweight(object_t *o);
|
||||||
|
float getobunitweight(object_t *o);
|
||||||
|
objecttype_t *getoppositestairs(objecttype_t *ot);
|
||||||
|
char *real_getrandomob(map_t *map, char *buf, int forcedepth, int forcehabitat, enum LFSIZE maxsize, enum SKILL wepsk, int forpickup, ... );
|
||||||
|
char *getrandomob(map_t *map, char *buf);
|
||||||
|
char *getrandomobofsize(map_t *map, char *buf, enum LFSIZE maxsize);
|
||||||
|
char *getrandomobwithdt(map_t *map, enum DAMTYPE damtype, char *buf);
|
||||||
|
char *getrandomobwithclass(map_t *map, enum OBCLASS cid, char *buf, int depthmod);
|
||||||
|
enum OBCLASS getrandomobclass(enum HABITAT hab);
|
||||||
|
int getobrarity(object_t *o, enum RARITY *rr);
|
||||||
|
enum SPELLSCHOOL getschool(enum OBTYPE sid);
|
||||||
|
char *getschoolname(enum SPELLSCHOOL sch);
|
||||||
|
char *getschoolnameshort(enum SPELLSCHOOL sch);
|
||||||
|
int getshatterdam(object_t *o);
|
||||||
|
float getshopprice(object_t *o, lifeform_t *buyer, object_t *shop);
|
||||||
|
int getstairdirection(object_t *o);
|
||||||
|
enum SKILLLEVEL gettechlevel(enum OBTYPE oid);
|
||||||
|
int getthrowdam(object_t *o);
|
||||||
|
char *gettopobname(cell_t *c, char *retbuf);
|
||||||
|
enum BODYPART getweildloc(object_t *o, enum BODYPART *otherloc, int *twohanded);
|
||||||
|
int hasedibleob(obpile_t *op);
|
||||||
|
object_t *hasequippedobid(obpile_t *op, enum OBTYPE oid);
|
||||||
|
object_t *hasknownob(obpile_t *op, enum OBTYPE oid);
|
||||||
|
object_t *hasob(obpile_t *op, enum OBTYPE oid);
|
||||||
|
object_t *hasobletter(obpile_t *op, char letter);
|
||||||
|
object_t *hasobofclass(obpile_t *op, enum OBCLASS cid);
|
||||||
|
object_t *hasobofmaterial(obpile_t *op, enum MATERIAL mid);
|
||||||
|
int hasobmod(object_t *o, obmod_t *om);
|
||||||
|
object_t *hasobmulti(obpile_t *op, enum OBTYPE *oid, int noids);
|
||||||
|
object_t *hasobwithflag(obpile_t *op, enum FLAG flagid);
|
||||||
|
object_t *hasobwithflagval(obpile_t *op, enum FLAG flagid, int val0, int val1, int val2, char *text);
|
||||||
|
object_t *hasobid(obpile_t *op, long id);
|
||||||
|
object_t *hassecretdoor(obpile_t *op);
|
||||||
|
void identify(object_t *o);
|
||||||
|
void ignite(object_t *o);
|
||||||
|
flag_t *isarmour(object_t *o);
|
||||||
|
int isactivated(object_t *o);
|
||||||
|
int isammofor(objecttype_t *ammo, object_t *gun);
|
||||||
|
int isbadfood(object_t *o);
|
||||||
|
int isunknownbadobject(object_t *o);
|
||||||
|
int isbetterarmourthan(object_t *a, object_t *b);
|
||||||
|
int isbetterwepthan(object_t *a, object_t *b, lifeform_t *owner);
|
||||||
|
int isblessed(object_t *o);
|
||||||
|
int isblessknown(object_t *o);
|
||||||
|
int iscorpse(object_t *o);
|
||||||
|
int iscursed(object_t *o);
|
||||||
|
int isdamaged(object_t *o);
|
||||||
|
int isdangerousob(object_t *o, lifeform_t *lf, int onlyifknown);
|
||||||
|
int isdeadob(object_t *o);
|
||||||
|
int isdrinkable(object_t *o);
|
||||||
|
int isedible(object_t *o);
|
||||||
|
flag_t *isequipped(object_t *o);
|
||||||
|
int isequippedon(object_t *o, enum BODYPART bp);
|
||||||
|
int isfirearm(object_t *o);
|
||||||
|
int isflammable(object_t *o);
|
||||||
|
int isfullycharged(object_t *o);
|
||||||
|
int isheatable(object_t *o);
|
||||||
|
int isknown(object_t *o);
|
||||||
|
int isknownot(objecttype_t *ot);
|
||||||
|
int isheavyweapon(object_t *o);
|
||||||
|
int isidentified(object_t *o);
|
||||||
|
int isimpassableob(object_t *o, lifeform_t *lf, enum LFSIZE forcesize);
|
||||||
|
int ismagicalobtype(objecttype_t *ot);
|
||||||
|
int ismagical(object_t *o);
|
||||||
|
int ismeleeweapon(object_t *o);
|
||||||
|
int ismetal(enum MATERIAL mat);
|
||||||
|
int isthrowmissile(object_t *o);
|
||||||
|
int isoperable(object_t *o);
|
||||||
|
int isplainob(object_t *o);
|
||||||
|
int ispourable(object_t *o);
|
||||||
|
int ispushable(object_t *o);
|
||||||
|
int israwmeat(object_t *o);
|
||||||
|
int isreadable(object_t *o);
|
||||||
|
int isrotting(object_t *o);
|
||||||
|
flag_t *issecretdoor(object_t *o);
|
||||||
|
flag_t *isshield(object_t *o);
|
||||||
|
int issmellableob(object_t *o);
|
||||||
|
int isthrownmissile(object_t *o);
|
||||||
|
knowledge_t *istried(object_t *o);
|
||||||
|
knowledge_t *istriedot(objecttype_t *ot);
|
||||||
|
int isweapon(object_t *o);
|
||||||
|
int iswearable(object_t *o);
|
||||||
|
void killallobs(obpile_t *op);
|
||||||
|
int killallobsexcept(obpile_t *op, ...);
|
||||||
|
void killbrand(brand_t *b);
|
||||||
|
void killhiddenname(hiddenname_t *hn);
|
||||||
|
void killknowledge(knowledge_t *k);
|
||||||
|
void killmaterial(material_t *m);
|
||||||
|
void killob(object_t *o);
|
||||||
|
void killobmod(obmod_t *om);
|
||||||
|
void killobpile(obpile_t *o);
|
||||||
|
int killobsofid(obpile_t *op, enum OBTYPE oid, int includecontainers);
|
||||||
|
int killobswithflag(obpile_t *op, enum FLAG fid, int includecontainers);
|
||||||
|
void killobtype(object_t *o);
|
||||||
|
void killoc(objectclass_t *oc);
|
||||||
|
void killot(objecttype_t *ot);
|
||||||
|
int knockbackob(object_t *o, int dir, int howfar, int power, lifeform_t *pusher);
|
||||||
|
lifeform_t *makeanimated(lifeform_t *lf, object_t *o, int level);
|
||||||
|
int makeduller(object_t *o, int howmuch);
|
||||||
|
void makehot(object_t *o, int howmuch, int howlong);
|
||||||
|
void makeknown(enum OBTYPE otid);
|
||||||
|
void maketried(enum OBTYPE otid, char *triedon);
|
||||||
|
void makewet(object_t *o, int amt);
|
||||||
|
void modifybetterwepdam(object_t *o, lifeform_t *owner, int *dam);
|
||||||
|
object_t *moveob(object_t *src, obpile_t *dst, int howmany);
|
||||||
|
object_t *real_moveob(object_t *src, obpile_t *dst, int howmany, int stackok);
|
||||||
|
void modbonus(object_t *o, int amt);
|
||||||
|
//object_t *newobeffects(object_t *o);
|
||||||
|
void obaction(object_t *o, char *text);
|
||||||
|
object_t *obexists(enum OBTYPE obid);
|
||||||
|
void obdie(object_t *o);
|
||||||
|
int obfits(object_t *o, obpile_t *op);
|
||||||
|
enum DAMTYPE oblastdamtype(object_t *o);
|
||||||
|
int brandappliesto(brand_t *om, objecttype_t *ot);
|
||||||
|
int obmatchescondition(object_t *o, long opts);
|
||||||
|
int obproduceslight(object_t *o);
|
||||||
|
int obpropsmatch(object_t *a, object_t *b);
|
||||||
|
int obotpropsmatch(object_t *a, objecttype_t *b);
|
||||||
|
flag_t *obrestrictsmovement(object_t *o, lifeform_t *lf);
|
||||||
|
int obsfallthrough(cell_t *c, object_t *pit);
|
||||||
|
int operate(lifeform_t *lf, object_t *o, cell_t *where);
|
||||||
|
enum RARITY pickrr(int whatfor);
|
||||||
|
int pilehasletter(obpile_t *op, char let);
|
||||||
|
void potioneffects(lifeform_t *lf, enum OBTYPE oid, object_t *o, enum BLESSTYPE potlessed, int *seen);
|
||||||
|
int pour(lifeform_t *lf, object_t *o);
|
||||||
|
void quaff(lifeform_t *lf, object_t *o);
|
||||||
|
int readsomething(lifeform_t *lf, object_t *o);
|
||||||
|
int removedeadobs(obpile_t *op);
|
||||||
|
int removeob(object_t *o, int howmany);
|
||||||
|
object_t *relinkob(object_t *src, obpile_t *dst);
|
||||||
|
void resizeobject(object_t *o, enum LFSIZE wantsize);
|
||||||
|
void rrtorarity(enum RARITY r, int *minr, int *maxr);
|
||||||
|
void setblessed(object_t *o, enum BLESSTYPE wantbless);
|
||||||
|
int sethiddenname(objecttype_t *o, char *text);
|
||||||
|
void setinscription(object_t *o, char *text);
|
||||||
|
void setobcreatedby(object_t *o, lifeform_t *lf);
|
||||||
|
void setwaterdepth(cell_t *c, int depth);
|
||||||
|
int shatter(object_t *o, int hitlf, char *damstring, lifeform_t *fromlf);
|
||||||
|
void shufflehiddennames(void);
|
||||||
|
int sizetonutrition(enum LFSIZE size);
|
||||||
|
object_t *splitob(object_t *o);
|
||||||
|
int takedamage(object_t *o, int howmuch, int damtype);
|
||||||
|
int real_takedamage(object_t *o, int howmuch, int damtype, int wantannounce);
|
||||||
|
int fireat(lifeform_t *thrower, object_t *o, int amt, cell_t *where, int speed, object_t *firearm);
|
||||||
|
int real_fireat(lifeform_t *thrower, object_t *o, int amt, cell_t *where, int speed, object_t *firearm, int announcethrow);
|
||||||
|
void timeeffectsob(object_t *o);
|
||||||
|
int touch_battle_spoils(object_t *o);
|
||||||
|
void trapeffects(object_t *trapob, enum OBTYPE oid, cell_t *c);
|
||||||
|
void turnoff(lifeform_t *lf, object_t *o);
|
||||||
|
void turnon(lifeform_t *lf, object_t *o);
|
||||||
|
int uncurseob(object_t *o, int *seen);
|
||||||
|
int usecharge(object_t *o);
|
||||||
|
int usecharges(object_t *o, int amt);
|
||||||
|
int usefountaincharge(object_t *o, flag_t *drinkflag);
|
||||||
|
int validatehiddennames(void);
|
||||||
|
int validateobs(void);
|
||||||
|
int wepdullable(object_t *o);
|
||||||
|
int cancrush(lifeform_t *lf, object_t *o);
|
||||||
|
int willshatter(enum MATERIAL mat);
|
||||||
|
#endif
|
||||||
|
|
|
@ -0,0 +1,37 @@
|
||||||
|
#define uint unsigned int
|
||||||
|
#define cchar const char
|
||||||
|
#define OutFile "/tmp/MemLeakInfo.txt" // Just Suppose
|
||||||
|
#define MAX_FILENAME_LENGTH 256
|
||||||
|
#define calloc(objs, nSize) MyCalloc (objs, nSize, __FILE__, __LINE__)
|
||||||
|
#define malloc(nSize) MyMalloc (nSize, __FILE__, __LINE__)
|
||||||
|
#define DOMALLOC(nSize) MyMalloc (sizeof(nSize), __FILE__, __LINE__)
|
||||||
|
#define free(rMem) MyFree(rMem)
|
||||||
|
|
||||||
|
// This structure is keeping info about memory leak
|
||||||
|
struct InfoMem
|
||||||
|
{
|
||||||
|
void *addr;
|
||||||
|
uint nSize;
|
||||||
|
char fileName[MAX_FILENAME_LENGTH];
|
||||||
|
uint lineNumber;
|
||||||
|
};
|
||||||
|
typedef struct InfoMem infoMem;
|
||||||
|
|
||||||
|
//This is link list of InfoMem which keeps a List of memory Leak in a source file
|
||||||
|
struct LeakMem
|
||||||
|
{
|
||||||
|
infoMem memData;
|
||||||
|
struct LeakMem *nxt;
|
||||||
|
};
|
||||||
|
typedef struct LeakMem leakMem;
|
||||||
|
|
||||||
|
void WriteMemLeak(void);
|
||||||
|
void SubAddMemInfo(void *rMem, uint nSize, cchar *file, uint lno);
|
||||||
|
void SubAdd(infoMem alloc_info);
|
||||||
|
|
||||||
|
void ResetInfo(uint pos); //erase
|
||||||
|
void DeleteAll(void); //clear(void);
|
||||||
|
void *MyMalloc(uint size, cchar *file, uint line);
|
||||||
|
void *MyCalloc(uint elements, uint size, cchar * file, uint lno);
|
||||||
|
void MyFree(void * mem_ref);
|
||||||
|
|
Loading…
Reference in New Issue