OpenTTD Source
1.11.0-beta2
|
#include "../stdafx.h"
#include "../gfx_func.h"
#include "../network/network.h"
#include "../network/network_internal.h"
#include "../console_func.h"
#include "../genworld.h"
#include "../fileio_type.h"
#include "../fios.h"
#include "../blitter/factory.hpp"
#include "../company_func.h"
#include "../core/random_func.hpp"
#include "../saveload/saveload.h"
#include "../thread.h"
#include "../window_func.h"
#include "dedicated_v.h"
#include "../safeguards.h"
Go to the source code of this file.
Functions | |
bool | SafeLoad (const std::string &filename, SaveLoadOperation fop, DetailedFileType dft, GameMode newgm, Subdirectory subdir, struct LoadFilter *lf=nullptr) |
Load the specified savegame but on error do different things. More... | |
static bool | InputWaiting () |
static void | DedicatedHandleKeyInput () |
Variables | |
static void * | _dedicated_video_mem |
bool | _dedicated_forks |
static FVideoDriver_Dedicated | iFVideoDriver_Dedicated |
Dedicated server video 'driver'.
Definition in file dedicated_v.cpp.
bool SafeLoad | ( | const std::string & | filename, |
SaveLoadOperation | fop, | ||
DetailedFileType | dft, | ||
GameMode | newgm, | ||
Subdirectory | subdir, | ||
struct LoadFilter * | lf = nullptr |
||
) |
Load the specified savegame but on error do different things.
If loading fails due to corrupt savegame, bad version, etc. go back to a previous correct state. In the menu for example load the intro game again.
filename | file to be loaded |
fop | mode of loading, always SLO_LOAD |
newgm | switch to this mode of loading fails due to some unknown error |
subdir | default directory to look for filename, set to 0 if not needed |
lf | Load filter to use, if nullptr: use filename + subdir. |
Definition at line 968 of file openttd.cpp.
References DFT_GAME_FILE, DFT_OLD_GAME_FILE, and SLO_LOAD.