diff options
author | Kahrl <kahrl@gmx.net> | 2012-03-13 18:56:12 +0100 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2012-03-15 21:45:44 +0200 |
commit | 807a0d313ba667356ee8af8ef5ae82b6c4881d15 (patch) | |
tree | c4674e1c193cfcf8359c788ed5894d3cc1849648 /src/tile.h | |
parent | f9a66c5d46b225d0ddbbad939232348bc5ebf959 (diff) | |
download | dragonfireclient-807a0d313ba667356ee8af8ef5ae82b6c4881d15.tar.xz |
MapBlockMesh, mesh animation system, urgent mesh updates, athmospheric light, removed footprints
Diffstat (limited to 'src/tile.h')
-rw-r--r-- | src/tile.h | 22 |
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 |