]> git.pond.sub.org Git - empserver/commitdiff
(empobj_chr): New, create a new (imcomplete) structure for
authorRon Koenderink <rkoenderink@yahoo.ca>
Fri, 18 Aug 2006 23:32:45 +0000 (23:32 +0000)
committerRon Koenderink <rkoenderink@yahoo.ca>
Fri, 18 Aug 2006 23:32:45 +0000 (23:32 +0000)
empobj characteristics.
(get_empobj_chr):  Update get_empobj_chr() to use new
struct empobj_chr.

include/empobj.h
src/lib/common/empobj.c

index a7b2e947ce78e2e011b86279b71c41a14e8f6a5e..19184a6569bf6799f0811379e2ac3a94f01e8c87 100644 (file)
@@ -84,10 +84,12 @@ union empobj_storage {
     struct trtstr treaty;
 };
 
     struct trtstr treaty;
 };
 
+struct empobj_chr;
+
 extern char *obj_nameof(struct empobj *gp);
 extern struct empobj *get_empobjp(int type, int id);
 extern int put_empobj(struct empobj *gp);
 extern char *obj_nameof(struct empobj *gp);
 extern struct empobj *get_empobjp(int type, int id);
 extern int put_empobj(struct empobj *gp);
-extern void *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 int get_empobj_mob_max(int type);
 
 extern char *emp_obj_chr_name(struct empobj *gp);
 extern int get_empobj_mob_max(int type);
 
index 214310646671878e7654cd8839216b1a9c939f04..b53c330b56162b3a23eeeb1b06a47c3ef7344b5d 100644 (file)
@@ -81,20 +81,20 @@ put_empobj(struct empobj *gp)
     }
 }
 
     }
 }
 
-void *
+struct empobj_chr *
 get_empobj_chr(struct empobj *gp)
 {
     switch (gp->ef_type) {
     case EF_LAND:
 get_empobj_chr(struct empobj *gp)
 {
     switch (gp->ef_type) {
     case EF_LAND:
-       return &lchr[(int)gp->type];
+       return (struct empobj_chr *)&lchr[(int)gp->type];
     case EF_SHIP:
     case EF_SHIP:
-       return &mchr[(int)gp->type];
+       return (struct empobj_chr *)&mchr[(int)gp->type];
     case EF_PLANE:
     case EF_PLANE:
-       return &plchr[(int)gp->type];
+       return (struct empobj_chr *)&plchr[(int)gp->type];
     case EF_NUKE:
     case EF_NUKE:
-       return &nchr[(int)gp->type];
+       return (struct empobj_chr *)&nchr[(int)gp->type];
     case EF_SECTOR:
     case EF_SECTOR:
-       return &dchr[(int)gp->type];
+       return (struct empobj_chr *)&dchr[(int)gp->type];
     }
     CANT_REACH();
     return NULL;
     }
     CANT_REACH();
     return NULL;