-#define COMPILE_DATE_STRING "[2002-09-21 23:08]"
+#define COMPILE_DATE_STRING "[2002-09-22 02:29]"
i++;
}
#else
+
i = 0;
while (element_to_graphic[i].element > -1)
{
i++;
}
+
#endif
}
if (value != NULL)
file_list[i].parameter[j] = atoi(value);
+
+ free(token);
}
}
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 */
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))
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 */
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))
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 */
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))
/* 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[] =
/* 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
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];
}
{
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];
}