+ {
+ if (direction < 0)
+ for (dir=0; dir<NUM_DIRECTIONS; dir++)
+ element_info[element].direction_graphic[action][dir] = -1;
+
+ if (direction > -1)
+ element_info[element].direction_graphic[action][direction] = graphic;
+ else
+ element_info[element].graphic[action] = graphic;
+ }
+ }
+
+ /* now copy all graphics that are defined to be cloned from other graphics */
+ for (i=0; i<MAX_NUM_ELEMENTS; i++)
+ {
+ int graphic = element_info[i].graphic[ACTION_DEFAULT];
+ int crumbled_like, diggable_like;
+
+ if (graphic == -1)
+ continue;
+
+ crumbled_like = graphic_info[graphic].crumbled_like;
+ diggable_like = graphic_info[graphic].diggable_like;
+
+ if (crumbled_like != -1 && element_info[i].crumbled[ACTION_DEFAULT] == -1)
+ {
+ for (act=0; act<NUM_ACTIONS; act++)
+ element_info[i].crumbled[act] =
+ element_info[crumbled_like].crumbled[act];
+ for (act=0; act<NUM_ACTIONS; act++)
+ for (dir=0; dir<NUM_DIRECTIONS; dir++)
+ element_info[i].direction_crumbled[act][dir] =
+ element_info[crumbled_like].direction_crumbled[act][dir];
+ }
+
+ if (diggable_like != -1 && element_info[i].graphic[ACTION_DIGGING] == -1)
+ {
+ element_info[i].graphic[ACTION_DIGGING] =
+ element_info[diggable_like].graphic[ACTION_DIGGING];
+ for (dir=0; dir<NUM_DIRECTIONS; dir++)
+ element_info[i].direction_graphic[ACTION_DIGGING][dir] =
+ element_info[diggable_like].direction_graphic[ACTION_DIGGING][dir];
+ }