char *picturemask_filename;
};
+#ifndef USE_SDL_LIBRARY
static int sound_process_id = 0;
+#endif
static void InitLevelAndPlayerInfo(void);
static void InitNetworkServer(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);
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))
#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");
*/
#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<NUM_SOUNDS; i++)
if (sound_status == SOUND_OFF)
return;
-#ifdef USE_SDL_LIBRARY
- return;
-#endif
+#ifndef USE_SDL_LIBRARY
-#ifndef MSDOS
+#if !defined(MSDOS) && !defined(WIN32)
if (pipe(sound_pipe)<0)
{
else /* we are parent */
close(sound_pipe[0]); /* no reading from pipe needed */
-#else /* MSDOS */
+#else /* MSDOS || WIN32 */
SoundServer();
#endif /* MSDOS */
+
+#endif /* !USE_SDL_LIBRARY */
}
void InitJoysticks()
{
int i;
+#ifdef USE_SDL_LIBRARY
+ StopSounds();
+ FreeSounds(NUM_SOUNDS);
+#else
if (sound_process_id)
{
StopSounds();
kill(sound_process_id, SIGTERM);
FreeSounds(NUM_SOUNDS);
}
+#endif
for(i=0; i<NUM_BITMAPS; i++)
{