Minetest  5.4.0
TileAnimationParams Struct Reference

#include <tileanimation.h>

Public Member Functions

void serialize (std::ostream &os, u8 tiledef_version) const
 
void deSerialize (std::istream &is, u8 tiledef_version)
 
void determineParams (v2u32 texture_size, int *frame_count, int *frame_length_ms, v2u32 *frame_size) const
 
void getTextureModifer (std::ostream &os, v2u32 texture_size, int frame) const
 
v2f getTextureCoords (v2u32 texture_size, int frame) const
 

Public Attributes

enum TileAnimationType type
 
union {
   struct {
      int   aspect_w
 
      int   aspect_h
 
      float   length
 
   }   vertical_frames
 
   struct {
      int   frames_w
 
      int   frames_h
 
      float   frame_length
 
   }   sheet_2d
 
}; 
 

Member Function Documentation

◆ deSerialize()

void TileAnimationParams::deSerialize ( std::istream &  is,
u8  tiledef_version 
)

References readF32(), readU16(), readU8(), sheet_2d, TAT_SHEET_2D, TAT_VERTICAL_FRAMES, type, and vertical_frames.

Referenced by ParticleParameters::deSerialize(), and TileDef::deSerialize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ determineParams()

void TileAnimationParams::determineParams ( v2u32  texture_size,
int *  frame_count,
int *  frame_length_ms,
v2u32 frame_size 
) const

References sheet_2d, TAT_SHEET_2D, TAT_VERTICAL_FRAMES, type, and vertical_frames.

Referenced by fillTileAttribs(), getTextureCoords(), getTextureModifer(), Particle::step(), and Particle::updateVertices().

+ Here is the caller graph for this function:

◆ getTextureCoords()

v2f TileAnimationParams::getTextureCoords ( v2u32  texture_size,
int  frame 
) const

References determineParams(), sheet_2d, TAT_SHEET_2D, TAT_VERTICAL_FRAMES, type, and vertical_frames.

Referenced by Particle::updateVertices().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTextureModifer()

void TileAnimationParams::getTextureModifer ( std::ostream &  os,
v2u32  texture_size,
int  frame 
) const

References determineParams(), sheet_2d, TAT_NONE, TAT_SHEET_2D, TAT_VERTICAL_FRAMES, and type.

Referenced by fillTileAttribs().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ serialize()

void TileAnimationParams::serialize ( std::ostream &  os,
u8  tiledef_version 
) const

References sheet_2d, TAT_SHEET_2D, TAT_VERTICAL_FRAMES, type, vertical_frames, writeF32(), writeU16(), and writeU8().

Referenced by ParticleParameters::serialize(), and TileDef::serialize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ 

union { ... }

◆ aspect_h

int TileAnimationParams::aspect_h

◆ aspect_w

int TileAnimationParams::aspect_w

◆ frame_length

float TileAnimationParams::frame_length

◆ frames_h

int TileAnimationParams::frames_h

◆ frames_w

int TileAnimationParams::frames_w

◆ length

float TileAnimationParams::length

◆ 

struct { ... } TileAnimationParams::sheet_2d

◆ type

◆ 

struct { ... } TileAnimationParams::vertical_frames

The documentation for this struct was generated from the following files: