1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-02 16:38:41 +00:00

before adding day/night lighting

--HG--
rename : data/light.png => data/cloud.png
This commit is contained in:
Perttu Ahola 2010-12-18 13:10:37 +02:00
parent 385dd9917f
commit 15a43c5ed0
18 changed files with 662 additions and 487 deletions

View file

@ -38,11 +38,61 @@ enum TileID
TILE_MUD,
TILE_TREE_TOP,
TILE_MUD_WITH_GRASS,
TILE_CLOUD,
// Count of tile ids
TILES_COUNT
};
enum TileSpecialFeature
{
TILEFEAT_NONE,
TILEFEAT_CRACK,
};
struct TileCrackParam
{
bool operator==(TileCrackParam &other)
{
return progression == other.progression;
}
u16 progression;
};
struct TileSpec
{
TileSpec()
{
id = TILE_NONE;
feature = TILEFEAT_NONE;
}
bool operator==(TileSpec &other)
{
if(id != other.id)
return false;
if(feature != other.feature)
return false;
if(feature == TILEFEAT_NONE)
return true;
if(feature == TILEFEAT_CRACK)
{
return param.crack == other.param.crack;
}
// Invalid feature
assert(0);
return false;
}
u16 id; // Id in g_tile_materials, TILE_NONE=none
enum TileSpecialFeature feature;
union
{
TileCrackParam crack;
} param;
};
// A mapping from tiles to names of cached textures
extern const char * g_tile_texture_names[TILES_COUNT];