X-Git-Url: https://plomlompom.com/repos/foo.html?a=blobdiff_plain;ds=inline;f=src%2Fserver%2Fmain.c;h=c8ca499293999f32067b2c5a0afcc54dc34c8526;hb=fa0c416ccad4c4278813909ca1b799cd0600840c;hp=642a6fe5179c4f618d0b4aae7de148eb9177f3f1;hpb=c53b42dfc7e4de104f9189428dd5b9a0d431c00a;p=plomrogue
diff --git a/src/server/main.c b/src/server/main.c
index 642a6fe..c8ca499 100644
--- a/src/server/main.c
+++ b/src/server/main.c
@@ -4,9 +4,8 @@
#include /* exit() */
#include "../common/rexit.h" /* exit_err, set_cleanup_func() */
#include "cleanup.h" /* set_cleanup_flag(), cleanup() */
-#include "init.h" /* run_game(), obey_argv(), obey_argv(), setup_server_io(),
- * init_map_and_map_object_configs()
- */
+#include "hardcoded_strings.h" /* s */
+#include "init.h" /* run_game(), obey_argv(), obey_argv(), setup_server_io() */
#include "world.h" /* struct World */
@@ -21,6 +20,7 @@ int main(int argc, char ** argv)
set_cleanup_func(cleanup);
/* Init settings from command line / hard-coded values. Print start info. */
+ init_strings();
obey_argv(argc, argv);
if (world.is_verbose)
{
@@ -30,22 +30,14 @@ int main(int argc, char ** argv)
if (world.replay)
{
test = printf("Replay mode. Auto-replaying up to turn %d.\n",
- world.replay);
+ world.replay);
exit_err(-1 == test, printf_err);
}
}
- world.path_config = "confserver/world";
- world.path_worldstate = "server/worldstate";
- world.path_out = "server/out";
- world.path_in = "server/in";
- world.path_record = "record";
- world.tmp_suffix = "_tmp";
-
- /* Init map, map object configurations and server i/o files. */
- init_map_and_map_objects_configs();
- setup_server_io();
+ world.map.length = 64; /* Just a sane default value. */
- /* Enter play or replay mode loops, then leave properly. */
+ /* Init server i/o, Enter play or replay mode loops, then leave properly. */
+ setup_server_io();
run_game();
cleanup();
exit(EXIT_SUCCESS);