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

Add 2D sheet animation for nodes

This commit is contained in:
sfan5 2016-12-23 14:43:56 +01:00
parent 7057c196c4
commit a07b032245
8 changed files with 88 additions and 27 deletions

View file

@ -26,6 +26,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
enum TileAnimationType {
TAT_NONE = 0,
TAT_VERTICAL_FRAMES = 1,
TAT_SHEET_2D = 2,
};
struct TileAnimationParams {
@ -38,6 +39,11 @@ struct TileAnimationParams {
int aspect_h; // height for aspect ratio
float length; // seconds
} vertical_frames;
struct {
int frames_w; // number of frames left-to-right
int frames_h; // number of frames top-to-bottom
float frame_length; // seconds
} sheet_2d;
};
void serialize(std::ostream &os, u16 protocol_version) const;