X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Finit.c;h=114f61c01aedfa9e6b610e0fa63e513a6520dc02;hp=64f748019cac0e9050ef5048b0939bb616c9a7c1;hb=74b5b6c19587f93c45b72b1153154030dc99b50d;hpb=9dcf51eadcd8fb8e1ba937b6a8db76096cc09b05 diff --git a/src/init.c b/src/init.c index 64f74801..114f61c0 100644 --- a/src/init.c +++ b/src/init.c @@ -41,7 +41,9 @@ struct IconFileInfo char *picturemask_filename; }; +#ifndef USE_SDL_LIBRARY static int sound_process_id = 0; +#endif static void InitLevelAndPlayerInfo(void); static void InitNetworkServer(void); @@ -56,13 +58,17 @@ static void InitElementProperties(void); void OpenAll(int argc, char *argv[]) { -#ifdef MSDOS +#if defined(MSDOS) || defined(WIN32) initErrorFile(); #endif if (options.serveronly) { +#ifdef WIN32 + Error(ERR_WARN, "networking not supported in Windows version"); +#else NetworkServer(options.server_port, options.serveronly); +#endif /* never reached */ exit(0); @@ -119,14 +125,14 @@ void InitLevelAndPlayerInfo() void InitNetworkServer() { -#ifndef MSDOS +#if !defined(MSDOS) && !defined(WIN32) int nr_wanted; #endif if (!options.network) return; -#ifndef MSDOS +#if !defined(MSDOS) && !defined(WIN32) nr_wanted = Request("Choose player", REQ_PLAYER | REQ_STAY_CLOSED); if (!ConnectToServer(options.server_host, options.server_port)) @@ -172,7 +178,7 @@ void InitSound() #else /* !USE_SDL_LIBRARY */ -#ifndef MSDOS +#if !defined(MSDOS) && !defined(WIN32) if (access(sound_device_name, W_OK) != 0) { Error(ERR_WARN, "cannot access sound device - no sounds"); @@ -198,14 +204,14 @@ void InitSound() */ #endif -#else /* MSDOS */ +#else /* MSDOS || WIN32 */ sound_loops_allowed = TRUE; /* setup.sound_loops_on = TRUE; */ -#endif /* MSDOS */ +#endif /* MSDOS || WIN32 */ #endif /* !USE_SDL_LIBRARY */ for(i=0; i