OpenTTD
Functions | Variables
dedicated_v.cpp File Reference

Dedicated server video 'driver'. More...

#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 "dedicated_v.h"
#include "../safeguards.h"

Go to the source code of this file.

Functions

bool SafeLoad (const char *filename, SaveLoadOperation fop, DetailedFileType dft, GameMode newgm, Subdirectory subdir, struct LoadFilter *lf=NULL)
 Load the specified savegame but on error do different things.
static bool InputWaiting ()
static uint32 GetTime ()
static void DedicatedHandleKeyInput ()

Variables

static void * _dedicated_video_mem
bool _dedicated_forks
static FVideoDriver_Dedicated iFVideoDriver_Dedicated

Detailed Description

Dedicated server video 'driver'.

Definition in file dedicated_v.cpp.

Function Documentation

bool SafeLoad ( const char *  filename,
SaveLoadOperation  fop,
DetailedFileType  dft,
GameMode  newgm,
Subdirectory  subdir,
struct LoadFilter lf = NULL 
)

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.

Parameters
modemode of loading, either SL_LOAD or SL_OLD_LOAD
newgmswitch to this mode of loading fails due to some unknown error
filenamefile to be loaded
subdirdefault directory to look for filename, set to 0 if not needed
lfLoad filter to use, if NULL: use filename + subdir.

Definition at line 1001 of file openttd.cpp.

References _network_dedicated, _network_server, DEBUG, DFT_GAME_FILE, DFT_OLD_GAME_FILE, LoadIntroGame(), LoadWithFilter(), NetworkDisconnect(), SaveOrLoad(), SL_OK, SL_REINIT, and SLO_LOAD.