(EF_IS_GAME_STATE): New.

(xdump, main): Use it.

(EF_MAX): Change to largest table ID + 1.  This is now possible
because the changes above get rid of the assumption that
empfile[0..EF_MAX-1] is only game state.  Code can now work on any
table using the advertized empfile interface, not just on game state.
(my_ef_byname): Remove, use ef_byname().
This commit is contained in:
Markus Armbruster 2005-10-28 07:03:31 +00:00
parent 0f6c4296b1
commit 01c248cb59
3 changed files with 26 additions and 33 deletions

View file

@ -123,6 +123,8 @@ main(int argc, char *argv[])
exit(1);
}
for (i = 0; i < EF_MAX; i++) {
if (!EF_IS_GAME_STATE(i))
continue;
if (!ef_open(i, EFF_CREATE)) {
perror("ef_open");
exit(1);
@ -180,6 +182,8 @@ main(int argc, char *argv[])
ef_write(EF_BMAP, i, map);
}
for (i = 0; i < EF_MAX; i++) {
if (!EF_IS_GAME_STATE(i))
continue;
ef_close(i);
}