(ef_init): Remove cadef member from fileinit,

insert directly into the empfile structure.
Add ef_type member to fileinit to identify rows with data.
Remove unused rows of fileinit.
This commit is contained in:
Ron Koenderink 2005-10-22 13:55:04 +00:00
parent 29d21997b9
commit cf4faac293
3 changed files with 27 additions and 40 deletions

View file

@ -57,37 +57,37 @@ struct empfile empfile[] = {
/* Dynamic game data */
{"sect", "sector", EFF_XY | EFF_OWNER,
0, sizeof(struct sctstr), NULL, NULL, NULL,
-1, -1, 0, 0, NULL, 0, NULL},
-1, -1, 0, 0, NULL, 0, sect_ca},
{"ship", "ship", EFF_XY | EFF_OWNER | EFF_GROUP,
0, sizeof(struct shpstr), NULL, NULL, NULL,
-1, -1, 0, 0, NULL, 0, NULL},
-1, -1, 0, 0, NULL, 0, ship_ca},
{"plane", "plane", EFF_XY | EFF_OWNER | EFF_GROUP,
0, sizeof(struct plnstr), NULL, NULL, NULL,
-1, -1, 0, 0, NULL, 0, NULL},
-1, -1, 0, 0, NULL, 0, plane_ca},
{"land", "land", EFF_XY | EFF_OWNER | EFF_GROUP,
0, sizeof(struct lndstr), NULL, NULL, NULL,
-1, -1, 0, 0, NULL, 0, NULL},
-1, -1, 0, 0, NULL, 0, land_ca},
{"nuke", "nuke", EFF_XY | EFF_OWNER,
0, sizeof(struct nukstr), NULL, NULL, NULL,
-1, -1, 0, 0, NULL, 0, NULL},
-1, -1, 0, 0, NULL, 0, nuke_ca},
{"news", "news", 0,
0, sizeof(struct nwsstr), NULL, NULL, NULL,
-1, -1, 0, 0, NULL, 0, NULL},
-1, -1, 0, 0, NULL, 0, news_ca},
{"treaty", "treaty", 0,
0, sizeof(struct trtstr), NULL, NULL, NULL,
-1, -1, 0, 0, NULL, 0, NULL},
-1, -1, 0, 0, NULL, 0, treaty_ca},
{"trade", "trade", 0,
0, sizeof(struct trdstr), NULL, NULL, NULL,
-1, -1, 0, 0, NULL, 0, NULL},
-1, -1, 0, 0, NULL, 0, trade_ca},
{"pow", "power", 0,
0, sizeof(struct powstr), NULL, NULL, NULL,
-1, -1, 0, 0, NULL, 0, NULL},
{"nat", "nation", EFF_OWNER,
0, sizeof(struct natstr), NULL, NULL, NULL,
-1, -1, 0, 0, NULL, 0, NULL},
-1, -1, 0, 0, NULL, 0, nat_ca},
{"loan", "loan", 0,
0, sizeof(struct lonstr), NULL, NULL, NULL,
-1, -1, 0, 0, NULL, 0, NULL},
-1, -1, 0, 0, NULL, 0, loan_ca},
{"map", "map", 0,
0, DEF_WORLD_X * DEF_WORLD_Y / 2, NULL, NULL, NULL,
-1, -1, 0, 0, NULL, 0, NULL},
@ -96,10 +96,10 @@ struct empfile empfile[] = {
-1, -1, 0, 0, NULL, 0, NULL},
{"commodity", "commodity", 0,
0, sizeof(struct comstr), NULL, NULL, NULL,
-1, -1, 0, 0, NULL, 0, NULL},
-1, -1, 0, 0, NULL, 0, commodity_ca},
{"lost", "lostitems", EFF_OWNER,
0, sizeof(struct loststr), NULL, NULL, NULL,
-1, -1, 0, 0, NULL, 0, NULL},
-1, -1, 0, 0, NULL, 0, lost_ca},
/* Static game data (configuation) */
{"sect chr", NULL, EFF_MEM,