home · contact · privacy
Load last world state from save file, not from re-stepping record file.
[plomrogue] / src / server / init.h
1 /* src/server/init.h
2  *
3  * Server, world and game state initialization.
4  */
5
6 #ifndef INIT_H
7 #define INIT_H
8
9 #include <stdint.h> /* uint32_t */
10
11
12
13 /* Parses command line arguments -v and -s into server configuration. */
14 extern void obey_argv(int argc, char * argv[]);
15
16 /* Start server in file and out file, latter with server process test string. */
17 extern void setup_server_io();
18
19 /* Dissolves old game world if it exists, generates a new one from world.seed.
20  * Unlinks any pre-existing record file.
21  *
22  * Thing (action) definitions read in from server config directory are not
23  * affected. The map is populated accordingly. world.last_update_turn is set to
24  * 0 and world.turn to 1, so that io_round()'s criteria for updating the output
25  * file are triggered even when this function is called during a round 1.
26  */
27 extern void remake_world();
28
29 /* Create a game world state, then enter play or replay mode.
30  *
31  * If replay mode is called for, try for the record file and follow its commands
32  + up to the turn specified by the user, then enter manual replay. Otherwise,
33  * start into play mode after having either recreated a game world state from
34  * the savefile, or, if none exists, having created a new world with the
35  * MAKE_WORLD command. Manual replay as well as play mode take place inside
36  * io_loop().
37  */
38 extern void run_game();
39
40
41
42 #endif