src/video/dedicated_v.cpp
changeset 7425 350b9265b7a2
parent 7374 54c06f06ecc8
child 7433 8e410e7ec0d7
equal deleted inserted replaced
7424:f1cc2b39a2aa 7425:350b9265b7a2
    11 #include "../network/network.h"
    11 #include "../network/network.h"
    12 #include "../window.h"
    12 #include "../window.h"
    13 #include "../console.h"
    13 #include "../console.h"
    14 #include "../variables.h"
    14 #include "../variables.h"
    15 #include "../genworld.h"
    15 #include "../genworld.h"
       
    16 #include "../fileio.h"
    16 #include "../blitter/blitter.hpp"
    17 #include "../blitter/blitter.hpp"
    17 #include "dedicated_v.h"
    18 #include "dedicated_v.h"
    18 
    19 
    19 #ifdef BEOS_NET_SERVER
    20 #ifdef BEOS_NET_SERVER
    20 #include <net/socket.h>
    21 #include <net/socket.h>
   113 #endif
   114 #endif
   114 
   115 
   115 
   116 
   116 static void *_dedicated_video_mem;
   117 static void *_dedicated_video_mem;
   117 
   118 
   118 extern bool SafeSaveOrLoad(const char *filename, int mode, int newgm);
   119 extern bool SafeSaveOrLoad(const char *filename, int mode, int newgm, Subdirectory subdir);
   119 extern void SwitchMode(int new_mode);
   120 extern void SwitchMode(int new_mode);
   120 
   121 
   121 
   122 
   122 static const char *DedicatedVideoStart(const char * const *parm)
   123 static const char *DedicatedVideoStart(const char * const *parm)
   123 {
   124 {
   258 		_switch_mode = SM_NONE;
   259 		_switch_mode = SM_NONE;
   259 	} else {
   260 	} else {
   260 		_switch_mode = SM_NONE;
   261 		_switch_mode = SM_NONE;
   261 		/* First we need to test if the savegame can be loaded, else we will end up playing the
   262 		/* First we need to test if the savegame can be loaded, else we will end up playing the
   262 		 *  intro game... */
   263 		 *  intro game... */
   263 		if (!SafeSaveOrLoad(_file_to_saveload.name, _file_to_saveload.mode, GM_NORMAL)) {
   264 		if (!SafeSaveOrLoad(_file_to_saveload.name, _file_to_saveload.mode, GM_NORMAL, BASE_DIR)) {
   264 			/* Loading failed, pop out.. */
   265 			/* Loading failed, pop out.. */
   265 			DEBUG(net, 0, "Loading requested map failed, aborting");
   266 			DEBUG(net, 0, "Loading requested map failed, aborting");
   266 			_networking = false;
   267 			_networking = false;
   267 		} else {
   268 		} else {
   268 			/* We can load this game, so go ahead */
   269 			/* We can load this game, so go ahead */