+static void CopyPlayfield(short src[MAX_LEV_FIELDX][MAX_LEV_FIELDY],
+ short dst[MAX_LEV_FIELDX][MAX_LEV_FIELDY])
+{
+ int x, y;
+
+ for(x=0; x<lev_fieldx; x++)
+ for(y=0; y<lev_fieldy; y++)
+ dst[x][y] = src[x][y];
+}
+
+static void CopyCustomElementPropertiesToEditor()
+{
+ int i;
+
+ for (i=0; i < NUM_CUSTOM_ELEMENTS; i++)
+ {
+ int element = EL_CUSTOM_START + i;
+ int properties = Properties1[element];
+
+ custom_element_properties[i].indestructible =
+ ((properties & EP_BIT_INDESTRUCTIBLE) != 0 ? TRUE : FALSE);
+
+ custom_element_properties[i].can_fall =
+ ((properties & EP_BIT_CAN_FALL) != 0 ? TRUE : FALSE);
+
+ custom_element_properties[i].can_smash =
+ ((properties & EP_BIT_CAN_SMASH) != 0 ? TRUE : FALSE);
+
+ custom_element_properties[i].pushable =
+ ((properties & EP_BIT_PUSHABLE) != 0 ? TRUE : FALSE);
+
+ custom_element_properties[i].slippery =
+ ((properties & EP_BIT_SLIPPERY) != 0 ? TRUE : FALSE);
+ }
+}
+
+static void CopyCustomElementPropertiesToGame()
+{
+ int i;
+
+ for (i=0; i < NUM_CUSTOM_ELEMENTS; i++)
+ {
+ int element = EL_CUSTOM_START + i;
+
+ Properties1[element] = EP_BITMASK_DEFAULT;
+
+ if (custom_element_properties[i].indestructible)
+ Properties1[element] |= EP_BIT_INDESTRUCTIBLE;
+ else
+ Properties1[element] &= ~EP_BIT_INDESTRUCTIBLE;
+
+ if (custom_element_properties[i].can_fall)
+ Properties1[element] |= EP_BIT_CAN_FALL;
+ else
+ Properties1[element] &= ~EP_BIT_CAN_FALL;
+
+ if (custom_element_properties[i].can_smash)
+ Properties1[element] |= EP_BIT_CAN_SMASH;
+ else
+ Properties1[element] &= ~EP_BIT_CAN_SMASH;
+
+ if (custom_element_properties[i].pushable)
+ Properties1[element] |= EP_BIT_PUSHABLE;
+ else
+ Properties1[element] &= ~EP_BIT_PUSHABLE;
+
+ if (custom_element_properties[i].slippery)
+ Properties1[element] |= EP_BIT_SLIPPERY;
+ else
+ Properties1[element] &= ~EP_BIT_SLIPPERY;
+ }
+}
+