(empfile, chr_camap): Merge chr_camap[] into empfile[]. No existing
user sees the new elements of empfile[]. (EF_SECTOR_CHR, EF_SHIP_CHR, EF_PLANE_CHR, EF_LAND_CHR, EF_NUKE_CHR) (EF_TREATY_CHR, EF_ITEM, EF_INFRASTRUCTURE, EF_PRODUCT): New. Not yet used. (my_ef_byname): Replacement for ef_byname() that sees the new elements. (xdchr): Work with empfile[] instead of chr_camap[]. (xdump): Use my_ef_byname() instead of ef_byname() and chridx_by_name(). (camap, chr_camap, chridx_by_name): Remove.
This commit is contained in:
parent
224cc6328a
commit
0ab9260151
4 changed files with 88 additions and 51 deletions
|
@ -66,8 +66,18 @@ struct empfile {
|
|||
#define EFF_OWNER bit(2) /* has concept of owner */
|
||||
#define EFF_GROUP bit(3) /* has concept of group */
|
||||
|
||||
/* file types, types 0..EF_MAX-1 are empfile[] indexes */
|
||||
#define EF_BAD -1 /* illegal file type */
|
||||
/*
|
||||
* Empire `file types'
|
||||
* These are really table IDs. Some tables are backed by files, some
|
||||
* are compiled into the server.
|
||||
* Historically, only table IDs 0..EF_MAX-1 existed. All the
|
||||
* functions operating on table IDs still reject the new indexes >=
|
||||
* EF_MAX. This needs to be rectified, carefully checking existing
|
||||
* code, which could rely on unspoken assumptions about these tables.
|
||||
*/
|
||||
/* Error value */
|
||||
#define EF_BAD -1
|
||||
/* Dynamic game data tables: 0..EF_MAX-1 */
|
||||
#define EF_SECTOR 0
|
||||
#define EF_SHIP 1
|
||||
#define EF_PLANE 2
|
||||
|
@ -84,6 +94,19 @@ struct empfile {
|
|||
#define EF_COMM 13
|
||||
#define EF_LOST 14
|
||||
#define EF_MAX 15
|
||||
/* Static game data (configuation): EF_MAX.. */
|
||||
#define EF_SECTOR_CHR 15
|
||||
#define EF_SHIP_CHR 16
|
||||
#define EF_PLANE_CHR 17
|
||||
#define EF_LAND_CHR 18
|
||||
#define EF_NUKE_CHR 19
|
||||
#if 0 /* doesn't exist yet */
|
||||
#define EF_NEWS_CHR
|
||||
#endif
|
||||
#define EF_TREATY_CHR 20
|
||||
#define EF_ITEM 21
|
||||
#define EF_INFRASTRUCTURE 22
|
||||
#define EF_PRODUCT 23
|
||||
|
||||
#define EF_NMAP 222 /* Kinda bogus, but used to describe a newdesmap
|
||||
instead of bmap or map. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue