Define common get/put macros for empobj

This turns existing functions get_empobjp() and put_empobj() into
equivalent macros.
This commit is contained in:
Markus Armbruster 2008-02-23 08:03:35 +01:00
parent 5b7a6af94e
commit 9a1fef87fe
2 changed files with 4 additions and 14 deletions

View file

@ -89,9 +89,11 @@ union empobj_storage {
struct empobj_chr;
#define get_empobj(type, n, p) ef_read((type), (n), (p))
#define put_empobj(type, n, p) ef_write((type), (n), (p))
#define get_empobjp(type, n) ((struct empobj *)ef_ptr((type), (n)))
extern char *obj_nameof(struct empobj *gp);
extern struct empobj *get_empobjp(int type, int id);
extern int put_empobj(int, int, struct empobj *gp);
extern struct empobj_chr *get_empobj_chr(struct empobj *gp);
extern char *emp_obj_chr_name(struct empobj *gp);
extern int get_empobj_mob_max(int type);