summaryrefslogtreecommitdiff
path: root/src/tile.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/tile.h')
-rw-r--r--src/tile.h22
1 files changed, 20 insertions, 2 deletions
diff --git a/src/tile.h b/src/tile.h
index c0d8914b0..698ce3dcf 100644
--- a/src/tile.h
+++ b/src/tile.h
@@ -73,7 +73,7 @@ struct AtlasPointer
{
}
- bool operator==(const AtlasPointer &other)
+ bool operator==(const AtlasPointer &other) const
{
return (
id == other.id
@@ -87,6 +87,11 @@ struct AtlasPointer
);*/
}
+ bool operator!=(const AtlasPointer &other) const
+ {
+ return !(*this == other);
+ }
+
float x0(){ return pos.X; }
float x1(){ return pos.X + size.X; }
float y0(){ return pos.Y; }
@@ -110,6 +115,8 @@ public:
{return AtlasPointer(0);}
virtual video::ITexture* getTextureRaw(const std::string &name)
{return NULL;}
+ virtual AtlasPointer getTextureRawAP(const AtlasPointer &ap)
+ {return AtlasPointer(0);}
virtual IrrlichtDevice* getDevice()
{return NULL;}
virtual void updateAP(AtlasPointer &ap){};
@@ -148,7 +155,13 @@ enum MaterialType{
};
// Material flags
+// Should backface culling be enabled?
#define MATERIAL_FLAG_BACKFACE_CULLING 0x01
+// Should a crack be drawn?
+#define MATERIAL_FLAG_CRACK 0x02
+// Should the crack be drawn on transparent pixels (unset) or not (set)?
+// Ignored if MATERIAL_FLAG_CRACK is not set.
+#define MATERIAL_FLAG_CRACK_OVERLAY 0x04
/*
This fully defines the looks of a tile.
@@ -169,7 +182,7 @@ struct TileSpec
{
}
- bool operator==(TileSpec &other)
+ bool operator==(const TileSpec &other) const
{
return (
texture == other.texture &&
@@ -178,6 +191,11 @@ struct TileSpec
material_flags == other.material_flags
);
}
+
+ bool operator!=(const TileSpec &other) const
+ {
+ return !(*this == other);
+ }
// Sets everything else except the texture in the material
void applyMaterialOptions(video::SMaterial &material) const