#include <map_objects.h>
Inheritance diagram for hoa_map::private_map::PhysicalObject:


Public Member Functions | |
| void | Draw () |
| Draws the object to the screen, if it is visible. | |
| PhysicalObject () | |
| void | Update () |
| Updates the object's animation frames if it is animated. | |
| ~PhysicalObject () | |
Lua Access Functions | |
These functions are specifically written for Lua binding, to enable Lua to access the members of this class. | |
| void | AddAnimation (hoa_video::AnimatedImage new_img) |
| uint8 | GetCurrentAnimation () const |
| void | SetAnimationProgress (uint32 progress) |
| void | SetCurrentAnimation (uint8 current) |
Public Attributes | |
| std::vector< hoa_video::AnimatedImage > | animations |
| A vector containing all the object's animations. Note that these need not be actual animations. An AnimatedImage object may consist of only a single frame. Usually an object will only need a single image or animation, but a vector is used here in case others are needed. | |
| uint8 | current_animation |
| The index to the animations vector that contains the current image to display. | |
****************************************************************************
This class represents both still image and animated objects. These objects are fixed in place and can not move. The object must have at least one entry in its image vector, otherwise a segmentation fault will occur if the Update or Draw functions are called.
Definition at line 301 of file map_objects.h.
| hoa_map::private_map::PhysicalObject::PhysicalObject | ( | ) |
Definition at line 91 of file map_objects.cpp.
References hoa_map::private_map::MapObject::_object_type, and hoa_map::private_map::PHYSICAL_TYPE.
| hoa_map::private_map::PhysicalObject::~PhysicalObject | ( | ) |
| void hoa_map::private_map::PhysicalObject::AddAnimation | ( | hoa_video::AnimatedImage | new_img | ) | [inline] |
| void hoa_map::private_map::PhysicalObject::Draw | ( | ) | [virtual] |
Draws the object to the screen, if it is visible.
Implements hoa_map::private_map::MapObject.
Definition at line 112 of file map_objects.cpp.
References animations, current_animation, hoa_map::private_map::MapObject::DrawHelper(), hoa_video::GameVideo::DrawImage(), and hoa_video::VideoManager.
Here is the call graph for this function:

| uint8 hoa_map::private_map::PhysicalObject::GetCurrentAnimation | ( | ) | const [inline] |
| void hoa_map::private_map::PhysicalObject::SetAnimationProgress | ( | uint32 | progress | ) | [inline] |
| void hoa_map::private_map::PhysicalObject::SetCurrentAnimation | ( | uint8 | current | ) | [inline] |
| void hoa_map::private_map::PhysicalObject::Update | ( | ) | [virtual] |
Updates the object's animation frames if it is animated.
Implements hoa_map::private_map::MapObject.
Definition at line 105 of file map_objects.cpp.
References animations, current_animation, and hoa_map::private_map::MapObject::updatable.
A vector containing all the object's animations. Note that these need not be actual animations. An AnimatedImage object may consist of only a single frame. Usually an object will only need a single image or animation, but a vector is used here in case others are needed.
Definition at line 311 of file map_objects.h.
Referenced by AddAnimation(), Draw(), SetAnimationProgress(), SetCurrentAnimation(), Update(), and ~PhysicalObject().
The index to the animations vector that contains the current image to display.
Definition at line 304 of file map_objects.h.
Referenced by Draw(), GetCurrentAnimation(), SetAnimationProgress(), SetCurrentAnimation(), and Update().
1.5.1