_________ __                 __
        /   _____//  |_____________ _/  |______     ____  __ __  ______
        \_____  \\   __\_  __ \__  \\   __\__  \   / ___\|  |  \/  ___/
        /        \|  |  |  | \// __ \|  |  / __ \_/ /_/  >  |  /\___ \
       /_______  /|__|  |__|  (____  /__| (____  /\___  /|____//____  >
               \/                  \/          \//_____/            \/
    ______________________                           ______________________
                          T H E   W A R   B E G I N S
                   Stratagus - A free fantasy real time strategy game engine

savegame.cpp File Reference
#include "stratagus.h"
#include "game.h"
#include "actions.h"
#include "ai.h"
#include "iocompat.h"
#include "iolib.h"
#include "map.h"
#include "missile.h"
#include "parameters.h"
#include "player.h"
#include "replay.h"
#include "spells.h"
#include "trigger.h"
#include "ui.h"
#include "unit.h"
#include "unit_manager.h"
#include "unittype.h"
#include "upgrade.h"
#include "version.h"
#include <time.h>

Functions

savegame.cpp - Save game.
void StartMap (const std::string &filename, bool clean)
 
void ExpandPath (std::string &newpath, const std::string &path)
 
static std::string GetSaveDir ()
 
int SaveGame (const std::string &filename)
 Load saved game. More...
 
void DeleteSaveGame (const std::string &filename)
 Save game. More...
 
void StartSavedGame (const std::string &filename)
 

Function Documentation

◆ DeleteSaveGame()

void DeleteSaveGame ( const std::string &  filename)

Save game.

Delete save game

Parameters
filenameName of file to delete

◆ ExpandPath()

void ExpandPath ( std::string &  newpath,
const std::string &  path 
)

◆ GetSaveDir()

static std::string GetSaveDir ( )
static

Get the save directory and create dirs if needed

◆ SaveGame()

int SaveGame ( const std::string &  filename)

Load saved game.

Save a game to file.

Parameters
filenameFile name to be stored.
Returns
-1 if saving failed, 0 if all OK
Note
Later we want to store in a more compact binary format.

◆ StartMap()

void StartMap ( const std::string &  filename,
bool  clean 
)

◆ StartSavedGame()

void StartSavedGame ( const std::string &  filename)
(C) Copyright 1998-2012 by The Stratagus Project under the GNU General Public License.
All trademarks and copyrights on this page are owned by their respective owners.