rnd-20020922-1-src
authorHolger Schemel <info@artsoft.org>
Sun, 22 Sep 2002 00:34:29 +0000 (02:34 +0200)
committerHolger Schemel <info@artsoft.org>
Sat, 30 Aug 2014 08:38:42 +0000 (10:38 +0200)
src/conftime.h
src/init.c
src/libgame/misc.c
src/libgame/setup.c
src/main.c
src/main.h
src/tools.c

index 23b21eca8e2339a8bef0d808ff883141821fd7e5..f0425dde511cef97e56dcfad71857000bf030bcf 100644 (file)
@@ -1 +1 @@
-#define COMPILE_DATE_STRING "[2002-09-21 23:08]"
+#define COMPILE_DATE_STRING "[2002-09-22 02:29]"
index 54a6436e3e7637622cc145134173158f945198fc..97c52c16f701d207e26547c0929884befd6a490f 100644 (file)
@@ -985,6 +985,7 @@ void InitElementInfo()
     i++;
   }
 #else
+
   i = 0;
   while (element_to_graphic[i].element > -1)
   {
@@ -1010,6 +1011,7 @@ void InitElementInfo()
 
     i++;
   }
+
 #endif
 }
 
index f140d4605b1b4e5ffe2d6fd99d1cc6cc5d0e6f14..757872e8647a8c11d35b36238e3579c74fdc99a0 100644 (file)
@@ -1478,6 +1478,8 @@ static void LoadArtworkConfig(struct ArtworkListInfo *artwork_info)
 
        if (value != NULL)
          file_list[i].parameter[j] = atoi(value);
+
+       free(token);
       }
     }
 
index 614bb613cec6cc7185c78f423daca63193f7d89d..aeb115ef7ec9d5eda62550c1221e3a3cac274392 100644 (file)
@@ -462,10 +462,14 @@ char *getCustomImageFilename(char *basename)
     if (fileExists(filename))
       return filename;
 
+    free(filename);
+
     /* 2nd try: look for special artwork in current level series directory */
     filename = getPath3(getCurrentLevelDir(), GRAPHICS_DIRECTORY, basename);
     if (fileExists(filename))
       return filename;
+
+    free(filename);
   }
 
   /* 3rd try: look for special artwork in configured artwork directory */
@@ -473,11 +477,15 @@ char *getCustomImageFilename(char *basename)
   if (fileExists(filename))
     return filename;
 
+  free(filename);
+
   /* 4th try: look for default artwork in new default artwork directory */
   filename = getPath2(getDefaultGraphicsDir(GRAPHICS_SUBDIR), basename);
   if (fileExists(filename))
     return filename;
 
+  free(filename);
+
   /* 5th try: look for default artwork in old default artwork directory */
   filename = getPath2(options.graphics_directory, basename);
   if (fileExists(filename))
@@ -500,10 +508,14 @@ char *getCustomSoundFilename(char *basename)
     if (fileExists(filename))
       return filename;
 
+    free(filename);
+
     /* 2nd try: look for special artwork in current level series directory */
     filename = getPath3(getCurrentLevelDir(), SOUNDS_DIRECTORY, basename);
     if (fileExists(filename))
       return filename;
+
+    free(filename);
   }
 
   /* 3rd try: look for special artwork in configured artwork directory */
@@ -511,11 +523,15 @@ char *getCustomSoundFilename(char *basename)
   if (fileExists(filename))
     return filename;
 
+  free(filename);
+
   /* 4th try: look for default artwork in new default artwork directory */
   filename = getPath2(getDefaultSoundsDir(SOUNDS_SUBDIR), basename);
   if (fileExists(filename))
     return filename;
 
+  free(filename);
+
   /* 5th try: look for default artwork in old default artwork directory */
   filename = getPath2(options.sounds_directory, basename);
   if (fileExists(filename))
@@ -553,10 +569,14 @@ char *getCustomMusicDirectory(void)
     if (fileExists(directory))
       return directory;
 
+    free(directory);
+
     /* 2nd try: look for special artwork in current level series directory */
     directory = getPath2(getCurrentLevelDir(), MUSIC_DIRECTORY);
     if (fileExists(directory))
       return directory;
+
+    free(directory);
   }
 
   /* 3rd try: look for special artwork in configured artwork directory */
@@ -564,11 +584,15 @@ char *getCustomMusicDirectory(void)
   if (fileExists(directory))
     return directory;
 
+  free(directory);
+
   /* 4th try: look for default artwork in new default artwork directory */
   directory = getStringCopy(getDefaultMusicDir(MUSIC_SUBDIR));
   if (fileExists(directory))
     return directory;
 
+  free(directory);
+
   /* 5th try: look for default artwork in old default artwork directory */
   directory = getStringCopy(options.music_directory);
   if (fileExists(directory))
