New way to read configuration tables:
(config_tables): New econfig key. (read_config_tables): New, implements config_tables. (main): Call it. Need to call ef_init() and chdir(configdir) first. (ef_init_srv): Don't call ef_init(), since main() did it already. Remove old way to do the same: (ef_load): Remove, along with calls. (empfile): Set configuration tables' member file back to NULL.
This commit is contained in:
parent
e4865d473e
commit
bd65a84eb5
8 changed files with 68 additions and 43 deletions
|
@ -67,6 +67,8 @@ EMPCFBOTH((fvname), (vname), int, NSC_INT, KM_OPTION, (descr))
|
|||
/* econfig key definitions: */
|
||||
|
||||
EMPCF_COMMENT("\n### Server configuration and information")
|
||||
EMPCFBOTH("config_tables", config_tables, char *, NSC_STRING, KM_INTERNAL,
|
||||
"Configuration table files, separated by space, relative to econfig's directory")
|
||||
EMPCFBOTH("data", gamedir, char *, NSC_STRING, KM_INTERNAL,
|
||||
"Directory where this game's data is stored")
|
||||
EMPCFBOTH("info", infodir, char *, NSC_STRING, KM_INTERNAL,
|
||||
|
|
|
@ -172,7 +172,6 @@ extern int ef_flags(int);
|
|||
extern int ef_byname(char *);
|
||||
extern int ef_byname_from(char *, int *);
|
||||
extern void ef_init(void);
|
||||
extern int ef_load(void);
|
||||
extern int ef_verify(void);
|
||||
|
||||
extern struct empfile empfile[EF_MAX + 1];
|
||||
|
|
|
@ -283,8 +283,8 @@ extern int check_plane_ok(struct plnstr *);
|
|||
extern int check_comm_ok(struct comstr *);
|
||||
extern int check_loan_ok(struct lonstr *);
|
||||
extern int check_trade_ok(struct trdstr *);
|
||||
/* ef_load.c */
|
||||
/* in file.h */
|
||||
/* conftab.c */
|
||||
extern int read_config_tables(void);
|
||||
/* ef_verify.c */
|
||||
/* in file.h */
|
||||
/* fsize.c */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue