Comments.
This commit is contained in:
parent
889dfebaad
commit
62c80be94c
1 changed files with 19 additions and 17 deletions
|
@ -25,10 +25,10 @@
|
||||||
*
|
*
|
||||||
* ---
|
* ---
|
||||||
*
|
*
|
||||||
* file.h: Describes Empire files and their contents
|
* file.h: Describes Empire tables (`files' for historical reasons)
|
||||||
*
|
*
|
||||||
* Known contributors to this file:
|
* Known contributors to this file:
|
||||||
*
|
* Markus Armbruster, 2005
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _FILE_H_
|
#ifndef _FILE_H_
|
||||||
|
@ -39,27 +39,29 @@
|
||||||
struct empfile {
|
struct empfile {
|
||||||
int ef_uid; /* Table ID */
|
int ef_uid; /* Table ID */
|
||||||
char *name; /* Empire name (e.g., "treaty") */
|
char *name; /* Empire name (e.g., "treaty") */
|
||||||
char *file; /* file name (relative to data directory) */
|
char *file; /* if backed by file, file name relative to
|
||||||
int flags; /* misc stuff */
|
data directory */
|
||||||
int size; /* size of object */
|
int flags; /* EFF_XY, ... */
|
||||||
void (*init) (int, char *); /* call this when object is created */
|
int size; /* size of a table entry */
|
||||||
int (*postread) (int, char *); /* specific massage routines for items */
|
void (*init)(int, char *); /* called after entry creation, unless null */
|
||||||
int (*prewrite) (int, char *);
|
int (*postread)(int, char *); /* called after read, unless null */
|
||||||
|
int (*prewrite)(int, char *); /* called before write, unless null */
|
||||||
int fd; /* file descriptor, -1 if not open */
|
int fd; /* file descriptor, -1 if not open */
|
||||||
int baseid; /* starting item in cache */
|
int baseid; /* id of first entry in cache */
|
||||||
int cids; /* # ids in cache */
|
int cids; /* # entries in cache */
|
||||||
int csize; /* size of cache in bytes */
|
int csize; /* cache size, in entries */
|
||||||
char *cache; /* pointer to cache */
|
char *cache; /* pointer to cache */
|
||||||
int fids; /* # of ids in file */
|
int fids; /* # entries in table */
|
||||||
struct castr *cadef; /* ca defs selection list */
|
struct castr *cadef; /* table column selectors (column meta-data) */
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* struct empfile flags
|
* struct empfile flags
|
||||||
*
|
*/
|
||||||
|
/*
|
||||||
* EFF_XY / EFF_OWNER / EFF_GROUP assert that coordinates / owner /
|
* EFF_XY / EFF_OWNER / EFF_GROUP assert that coordinates / owner /
|
||||||
* group of such a file's record can be safely obtained by
|
* group of such a table's entries can be safely obtained by
|
||||||
* dereferencing its memory address cast to struct genitem *.
|
* dereferencing entry address cast to struct genitem *.
|
||||||
*/
|
*/
|
||||||
#define EFF_XY bit(0)
|
#define EFF_XY bit(0)
|
||||||
#define EFF_OWNER bit(1)
|
#define EFF_OWNER bit(1)
|
||||||
|
@ -103,7 +105,7 @@ struct empfile {
|
||||||
#define EF_COMM 13
|
#define EF_COMM 13
|
||||||
#define EF_LOST 14
|
#define EF_LOST 14
|
||||||
#define EF_MAX 15
|
#define EF_MAX 15
|
||||||
/* Static game data (configuation): EF_MAX.. */
|
/* Static game data (configuration): EF_MAX.. */
|
||||||
#define EF_SECTOR_CHR 15
|
#define EF_SECTOR_CHR 15
|
||||||
#define EF_SHIP_CHR 16
|
#define EF_SHIP_CHR 16
|
||||||
#define EF_PLANE_CHR 17
|
#define EF_PLANE_CHR 17
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue