#ifndef __OBJECTS_H #define __OBJECTS_H #include "defs.h" knowledge_t *addknowledge(enum OBCLASS id, char *hiddenname, int known); material_t *addmaterial(enum MATERIAL id, char *name); objectclass_t *addoc(enum OBCLASS id, char *name, char *desc, char glyph); object_t *addob(obpile_t *where, char *name); object_t *addobject(obpile_t *where, char *name, int canstack); obpile_t *addobpile(lifeform_t *owner, cell_t *where); objecttype_t *addot(int id, char *name, char *description, int material, float weight, int obclassid); object_t *canstackob(obpile_t *op, object_t *match); object_t *canstacknewot(obpile_t *op, objecttype_t *match); void copyobprops(object_t *dst, object_t *src); int countnames(char **list); int countobs(obpile_t *op); material_t *findmaterial(int id); objectclass_t *findoc(int id); object_t *findobl(obpile_t *op, char let); // find object by letter objecttype_t *findot(enum OBTYPE id); objecttype_t *findotn(char *name); // find objecttype by name void genhiddennames(void); char *getdamname(enum DAMTYPE damtype); char getglyph(object_t *o); char *genhiddenname(enum OBCLASS id); char *gethiddenname(object_t *o); int getobattackspeed(object_t *o); int getletindex(char let); char getnextletter(obpile_t *op, char *wantletter); char *getobname(object_t *o, char *buf, int count); char *getrandomob(map_t *map, char *buf); char *getrandomobwithdt(map_t *map, enum DAMTYPE damtype, char *buf); object_t *hasknownob(obpile_t *op, enum OBTYPE oid); object_t *hasob(obpile_t *op, enum OBTYPE oid); object_t *hasobid(obpile_t *op, int id); void initobjects(void); int isdrinkable(object_t *o); int isknown(object_t *o); int isplainob(object_t *o); int isreadable(object_t *o); void killmaterial(material_t *m); void killob(object_t *o); void killoc(objectclass_t *oc); void killot(objecttype_t *ot); void makeknown(enum OBTYPE otid); object_t *moveob(object_t *src, obpile_t *dst, int howmany); object_t *obexists(enum OBTYPE obid); int obfits(object_t *o, obpile_t *op); int obpropsmatch(object_t *a, object_t *b); int pilehasletter(obpile_t *op, char let); void quaff(lifeform_t *lf, object_t *o); void read(lifeform_t *lf, object_t *o); int removeob(object_t *o, int howmany); object_t *relinkob(object_t *src, obpile_t *dst); void throwat(lifeform_t *thrower, object_t *o, cell_t *where); int willshatter(enum MATERIAL mat); #endif