FIFE
2008.0
|
#include <visual.h>
Public Member Functions | |
virtual | ~ObjectVisual () |
void | addStaticImage (uint32_t angle, int32_t image_index) |
int32_t | getStaticImageIndexByAngle (int32_t angle) |
int32_t | getClosestMatchingAngle (int32_t angle) |
void | getStaticImageAngles (std::vector< int32_t > &angles) |
![]() | |
virtual | ~Visual2DGfx () |
void | setTransparency (uint8_t transparency) |
uint32_t | getTransparency () |
void | setVisible (bool visible) |
uint32_t | isVisible () |
Static Public Member Functions | |
static ObjectVisual * | create (Object *object) |
Additional Inherited Members | |
![]() | |
Visual2DGfx () |
Object visual contains data that is needed for visualizing objects
|
virtual |
Destructor
Definition at line 62 of file visual.cpp.
void FIFE::ObjectVisual::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 active in the instance There can be several static images for different angles, that are used in case view / layer is rotated In case there are no exact matches for current view angles, closest one is used
angle | angle for image. 0 degrees starts from right and turns counter-clockwise (normal math notation) |
image_index | index of image to use for given degress |
Definition at line 65 of file visual.cpp.
|
static |
Constructs and assigns it to the passed item
Definition at line 53 of file visual.cpp.
References FIFE::Object::getVisual().
int32_t FIFE::ObjectVisual::getClosestMatchingAngle | ( | int32_t | angle | ) |
Returns closest matching image angle for given angle
Definition at line 74 of file visual.cpp.
References FIFE::getIndexByAngle().
void FIFE::ObjectVisual::getStaticImageAngles | ( | std::vector< int32_t > & | angles | ) |
Returns list of available static image angles for this object
Definition at line 80 of file visual.cpp.
int32_t FIFE::ObjectVisual::getStaticImageIndexByAngle | ( | int32_t | angle | ) |
Returns closest matching static image for given angle
Definition at line 69 of file visual.cpp.
References FIFE::getIndexByAngle().