#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 |
| void | extractFirstFrame (std::string &name) 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 | |
| }; | |
| 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.
| 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 createAnimationFrames(), getTextureCoords(), and getTextureModifer().
| void TileAnimationParams::extractFirstFrame | ( | std::string & | name | ) | const |
References sheet_2d, str_texture_modifiers_escape(), TAT_NONE, TAT_SHEET_2D, TAT_VERTICAL_FRAMES, type, and vertical_frames.
References determineParams(), sheet_2d, TAT_SHEET_2D, TAT_VERTICAL_FRAMES, type, and vertical_frames.
| 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 createAnimationFrames().
| 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().
| union { ... } TileAnimationParams |
| int TileAnimationParams::aspect_h |
Referenced by push_tile_animation_params(), and read_animation_definition().
| int TileAnimationParams::aspect_w |
Referenced by push_tile_animation_params(), and read_animation_definition().
| float TileAnimationParams::frame_length |
Referenced by push_tile_animation_params(), read_animation_definition(), and ParticleSpawner::spawnParticle().
| int TileAnimationParams::frames_h |
Referenced by push_tile_animation_params(), and read_animation_definition().
| int TileAnimationParams::frames_w |
Referenced by push_tile_animation_params(), read_animation_definition(), and ParticleSpawner::spawnParticle().
| float TileAnimationParams::length |
Referenced by push_tile_animation_params(), read_animation_definition(), and ParticleSpawner::spawnParticle().
| struct { ... } TileAnimationParams::sheet_2d |
| enum TileAnimationType TileAnimationParams::type = TileAnimationType::TAT_NONE |
Referenced by createAnimationFrames(), deSerialize(), determineParams(), extractFirstFrame(), fillTileAttribs(), getTextureCoords(), getTextureModifer(), NodeVisuals::preUpdateTextures(), push_tile_animation_params(), push_tiledef(), read_animation_definition(), read_json_value(), serialize(), and ParticleSpawner::spawnParticle().
| struct { ... } TileAnimationParams::vertical_frames |