- /* map custom element change events that have changed in newer versions
- (these following values have accidentally changed in version 3.0.1) */
- if (level->game_version <= VERSION_IDENT(3,0,0))
- {
- for (i=0; i < NUM_CUSTOM_ELEMENTS; i++)
- {
- int element = EL_CUSTOM_START + i;
-
- /* order of checking events to be mapped is important */
- for (j=CE_BY_OTHER; j >= CE_BY_PLAYER; j--)
- {
- if (HAS_CHANGE_EVENT(element, j - 2))
- {
- SET_CHANGE_EVENT(element, j - 2, FALSE);
- SET_CHANGE_EVENT(element, j, TRUE);
- }
- }
-
- /* order of checking events to be mapped is important */
- for (j=CE_OTHER_GETS_COLLECTED; j >= CE_COLLISION; j--)
- {
- if (HAS_CHANGE_EVENT(element, j - 1))
- {
- SET_CHANGE_EVENT(element, j - 1, FALSE);
- SET_CHANGE_EVENT(element, j, TRUE);
- }
- }
- }
- }
-
- /* initialize "can_change" field for old levels with only one change page */
- if (level->game_version <= VERSION_IDENT(3,0,2))
- {
- for (i=0; i < NUM_CUSTOM_ELEMENTS; i++)
- {
- int element = EL_CUSTOM_START + i;
-
- if (CAN_CHANGE(element))
- element_info[element].change->can_change = TRUE;
- }
- }
-