Define common get/put macros for empobj
This turns existing functions get_empobjp() and put_empobj() into equivalent macros.
This commit is contained in:
parent
7819ce7fa1
commit
7bbbcc8643
2 changed files with 4 additions and 14 deletions
|
@ -89,9 +89,11 @@ union empobj_storage {
|
||||||
|
|
||||||
struct empobj_chr;
|
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 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 struct empobj_chr *get_empobj_chr(struct empobj *gp);
|
||||||
extern char *emp_obj_chr_name(struct empobj *gp);
|
extern char *emp_obj_chr_name(struct empobj *gp);
|
||||||
extern int get_empobj_mob_max(int type);
|
extern int get_empobj_mob_max(int type);
|
||||||
|
|
|
@ -57,18 +57,6 @@ obj_nameof(struct empobj *gp)
|
||||||
return "The Beast #666";
|
return "The Beast #666";
|
||||||
}
|
}
|
||||||
|
|
||||||
struct empobj *
|
|
||||||
get_empobjp(int type, int id)
|
|
||||||
{
|
|
||||||
return ef_ptr(type, id);
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
|
||||||
put_empobj(int type, int id, struct empobj *gp)
|
|
||||||
{
|
|
||||||
return ef_write(type, id, gp);
|
|
||||||
}
|
|
||||||
|
|
||||||
struct empobj_chr *
|
struct empobj_chr *
|
||||||
get_empobj_chr(struct empobj *gp)
|
get_empobj_chr(struct empobj *gp)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue