1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-06 17:41:04 +00:00

Use a enum for tile rotation

This commit is contained in:
numzero 2023-03-02 15:26:04 +03:00 committed by sfan5
parent 729671d6ae
commit 1102f92dac
3 changed files with 57 additions and 38 deletions

View file

@ -295,6 +295,19 @@ struct TileLayer
u8 scale = 1;
};
enum class TileRotation: u8 {
None,
R90,
R180,
R270,
FXR90,
FXR270,
FYR90,
FYR270,
FX,
FY,
};
/*!
* Defines a face of a node. May have up to two layers.
*/
@ -305,7 +318,7 @@ struct TileSpec
//! If true, the tile rotation is ignored.
bool world_aligned = false;
//! Tile rotation.
u8 rotation = 0;
TileRotation rotation = TileRotation::None;
//! This much light does the tile emit.
u8 emissive_light = 0;
//! The first is base texture, the second is overlay.