index da3239dfc0b66ed1f21daaecae5e6d1a890ce133..8a6dd77e41a420c67283023e838c7e17ebc6f86d 100644 (file)
@@ -139,25 +139,24 @@ char *sound_name[NUM_SOUNDS] =
 /* this is used to reduce memory usage of the different animation types */
 int graphics_action_mapping[] =
 {
-  0,           /* GFX_ACTION_UNKNOWN           (0)  */
-  0,           /* GFX_ACTION_DEFAULT           (1)  */
-  0,           /* GFX_ACTION_WAITING           (2)  */
-
-  1,           /* GFX_ACTION_FALLING           (3)  */
-  2,           /* GFX_ACTION_MOVING            (4)  */
-  3,           /* GFX_ACTION_DIGGING           (5)  */
-  4,           /* GFX_ACTION_SNAPPING          (6)  */
-  5,           /* GFX_ACTION_COLLECTING        (7)  */
-  6,           /* GFX_ACTION_PUSHING           (8)  */
-
-  7,           /* GFX_ACTION_PASSING           (9)  */
-  7,           /* GFX_ACTION_IMPACT            (10) */
-  7,           /* GFX_ACTION_CRACKING          (11) */
-  7,           /* GFX_ACTION_ACTIVATING        (12) */
-  7,           /* GFX_ACTION_EATING            (13) */
-  7,           /* GFX_ACTION_ATTACKING         (14) */
-  7,           /* GFX_ACTION_GROWING           (15) */
-  7            /* GFX_ACTION_OTHER             (14) */
+  0,           /* GFX_ACTION_DEFAULT           (0)  */
+  0,           /* GFX_ACTION_WAITING           (1)  */
+
+  1,           /* GFX_ACTION_FALLING           (2)  */
+  2,           /* GFX_ACTION_MOVING            (3)  */
+  3,           /* GFX_ACTION_DIGGING           (4)  */
+  4,           /* GFX_ACTION_SNAPPING          (5)  */
+  5,           /* GFX_ACTION_COLLECTING        (6)  */
+  6,           /* GFX_ACTION_PUSHING           (7)  */
+
+  7,           /* GFX_ACTION_PASSING           (8)  */
+  7,           /* GFX_ACTION_IMPACT            (9) */
+  7,           /* GFX_ACTION_CRACKING          (10) */
+  7,           /* GFX_ACTION_ACTIVATING        (11) */
+  7,           /* GFX_ACTION_EATING            (12) */
+  7,           /* GFX_ACTION_ATTACKING         (13) */
+  7,           /* GFX_ACTION_GROWING           (14) */
+  7            /* GFX_ACTION_OTHER             (15) */
 };
 
 struct ConfigInfo image_config_suffix[] =
index edac5c489d6bf4a50c78371a773ae59d5c81b332..08463a8cb83e653a7d2fdebfd419206277a6b618 100644 (file)
 
 
 /* values for animation action types */
-#define GFX_ACTION_UNKNOWN             0
-#define GFX_ACTION_DEFAULT             1
-#define GFX_ACTION_WAITING             2
-#define GFX_ACTION_FALLING             3
-#define GFX_ACTION_MOVING              4
-#define GFX_ACTION_DIGGING             5
-#define GFX_ACTION_SNAPPING            6
-#define GFX_ACTION_COLLECTING          7
-#define GFX_ACTION_PUSHING             8
-#define GFX_ACTION_PASSING             9
-#define GFX_ACTION_IMPACT              10
-#define GFX_ACTION_CRACKING            11
-#define GFX_ACTION_ACTIVATING          12
-#define GFX_ACTION_EATING              13
-#define GFX_ACTION_ATTACKING           14
-#define GFX_ACTION_GROWING             15
-#define GFX_ACTION_OTHER               16
-
-#define NUM_GFX_ACTIONS                        17
+#define GFX_ACTION_DEFAULT             0
+#define GFX_ACTION_WAITING             1
+#define GFX_ACTION_FALLING             2
+#define GFX_ACTION_MOVING              3
+#define GFX_ACTION_DIGGING             4
+#define GFX_ACTION_SNAPPING            5
+#define GFX_ACTION_COLLECTING          6
+#define GFX_ACTION_PUSHING             7
+#define GFX_ACTION_PASSING             8
+#define GFX_ACTION_IMPACT              9
+#define GFX_ACTION_CRACKING            10
+#define GFX_ACTION_ACTIVATING          11
+#define GFX_ACTION_EATING              12
+#define GFX_ACTION_ATTACKING           13
+#define GFX_ACTION_GROWING             14
+#define GFX_ACTION_OTHER               15
+
+#define NUM_GFX_ACTIONS                        16
 #define NUM_GFX_ACTIONS_MAPPED         8
 
 
index 74d003cdbf7b2bdc65d71b8b43024ebc00a3824f..3015b1adad66ea0db1439f7b29fe7815d89de503 100644 (file)
@@ -3369,7 +3369,7 @@ int el_dir2img(int element, int direction)
 
   if (element_info[element].has_direction_graphic[action])
   {
-    int direction = MV_DIR_BIT(direction);
+    direction = MV_DIR_BIT(direction);
 
     return element_info[element].direction_graphic[action][direction];
   }
@@ -3381,7 +3381,7 @@ int el_dir_act2img(int element, int direction, int action)
 {
   if (element_info[element].has_direction_graphic[action])
   {
-    int direction = MV_DIR_BIT(direction);
+    direction = MV_DIR_BIT(direction);
 
     return element_info[element].direction_graphic[action][direction];
   }