X-Git-Url: https://plomlompom.com/repos/?a=blobdiff_plain;f=src%2Fserver%2Fworld.h;h=f6deb103370982693ffae738b54dbc26a0482f88;hb=2906acb0d93705435ce737285ead26fd015e20be;hp=47f7c65cb7670134fdc1c9cd939f44c5cd84746d;hpb=d12efb0addf420adc045cfb96647dff6241310ee;p=plomrogue diff --git a/src/server/world.h b/src/server/world.h index 47f7c65..f6deb10 100644 --- a/src/server/world.h +++ b/src/server/world.h @@ -1,4 +1,8 @@ /* src/server/world.h + * + * This file is part of PlomRogue. PlomRogue is licensed under the GPL version 3 + * or any later version. For details on its copyright, license, and warranties, + * see the file NOTICE in the root directory of the PlomRogue source package. * * Contains the World struct holding all game data together. */ @@ -8,10 +12,10 @@ #include /* uint8_t, uint16_t, uint32_t */ #include /* define FILE */ -#include "map.h" /* struct Map */ -struct MapObjDef; -struct MapObjAct; -struct MapObj; +#include "../common/map.h" /* struct Map */ +struct ThingType; +struct ThingAction; +struct Thing; @@ -19,27 +23,20 @@ struct World { FILE * file_in; /* Input stream on file at .path_in. */ FILE * file_out; /* Output stream on file at .path_out. */ - struct Map map; - struct MapObjDef * map_obj_defs; /* Map object definitions. */ - struct MapObjAct * map_obj_acts; /* Map object action definitions. */ - struct MapObj * map_objs; /* Map objects. */ - char * log; /* Logs the game events from the player's view. */ + struct Map map; /* Game map. */ + struct ThingType * thing_types; /* Thing type definitions. */ + struct ThingAction * thing_actions; /* Thing action definitions. */ + struct Thing * things; /* All physical things of the game world. */ char * server_test; /* String uniquely identifying server process. */ - char * path_in; /* File to write client messages into. */ - char * path_out; /* File to write server messages into. */ - char * path_worldstate; /* File to represent world state to clients.*/ - char * path_record; /* Record file from which to read the game history. */ - char * path_map_obj_defs; /* path for map object definitions config file */ - char * path_map_obj_acts; /* path for map object actions config file */ - char * tmp_suffix; /* Appended to paths of files for their tmp versions. */ char * queue; /* Stores un-processed messages read from the input file. */ - uint32_t queue_size;/* Length of .queue sequence of \0-terminated strings.*/ uint32_t seed; /* Randomness seed. */ + uint32_t seed_map; /* Map seed. */ uint16_t replay; /* Turn up to which to replay game. No replay if zero. */ uint16_t turn; /* Current game turn. */ - uint16_t last_update_turn; /* Last turn the .path_out file was updated. */ + uint8_t do_update; /* Update worldstate file if !0. */ + uint8_t exists; /* If !0, remake_world() has been run successfully. */ + uint8_t player_type; /* Thing type that player will start as. */ uint8_t is_verbose; /* Should server send debugging info to stdout? */ - uint8_t map_obj_count; /* Counts map objects generated so far. */ }; extern struct World world;