mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
MapBlockMesh, mesh animation system, urgent mesh updates, athmospheric light, removed footprints
This commit is contained in:
parent
f9a66c5d46
commit
807a0d313b
22 changed files with 1216 additions and 1745 deletions
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue