mirror of
https://github.com/minetest/minetest.git
synced 2025-07-01 07:30:23 +02:00
MapBlockMesh, mesh animation system, urgent mesh updates, athmospheric light, removed footprints
This commit is contained in:
22
src/tile.h
22
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
|
||||
|
Reference in New Issue
Block a user