71 gamedata (
string desc,
string dir,
string time);
121 const char*
location () {
return Location.c_str (); }
128 const char*
gametime () {
return Gametime.c_str (); }
170 static bool init (
string udir,
string gdir,
string gname,
u_int8 qload);
214 static bool load_achievements (
u_int32 pos);
249 static bool save (
u_int32 pos,
string desc,
string time);
274 return user_data_dir_;
285 return game_data_dir_;
319 return data::the_player;
332 return data::characters [name];
344 return data::quests [name];
355 return data::characters;
377 static string game_name;
384 static vector<gamedata*> saves;
390 static string user_data_dir_;
396 static string game_data_dir_;
400 #endif // GAMEDATA_H__ Declares the character class.
static bool save(u_int32 pos, string desc, string time)
Save a game.
Class to write data from a Gzip compressed file.
void set_description(string)
Sets the description for this game.
static void cleanup()
Cleanup the saved game array.
static dictionary< character * > characters()
Returns the characters dictionary.
Class to read data from a Gzip compressed file.
const char * description()
Returns the description of the saved game.
static bool load(u_int32 pos)
Loads a previously saved game.
const char * directory()
A bunch of methods to access the private attributes.
Class holding game characters.
static bool load_characters(u_int32 pos)
Load the characters state from a saved game.
gamedata()
Default constructor.
static bool init(string udir, string gdir, string gname, u_int8 qload)
Initialise the saved games array.
#define u_int32
32 bits long unsigned integer
#define u_int8
8 bits long unsigned integer
Stores objects of any kind.
u_int32 timestamp()
Returns the (real) time when this game has been saved.
static bool load_audio(u_int32 pos)
Load the audio system state from a saved game.
static gamedata * next_save()
Returns a pointer to the next saved game.
const char * location()
Returns the location of the saved game.
Declares the adonthell class.
static string game_data_dir()
Returns the game data directory.
static character * get_character(string name)
Returns a certain NPC when given the name.
static bool load_newest()
Loads the most recent saved game.
static quest * get_quest(string name)
Returns a certain quest when given the name.
static gamedata * get_saved_game(u_int32 pos)
Returns a pointer to a saved game.
static adonthell * engine()
Returns a pointer to the global game engine.
const char * gametime()
Returns the in-game time of the saved game.
static character * player()
Returns the player character.
static bool load_quests(u_int32 pos)
Load the quests state from a saved game.
void set_gametime(string)
Set the in-game time of the saved game.
static void unload()
Unloads the current game, resetting the engine to it's initial state.
void put(ogzstream &)
Save a record to an opened file.
static dictionary< quest * > quests()
Returns the global quests dictionary.
static bool load_mapengine(u_int32 pos)
Load the mapengine state from a saved game.
This is the heart of the Adonthell engine.
static string user_data_dir()
Returns the user data directory ($HOME/.adonthell).
void set_directory(string)
Sets the directory for this game.
Contains all the attributes related to a saved game and the high level methods for loading/saving the...