nexus/objects.h

59 lines
2.3 KiB
C
Raw Normal View History

2010-12-02 12:17:54 +11:00
#ifndef __OBJECTS_H
#define __OBJECTS_H
#include "defs.h"
2010-12-07 18:34:26 +11:00
knowledge_t *addknowledge(enum OBCLASS id, char *hiddenname, int known);
2010-12-02 12:17:54 +11:00
material_t *addmaterial(enum MATERIAL id, char *name);
2010-12-07 18:34:26 +11:00
objectclass_t *addoc(enum OBCLASS id, char *name, char *desc, char glyph);
2010-12-02 12:17:54 +11:00
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);
2010-12-07 18:34:26 +11:00
int countnames(char **list);
2010-12-02 12:17:54 +11:00
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
2010-12-07 18:34:26 +11:00
objecttype_t *findot(enum OBTYPE id);
2010-12-02 12:17:54 +11:00
objecttype_t *findotn(char *name); // find objecttype by name
2010-12-07 18:34:26 +11:00
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);
2010-12-02 12:17:54 +11:00
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);
2010-12-07 18:34:26 +11:00
char *getrandomobwithdt(map_t *map, enum DAMTYPE damtype, char *buf);
object_t *hasknownob(obpile_t *op, enum OBTYPE oid);
2010-12-02 12:17:54 +11:00
object_t *hasob(obpile_t *op, enum OBTYPE oid);
2010-12-07 18:34:26 +11:00
object_t *hasobid(obpile_t *op, int id);
2010-12-02 12:17:54 +11:00
void initobjects(void);
2010-12-07 18:34:26 +11:00
int isdrinkable(object_t *o);
int isknown(object_t *o);
2010-12-02 12:17:54 +11:00
int isplainob(object_t *o);
2010-12-07 18:34:26 +11:00
int isreadable(object_t *o);
2010-12-02 12:17:54 +11:00
void killmaterial(material_t *m);
void killob(object_t *o);
void killoc(objectclass_t *oc);
void killot(objecttype_t *ot);
2010-12-07 18:34:26 +11:00
void makeknown(enum OBTYPE otid);
2010-12-02 12:17:54 +11:00
object_t *moveob(object_t *src, obpile_t *dst, int howmany);
2010-12-07 18:34:26 +11:00
object_t *obexists(enum OBTYPE obid);
2010-12-02 12:17:54 +11:00
int obfits(object_t *o, obpile_t *op);
int obpropsmatch(object_t *a, object_t *b);
int pilehasletter(obpile_t *op, char let);
2010-12-07 18:34:26 +11:00
void quaff(lifeform_t *lf, object_t *o);
void read(lifeform_t *lf, object_t *o);
int removeob(object_t *o, int howmany);
2010-12-02 12:17:54 +11:00
object_t *relinkob(object_t *src, obpile_t *dst);
void throwat(lifeform_t *thrower, object_t *o, cell_t *where);
2010-12-07 18:34:26 +11:00
int willshatter(enum MATERIAL mat);
2010-12-02 12:17:54 +11:00
#endif
2010-12-07 18:34:26 +11:00