#include "network.h"
#include "netserv.h"
#include "cartoons.h"
+#include "config.h"
static char *image_filename[NUM_PICTURES] =
{
static void InitSetup(void);
static void InitPlayerInfo(void);
static void InitLevelInfo(void);
+static void InitArtworkInfo(void);
static void InitNetworkServer(void);
static void InitSound(void);
static void InitGfx(void);
}
InitProgramInfo(UNIX_USERDATA_DIRECTORY,
- PROGRAM_TITLE_STRING, WINDOW_TITLE_STRING,
+ PROGRAM_TITLE_STRING, getWindowTitleString(),
ICON_TITLE_STRING, X11_ICON_FILENAME, X11_ICONMASK_FILENAME,
MSDOS_POINTER_FILENAME,
COOKIE_PREFIX, FILENAME_PREFIX, GAME_VERSION_ACTUAL);
InitSetup();
InitPlayerInfo();
+ InitArtworkInfo(); /* needed before loading gfx, sound & music */
InitCounter();
InitSound();
LoadLevelSetup_SeriesInfo(); /* last played level info */
}
+void InitArtworkInfo()
+{
+ LoadArtworkInfo();
+}
+
void InitNetworkServer()
{
#if defined(PLATFORM_UNIX)
redraw_mask = REDRAW_ALL;
}
+void ReloadCustomArtwork()
+{
+ if (artwork.graphics_set_current != artwork.gfx_current->name)
+ {
+ int i;
+
+ for(i=0; i<NUM_PICTURES; i++)
+ ReloadCustomImage(&pix[i], image_filename[i]);
+
+ InitGfxBackground();
+ SetDoorState(DOOR_OPEN_1 | DOOR_CLOSE_2);
+
+ artwork.graphics_set_current = artwork.gfx_current->name;
+ }
+
+ if (artwork.sounds_set_current != artwork.snd_current->name)
+ {
+ printf("reload sounds ...\n");
+
+ artwork.sounds_set_current = artwork.snd_current->name;
+ }
+
+ if (artwork.music_set_current != artwork.mus_current->name)
+ {
+ printf("reload music ...\n");
+
+ artwork.music_set_current = artwork.mus_current->name;
+ }
+}
+
void InitGadgets()
{
CreateLevelEditorGadgets();