(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:
parent
a9a9957a27
commit
ebf588b713
2 changed files with 9 additions and 7 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue