CorsixTH engine (the C++ part)
Open source implementation of Theme Hospital
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
animation_base Class Reference

#include <th_gfx.h>

Inheritance diagram for animation_base:
drawable link_list animation sprite_render_list

Public Member Functions

 animation_base ()
 
void remove_from_tile ()
 
void attach_to_tile (const xy_pair &tile_pos, map_tile *node, int layer)
 
uint32_t get_flags () const
 
const xy_pairget_pixel_offset () const
 
const xy_pairget_tile () const
 
void set_flags (uint32_t iFlags)
 
void set_tile (const xy_pair &tile_pos)
 
void set_pixel_offset (int x, int y)
 
void set_layer (int iLayer, int iId)
 
void set_layers_from (const animation_base *pSrc)
 
- Public Member Functions inherited from drawable
 drawable ()=default
 
virtual void draw_fn (render_target *canvas, const xy_pair &draw_pos)=0
 Draw the object at a specific point on a render target.
 
virtual bool hit_test_fn (const xy_pair &draw_pos, const xy_pair &obj_pos)=0
 Perform a hit test against the object.
 
virtual bool is_multiple_frame_animation_fn ()=0
 
int get_drawing_layer ()
 
void set_drawing_layer (int layer)
 

Protected Attributes

xy_pair tile {-1, -1}
 Tile containing the animation. A negative x or y means it is not active.
 
xy_pair pixel_offset {0, 0}
 Offset in pixels relative to the center of the animation tile.
 
::layers layers {}
 

Additional Inherited Members

- Public Attributes inherited from drawable
uint32_t flags {0}
 Drawing flags (zero or more list flags from draw_flags).
 

Constructor & Destructor Documentation

◆ animation_base()

animation_base::animation_base ( )

Member Function Documentation

◆ attach_to_tile()

void animation_base::attach_to_tile ( const xy_pair tile_pos,
map_tile node,
int  layer 
)

◆ get_flags()

uint32_t animation_base::get_flags ( ) const
inline

◆ get_pixel_offset()

const xy_pair & animation_base::get_pixel_offset ( ) const
inline

◆ get_tile()

const xy_pair & animation_base::get_tile ( ) const
inline

◆ remove_from_tile()

void animation_base::remove_from_tile ( )

◆ set_flags()

void animation_base::set_flags ( uint32_t  iFlags)
inline

◆ set_layer()

void animation_base::set_layer ( int  iLayer,
int  iId 
)

◆ set_layers_from()

void animation_base::set_layers_from ( const animation_base pSrc)
inline

◆ set_pixel_offset()

void animation_base::set_pixel_offset ( int  x,
int  y 
)
inline

◆ set_tile()

void animation_base::set_tile ( const xy_pair tile_pos)
inline

Member Data Documentation

◆ layers

::layers animation_base::layers {}
protected

◆ pixel_offset

xy_pair animation_base::pixel_offset {0, 0}
protected

Offset in pixels relative to the center of the animation tile.

◆ tile

xy_pair animation_base::tile {-1, -1}
protected

Tile containing the animation. A negative x or y means it is not active.


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