X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Finit.c;h=9af442484ca33df0fbcc39d9dda7ea3c3627a2df;hb=681721dddc91bcdaef50002d1e861cc8d484e938;hp=3b6072741385769f6a1af70943a85d1e2f046a27;hpb=2ae6ae8ed951e87fcba7c363705cd6ddea8de91c;p=rocksndiamonds.git diff --git a/src/init.c b/src/init.c index 3b607274..9af44248 100644 --- a/src/init.c +++ b/src/init.c @@ -1,7 +1,7 @@ /*********************************************************** * Rocks'n'Diamonds -- McDuffin Strikes Back! * *----------------------------------------------------------* -* (c) 1995-2000 Artsoft Entertainment * +* (c) 1995-2001 Artsoft Entertainment * * Holger Schemel * * Detmolder Strasse 189 * * 33604 Bielefeld * @@ -11,8 +11,6 @@ * init.c * ***********************************************************/ -#include - #include "libgame/libgame.h" #include "init.h" @@ -31,7 +29,6 @@ static void InitPlayerInfo(void); static void InitLevelInfo(void); static void InitNetworkServer(void); static void InitSound(void); -static void InitSoundServer(void); static void InitGfx(void); static void InitGfxBackground(void); static void InitGadgets(void); @@ -58,16 +55,15 @@ void OpenAll(void) InitCounter(); InitSound(); - InitSoundServer(); InitJoysticks(); InitRND(NEW_RANDOMIZE); - InitEventFilter(FilterMouseMotionEvents); - InitVideoDisplay(); InitVideoBuffer(&backbuffer, &window, WIN_XSIZE, WIN_YSIZE, DEFAULT_DEPTH, setup.fullscreen); + InitEventFilter(FilterMouseMotionEvents); + InitGfx(); InitElementProperties(); /* initializes IS_CHAR() for el2gfx() */ @@ -132,13 +128,11 @@ void InitSound() { int i; - OpenAudio(&audio); - - AllocSoundArray(NUM_SOUNDS); + OpenAudio(); for(i=0; i=0; i++) { @@ -485,6 +449,7 @@ void InitGfx() src_x, src_y, TILEX, TILEY, 0, 0); } } +#endif /* TARGET_X11_NATIVE */ #endif /* TARGET_X11 */ } @@ -1670,17 +1635,10 @@ void CloseAllAndExit(int exit_value) StopSounds(); FreeSounds(NUM_SOUNDS); - -#if !defined(TARGET_SDL) - if (audio.soundserver_pid) - kill(audio.soundserver_pid, SIGTERM); -#endif + CloseAudio(); for(i=0; i