rnd-20020402-1-src
[rocksndiamonds.git] / src / init.c
index 2ddbbcd5769c56c30cadc67d8092fc3fefb3f9f2..fe585257360fc68d0dc3785be8dbf0f4761013b4 100644 (file)
@@ -23,6 +23,8 @@
 #include "files.h"
 #include "network.h"
 #include "netserv.h"
+#include "cartoons.h"
+#include "config.h"
 
 static char *image_filename[NUM_PICTURES] =
 {
@@ -38,13 +40,13 @@ static char *image_filename[NUM_PICTURES] =
   "RocksFont3.pcx"
 }; 
 
-static void InitPlayerInfo(void);
 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);
-static void InitCustomGraphics(void);
 static void InitGfxBackground(void);
 static void InitGadgets(void);
 static void InitElementProperties(void);
@@ -62,7 +64,7 @@ void OpenAll(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);
@@ -81,15 +83,16 @@ void OpenAll(void)
 
   InitEventFilter(FilterMouseMotionEvents);
 
+  InitArtworkInfo();
   InitGfx();
   InitElementProperties();     /* initializes IS_CHAR() for el2gfx() */
 
   InitLevelInfo();
   InitGadgets();               /* needs to know number of level series */
 
-  InitCustomGraphics();
-
   InitGfxBackground();
+  InitToons();
+
   DrawMainMenu();
 
   InitNetworkServer();
@@ -120,6 +123,11 @@ void InitLevelInfo()
   LoadLevelSetup_SeriesInfo();                 /* last played level info */
 }
 
+void InitArtworkInfo()
+{
+  LoadArtworkInfo();
+}
+
 void InitNetworkServer()
 {
 #if defined(PLATFORM_UNIX)
@@ -339,49 +347,6 @@ void InitGfx()
   InitTileClipmasks();
 }
 
-void LoadCustomGraphics()
-{
-#if 0
-  int i;
-
-  for(i=0; i<NUM_PICTURES; i++)
-  {
-    Bitmap *new_pic = 
-    pix_custom[i] = LoadImage(image_filename[i]);
-  }
-#endif
-}
-
-void InitCustomGraphics()
-{
-#if 0
-  static char *filename = NULL;
-
-  /* look for optional directory ~/.<program>/graphics */
-  filename = getPath2(getUserDataDir(), GRAPHICS_DIRECTORY);
-  if (access(dir, F_OK) == 0)
-  {
-  }
-
-
-
-
-(leveldir_current->user_defined ?
-                      getUserLevelDir("") :
-                      options.level_directory),
-                     leveldir_current->fullpath,
-                     basename);
-
-
-
-  filename = getPath3((leveldir_current->user_defined ?
-                      getUserLevelDir("") :
-                      options.level_directory),
-                     leveldir_current->fullpath,
-                     basename);
-#endif
-}
-
 void InitGfxBackground()
 {
   int x, y;