}
}
+#if 1
+ /* now set all undefined/invalid graphics to -1 to set to default after it */
+ for (i=0; i<MAX_NUM_ELEMENTS; i++)
+ {
+ for (act=0; act<NUM_ACTIONS; act++)
+ {
+ if (graphic_info[element_info[i].graphic[act]].bitmap == NULL)
+ element_info[i].graphic[act] = -1;
+
+ if (graphic_info[element_info[i].crumbled[act]].bitmap == NULL)
+ element_info[i].crumbled[act] = -1;
+
+ for (dir=0; dir<NUM_DIRECTIONS; dir++)
+ {
+ int graphic;
+
+ graphic = element_info[i].direction_graphic[act][dir];
+ if (graphic_info[graphic].bitmap == NULL)
+ element_info[i].direction_graphic[act][dir] = -1;
+
+ graphic = element_info[i].direction_crumbled[act][dir];
+ if (graphic_info[graphic].bitmap == NULL)
+ element_info[i].direction_crumbled[act][dir] = -1;
+ }
+ }
+ }
+#endif
+
/* now set all '-1' values to element specific default values */
for (i=0; i<MAX_NUM_ELEMENTS; i++)
{
for (act=0; act<NUM_ACTIONS; act++)
{
- boolean act_remove = (act == ACTION_DIGGING ||
- act == ACTION_SNAPPING ||
- act == ACTION_COLLECTING);
+ boolean act_remove = ((IS_DIGGABLE(i) && act == ACTION_DIGGING) ||
+ (IS_SNAPPABLE(i) && act == ACTION_SNAPPING) ||
+ (IS_COLLECTIBLE(i) && act == ACTION_COLLECTING));
/* generic default action graphic (defined by "[default]" directive) */
int default_action_graphic = element_info[EL_DEFAULT].graphic[act];
if (special >= 0 && special < NUM_SPECIAL_GFX_ARGS)
element_info[element].special_graphic[special] = graphic;
}
+
+#if 1
+ /* now set all undefined/invalid graphics to default */
+ for (i=0; i < MAX_NUM_ELEMENTS; i++)
+ for (j=0; j < NUM_SPECIAL_GFX_ARGS; j++)
+ if (graphic_info[element_info[i].special_graphic[j]].bitmap == NULL)
+ element_info[i].special_graphic[j] =
+ element_info[i].graphic[ACTION_DEFAULT];
+#endif
}
static int get_element_from_token(char *token)
int first_frame, last_frame;
#if 0
- printf("::: image: '%s'\n", image->token);
+ printf("::: image: '%s' [%d]\n", image->token, i);
#endif
#if 0
EL_PLAYER_2,
EL_PLAYER_3,
EL_PLAYER_4,
+ EL_SP_MURPHY,
-1
};
char *setup_artwork_set = SETUP_ARTWORK_SET(setup, type);
char *leveldir_identifier = leveldir_current->identifier;
#if 1
+ /* !!! setLevelArtworkDir() should be moved to an earlier stage !!! */
char *leveldir_artwork_set = setLevelArtworkDir(artwork_first_node);
#else
char *leveldir_artwork_set = LEVELDIR_ARTWORK_SET(leveldir_current, type);
InitEventFilter(FilterMouseMotionEvents);
InitElementPropertiesStatic();
+ InitElementPropertiesEngine(GAME_VERSION_ACTUAL);
InitGfx();