Luanti 5.11.0-dev
 
Loading...
Searching...
No Matches
TileAnimationParams Struct Reference

#include <tileanimation.h>

Public Member Functions

void serialize (std::ostream &os, u16 protocol_ver) const
 
void deSerialize (std::istream &is, u16 protocol_ver)
 
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 = TileAnimationType::TAT_NONE
 
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,
u16 protocol_ver )

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

Referenced by ParticleParameters::deSerialize(), ServerParticleTexture::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 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.

+ Here is the call graph for this function:

◆ serialize()

void TileAnimationParams::serialize ( std::ostream & os,
u16 protocol_ver ) const

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

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

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

Member Data Documentation

◆ [union]

union { ... } TileAnimationParams

◆ 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]

◆ type

◆ [struct]

struct { ... } TileAnimationParams::vertical_frames

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