Add object masks.
--- a/ThemeFiles.wiki Sun Dec 07 16:05:59 2014 +0000
+++ b/ThemeFiles.wiki Sun Dec 07 16:21:00 2014 +0000
@@ -54,7 +54,19 @@
By default this is `Data/Graphics/Dust.png`.
=== Objects ===
-Objects are single images of any size, they will be “attached” to the landscape and so become part of the landscape themselves. They can have any name as long as it is not any of the other names on this page. Objects have to be configured in `theme.cfg`.
+Objects are single images of any size, they will be “attached” to the landscape and so become part of the landscape themselves. The name has to follow the following rules:
+ * It must have the suffix “`.png`”
+ * It must not end with “`_mask.png`”
+ * It must not be equal with any other file name mentioned on this page
+
+Objects have to be configured in `theme.cfg`.
+
+=== Object masks ===
+Object masks are images which are applied to objects. They determine the terrain type of the pixels of an object. The image has to be of the same dimensions of the object in question. The masks work like `mask.png` of image maps, see [PresetMaps#mask.png].
+
+The name of an object mask file has to follow the pattern “`<object name>_mask.png`”, where “`<object name>`” is the file name of the object the mask is applied to, minus the suffix. For example, the mask of `cheese.png` would be `cheese_mask.png`. (See the Cheese theme in `Data/Themes/Cheese` in the Hedgewars installation directory for an example.)
+
+If an object mask is not provided, the object in question can be destroyed but will, unlike the main terrain, not leave the terrain background texture behind.
=== Sprays ===
Sprays are single images of any size, they will be drawn onto the land texture (by `LandTex.png`). They can have any name as long as it is not any of the other names on this page. Sprays have to be configured in `theme.cfg`.