New Empire table game, to be used for global stuff:

(gamestr, EF_GAME, game_ca): New.
(empfile): Declare the table.
(ef_open_srv, ef_close_srv): Open and close it.
(main): Create it.
(empobj_storage): New member game.

(EF_DYNMAX): New.
(EF_IS_GAME_STATE): Use it.
This commit is contained in:
Markus Armbruster 2007-07-14 14:49:58 +00:00
parent 4ba4cd98c6
commit 654335c621
9 changed files with 68 additions and 1 deletions

View file

@ -47,6 +47,7 @@
#endif
#include "file.h"
#include "game.h"
#include "land.h"
#include "misc.h"
#include "nat.h"
@ -82,6 +83,7 @@ main(int argc, char *argv[])
char buf[255];
char *filename;
int x, y;
struct gamestr *game;
struct natstr nat;
struct realmstr realm;
struct sctstr sct;
@ -143,6 +145,10 @@ main(int argc, char *argv[])
exit(1);
}
}
game = getgamep();
memset(game, 0, sizeof(*game));
game->ef_type = EF_GAME;
putgame();
memset(&nat, 0, sizeof(nat));
nat.ef_type = EF_NATION;
strcpy(nat.nat_cnam, "POGO");