1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-12 16:58:39 +00:00

Move TileAnimation code to seperate file

This commit is contained in:
sfan5 2016-12-23 13:48:32 +01:00
parent e2e8da5ee4
commit 523f0e8c5b
10 changed files with 168 additions and 48 deletions

View file

@ -34,6 +34,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "itemgroup.h"
#include "sound.h" // SimpleSoundSpec
#include "constants.h" // BS
#include "tileanimation.h"
class INodeDefManager;
class IItemDefManager;
@ -161,22 +162,14 @@ enum NodeDrawType
/*
Stand-alone definition of a TileSpec (basically a server-side TileSpec)
*/
enum TileAnimationType{
TAT_NONE=0,
TAT_VERTICAL_FRAMES=1,
};
struct TileDef
{
std::string name;
bool backface_culling; // Takes effect only in special cases
bool tileable_horizontal;
bool tileable_vertical;
struct{
enum TileAnimationType type;
int aspect_w; // width for aspect ratio
int aspect_h; // height for aspect ratio
float length; // seconds
} animation;
struct TileAnimationParams animation;
TileDef()
{
@ -185,9 +178,6 @@ struct TileDef
tileable_horizontal = true;
tileable_vertical = true;
animation.type = TAT_NONE;
animation.aspect_w = 1;
animation.aspect_h = 1;
animation.length = 1.0;
}
void serialize(std::ostream &os, u16 protocol_version) const;