22 #ifndef FIFE_VIEW_VISUAL_H
23 #define FIFE_VIEW_VISUAL_H
63 const std::map<Color, Color>&
getColors();
static InstanceVisual * create(Instance *instance)
Constructs and assigns it to the passed item.
void setColorOverlayAnimation(AnimationPtr animation)
ObjectVisual()
Constructor.
AngleAnimationMap m_animation_map
int32_t getClosestMatchingAngle(int32_t angle)
Returns closest matching image angle for given angle.
AngleColorAnimationOverlayMap m_colorAnimationOverlayMap
int32_t getStackPosition()
Gets current stack position of instance.
std::map< Color, Color > m_colorMap
Visual2DGfx()
Constructor.
Instance visual contains data that is needed to visualize the instance on screen. ...
void convertToOverlays(bool color)
Convertes animations and optional color overlay to default animation overlay.
ActionVisual()
Constructor.
Action visual contains data that is needed to visualize different actions on screen.
virtual ~Visual2DGfx()
Destructor.
std::map< uint32_t, std::map< int32_t, AnimationPtr > > AngleAnimationOverlayMap
static ActionVisual * create(Action *action)
Constructs and assigns it to the passed item.
void removeAnimationOverlay(uint32_t angle, int32_t order)
Removes animation overlay with given angle (degrees) and order.
type_angle2id m_angle2img
AngleColorOverlayMap m_colorOverlayMap
void removeStaticColorOverlay(int32_t angle)
Removes a static color overlay with given angle (degrees).
void setTransparency(uint8_t transparency)
Sets transparency value for object to be visualized.
OverlayColors * getStaticColorOverlay(int32_t angle)
Returns closest matching static color overlay for given angle.
OverlayColors * getColorOverlay(int32_t angle)
Gets OverlayColors for given angle (degrees).
int32_t getStaticImageIndexByAngle(int32_t angle)
Returns closest matching static image for given angle.
AngleColorOverlayMap m_colorOverlayMap
bool isVisible()
Is instance visible or not.
void changeColor(const Color &source, const Color &target)
void removeColorOverlay(int32_t angle)
Removes color overlay with given angle (degrees).
AngleAnimationOverlayMap m_animationOverlayMap
void setColorOverlayImage(ImagePtr image)
void setVisible(bool visible)
Sets visibility value for object to be visualized.
void getActionImageAngles(std::vector< int32_t > &angles)
Returns list of available angles for this Action.
void addColorOverlay(uint32_t angle, const OverlayColors &colors)
Adds new color overlay with given angle (degrees) and colors.
std::map< uint32_t, OverlayColors > AngleColorOverlayMap
std::map< uint32_t, std::map< int32_t, OverlayColors > > AngleColorAnimationOverlayMap
void addAnimationOverlay(uint32_t angle, int32_t order, AnimationPtr animationptr)
Adds new animation overlay with given angle (degrees) and order.
void getStaticImageAngles(std::vector< int32_t > &angles)
Returns list of available static image angles for this object.
const std::map< Color, Color > & getColors()
void addAnimation(uint32_t angle, AnimationPtr animationptr)
Adds new animation with given angle (degrees)
bool isColorOverlay()
Indicates if there exists a color overlay.
void addStaticColorOverlay(uint32_t angle, const OverlayColors &colors)
Adds new static color overlay with given angle (degrees).
ImagePtr getColorOverlayImage()
virtual ~ActionVisual()
Destructor.
std::map< uint32_t, OverlayColors > AngleColorOverlayMap
InstanceVisual()
Constructor.
Object visual contains data that is needed for visualizing objects.
static ObjectVisual * create(Object *object)
Constructs and assigns it to the passed item.
void addStaticImage(uint32_t angle, int32_t image_index)
Adds new static image with given angle (degrees) Static images are used in case there are no actions ...
AnimationPtr getAnimationByAngle(int32_t angle)
Gets index to animation closest to given angle.
uint8_t getTransparency()
Gets current transparency value (0-255)
void setStackPosition(int32_t stackposition)
Sets stack position of the instance Stack position is used to define the order in which instances res...
virtual ~ObjectVisual()
Destructor.
std::map< uint32_t, AnimationPtr > AngleAnimationMap
virtual ~InstanceVisual()
Destructor.
std::map< uint32_t, int32_t > type_angle2id
AnimationPtr getColorOverlayAnimation()
OverlayColors()
Constructors.
~OverlayColors()
Destructor.
An Instance is an "instantiation" of an Object at a Location.
std::map< int32_t, AnimationPtr > getAnimationOverlay(int32_t angle)
Gets map with animations closest to given angle.
bool isAnimationOverlay()
Returns true if it exists a animation overlay, otherwise false.
bool isColorOverlay()
Returns true if it exists a color overlay, otherwise false.
Base class for all 2 dimensional visual classes Visual classes are extensions to visualize the stuff ...