JugiMap Framework
SourceSprite Class Reference

The SourceSprite class defines the source sprite from JugiMap Editor. More...

#include <jmSourceGraphics.h>

Public Types

enum  Status { HAS_IMAGES_OF_DIFFERENT_SIZE = 1, HAS_IMAGES_WITH_SPRITE_SHAPES = 2, HAS_IMAGES_WITH_DIFFERENT_SPRITE_SHAPES = 4, HAS_MULTIPLE_SPRITE_SHAPES_IN_IMAGE = 8 }
 The status flags for standard source sprites (SpriteKind::STANDARD). More...
 

Public Member Functions

void Init ()
 Initialize this source sprite. More...
 
SpriteKind GetKind ()
 Returns the kind of this source sprite. More...
 
std::string GetName ()
 Returns the name of this source sprite. More...
 
std::vector< Parameter > & GetConstantParameters ()
 Returns a reference to the vector of stored constant parameters in this source sprite. More...
 
std::vector< GraphicItem * > & GetGraphicItems ()
 Returns a reference to the vector of graphic items in this source sprite. More...
 
std::vector< FrameAnimation * > & GetFrameAnimations ()
 Returns a reference to the vector of stored frame animations in this source sprite. More...
 
std::vector< TimelineAnimation * > & GetTimelineAnimations ()
 Returns a reference to the vector of stored timeline animations in this source sprite. More...
 
int GetStatusFlags ()
 Returns the status flags. More...
 
ComposedSpriteGetSourceComposedSprite ()
 Returns a pointer to the owned source composed sprite or nullptr if there is none. More...
 

Detailed Description

The SourceSprite class defines the source sprite from JugiMap Editor.

A source sprite stores common sprite data and parameters which can be shared by all Sprite objects of the same source sprite. For StandardSprite objects these data includes textures, shapes, animations etc.

Member Enumeration Documentation

◆ Status

enum Status

The status flags for standard source sprites (SpriteKind::STANDARD).

Enumerator
HAS_IMAGES_OF_DIFFERENT_SIZE 

Has images of different size.

HAS_IMAGES_WITH_SPRITE_SHAPES 

Has image(s) with defined sprite shapes.

HAS_IMAGES_WITH_DIFFERENT_SPRITE_SHAPES 

Has more images and they do not have all the same sprite shapes.

HAS_MULTIPLE_SPRITE_SHAPES_IN_IMAGE 

The source sprite has image(s) with multiple sprite shapes.

Member Function Documentation

◆ Init()

void Init ( )

Initialize this source sprite.

This function is called by Sprite::InitEngineSprite and should not be called manually.

◆ GetKind()

SpriteKind GetKind ( )
inline

Returns the kind of this source sprite.

◆ GetName()

std::string GetName ( )
inline

Returns the name of this source sprite.

◆ GetConstantParameters()

std::vector<Parameter>& GetConstantParameters ( )
inline

Returns a reference to the vector of stored constant parameters in this source sprite.

◆ GetGraphicItems()

std::vector<GraphicItem*>& GetGraphicItems ( )
inline

Returns a reference to the vector of graphic items in this source sprite.

◆ GetFrameAnimations()

std::vector<FrameAnimation*>& GetFrameAnimations ( )
inline

Returns a reference to the vector of stored frame animations in this source sprite.

◆ GetTimelineAnimations()

std::vector<TimelineAnimation*>& GetTimelineAnimations ( )
inline

Returns a reference to the vector of stored timeline animations in this source sprite.

◆ GetStatusFlags()

int GetStatusFlags ( )
inline

Returns the status flags.

◆ GetSourceComposedSprite()

ComposedSprite* GetSourceComposedSprite ( )
inline

Returns a pointer to the owned source composed sprite or nullptr if there is none.


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