/* !!! now done in InitElementPropertiesStatic() (see above) !!! */
/* !!! (else properties set there will be overwritten here) !!! */
/* start with no properties at all */
+#if 1
+ for (j = 0; j < NUM_EP_BITFIELDS; j++)
+ ei->properties[j] = EP_BITMASK_DEFAULT;
+#else
for (j = 0; j < NUM_EP_BITFIELDS; j++)
Properties[element][j] = EP_BITMASK_DEFAULT;
+#endif
#endif
/* now set default properties */
static void ActivateLevelTemplate()
{
+#if 1
+ /* Currently there is no special action needed to activate the template
+ data, because 'element_info' property settings overwrite the original
+ level data, while all other variables do not change. */
+#else
/* Currently there is no special action needed to activate the template
data, because 'element_info' and 'Properties' overwrite the original
level data, while all other variables do not change. */
+#endif
}
static char *getLevelFilenameFromBasename(char *basename)
int element = getFile16BitBE(file);
int properties = getFile32BitBE(file);
+#if 1
+ if (IS_CUSTOM_ELEMENT(element))
+ element_info[element].properties[EP_BITFIELD_BASE] = properties;
+ else
+ Error(ERR_WARN, "invalid custom element number %d", element);
+#else
if (IS_CUSTOM_ELEMENT(element))
Properties[element][EP_BITFIELD_BASE] = properties;
else
Error(ERR_WARN, "invalid custom element number %d", element);
+#endif
}
return chunk_size;
ei->description[j] = getFile8Bit(file);
ei->description[MAX_ELEMENT_NAME_LEN] = 0;
+#if 1
+ ei->properties[EP_BITFIELD_BASE] = getFile32BitBE(file);
+#else
Properties[element][EP_BITFIELD_BASE] = getFile32BitBE(file);
+#endif
/* some free bytes for future properties and padding */
ReadUnusedBytesFromFile(file, 7);
ei->description[i] = getFile8Bit(file);
ei->description[MAX_ELEMENT_NAME_LEN] = 0;
+#if 1
+ ei->properties[EP_BITFIELD_BASE] = getFile32BitBE(file);
+#else
Properties[element][EP_BITFIELD_BASE] = getFile32BitBE(file);
+#endif
ReadUnusedBytesFromFile(file, 4); /* reserved for more base properties */
ei->num_change_pages = getFile8Bit(file);
if (leveldir_current == NULL) /* only when dumping level */
return;
+ /* all engine modifications also valid for levels which use latest engine */
+#if 1
+ if (level->game_version < VERSION_IDENT(3,2,0,5))
+ {
+ /* time bonus score was given for 10 s instead of 1 s before 3.2.0-5 */
+ level->score[SC_TIME_BONUS] /= 10;
+ }
+#endif
+
if (leveldir_current->latest_engine)
{
/* ---------- use latest game engine ----------------------------------- */
/* extra time score was same value as time left score before 3.2.0-5 */
level->extra_time_score = level->score[SC_TIME_BONUS];
+#if 0
/* time bonus score was given for 10 s instead of 1 s before 3.2.0-5 */
level->score[SC_TIME_BONUS] /= 10;
+#endif
}
/* only few elements were able to actively move into acid before 3.1.0 */
{
int element = EL_CUSTOM_START + i;
+#if 1
+ struct ElementInfo *ei = &element_info[element];
+
+ if (ei->properties[EP_BITFIELD_BASE] != EP_BITMASK_DEFAULT)
+ {
+ if (check < num_changed_custom_elements)
+ {
+ putFile16BitBE(file, element);
+ putFile32BitBE(file, ei->properties[EP_BITFIELD_BASE]);
+ }
+
+ check++;
+ }
+#else
if (Properties[element][EP_BITFIELD_BASE] != EP_BITMASK_DEFAULT)
{
if (check < num_changed_custom_elements)
check++;
}
+#endif
}
if (check != num_changed_custom_elements) /* should not happen */
for (j = 0; j < MAX_ELEMENT_NAME_LEN; j++)
putFile8Bit(file, ei->description[j]);
+#if 1
+ putFile32BitBE(file, ei->properties[EP_BITFIELD_BASE]);
+#else
putFile32BitBE(file, Properties[element][EP_BITFIELD_BASE]);
+#endif
/* some free bytes for future properties and padding */
WriteUnusedBytesToFile(file, 7);
for (i = 0; i < MAX_ELEMENT_NAME_LEN; i++)
putFile8Bit(file, ei->description[i]);
+#if 1
+ putFile32BitBE(file, ei->properties[EP_BITFIELD_BASE]);
+#else
putFile32BitBE(file, Properties[element][EP_BITFIELD_BASE]);
+#endif
WriteUnusedBytesToFile(file, 4); /* reserved for more base properties */
putFile8Bit(file, ei->num_change_pages);