(empobj_chr): New, create a new (imcomplete) structure for

empobj characteristics.
(get_empobj_chr):  Update get_empobj_chr() to use new
struct empobj_chr.
This commit is contained in:
Ron Koenderink 2006-08-18 23:32:45 +00:00
parent a9a9957a27
commit ebf588b713
2 changed files with 9 additions and 7 deletions

View 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:
return &lchr[(int)gp->type];
return (struct empobj_chr *)&lchr[(int)gp->type];
case EF_SHIP:
return &mchr[(int)gp->type];
return (struct empobj_chr *)&mchr[(int)gp->type];
case EF_PLANE:
return &plchr[(int)gp->type];
return (struct empobj_chr *)&plchr[(int)gp->type];
case EF_NUKE:
return &nchr[(int)gp->type];
return (struct empobj_chr *)&nchr[(int)gp->type];
case EF_SECTOR:
return &dchr[(int)gp->type];
return (struct empobj_chr *)&dchr[(int)gp->type];
}
CANT_REACH();
return NULL;