/* set values to -1 to identify later as "uninitialized" values */
for (i=0; i<MAX_NUM_ELEMENTS; i++)
{
- for (act=0; act<NUM_GFX_ACTIONS_MAPPED; act++)
+ for (act=0; act<NUM_GFX_ACTIONS; act++)
{
element_info[i].graphic[act] = -1;
int action = element_to_graphic[i].action;
int graphic = element_to_graphic[i].graphic;
- if (action > -1)
- action = graphics_action_mapping[action];
- else
+ if (action < 0)
action = GFX_ACTION_DEFAULT;
if (direction > -1)
default_action_direction_graphic[dir] = default_action_graphic;
}
- for (act=0; act<NUM_GFX_ACTIONS_MAPPED; act++)
+ for (act=0; act<NUM_GFX_ACTIONS; act++)
{
for (dir=0; dir<NUM_MV_DIRECTIONS; dir++)
{
struct SetupInfo setup;
struct GameInfo game;
struct GlobalInfo global;
-
-
-/* this is used to reduce memory usage of the different animation types */
-int graphics_action_mapping[] =
-{
- 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_BREAKING (11) */
- 7, /* GFX_ACTION_ACTIVATING (12) */
- 7, /* GFX_ACTION_OPENING (13) */
- 7, /* GFX_ACTION_CLOSING (14) */
- 7, /* GFX_ACTION_EATING (15) */
- 7, /* GFX_ACTION_ATTACKING (16) */
- 7, /* GFX_ACTION_GROWING (17) */
- 7, /* GFX_ACTION_SHRINKING (18) */
- 7 /* GFX_ACTION_OTHER (19) */
-};
-
-struct FileInfo *image_files;
-struct FileInfo *sound_files;
+struct FileInfo *image_files;
+struct FileInfo *sound_files;
struct ElementInfo element_info[MAX_NUM_ELEMENTS] =
{
#define GFX_ACTION_OTHER 19
#define NUM_GFX_ACTIONS 20
-#define NUM_GFX_ACTIONS_MAPPED 8
/* values for image configuration suffixes */
char *editor_description; /* short description for level editor */
/* default graphics for several actions */
- int graphic[NUM_GFX_ACTIONS_MAPPED];
+ int graphic[NUM_GFX_ACTIONS];
/* special graphics for left/right/up/down */
- int direction_graphic[NUM_GFX_ACTIONS_MAPPED][NUM_MV_DIRECTIONS];
+ int direction_graphic[NUM_GFX_ACTIONS][NUM_MV_DIRECTIONS];
};
struct GraphicInfo