The Battle for Wesnoth  1.15.2+dev
Public Member Functions | Private Member Functions | Private Attributes | List of all members
halo::halo_impl::effect Class Reference

Public Member Functions

 effect (display *screen, int xpos, int ypos, const animated< image::locator >::anim_description &img, const map_location &loc, ORIENTATION, bool infinite)
 
void set_location (int x, int y)
 
bool render ()
 
void unrender ()
 
bool expired () const
 
bool need_update () const
 
bool does_change () const
 
bool on_location (const std::set< map_location > &locations) const
 
bool location_not_known () const
 
void add_overlay_location (std::set< map_location > &locations)
 

Private Member Functions

const image::locatorcurrent_image () const
 

Private Attributes

animated< image::locatorimages_
 
ORIENTATION orientation_
 
int x_
 
int y_
 
surface surf_
 
surface buffer_
 
SDL_Rect rect_
 
map_location loc_
 The location of the center of the halo. More...
 
std::vector< map_locationoverlayed_hexes_
 All locations over which the halo lies. More...
 
displaydisp
 

Detailed Description

Definition at line 39 of file halo.cpp.

Constructor & Destructor Documentation

◆ effect()

halo::halo_impl::effect::effect ( display screen,
int  xpos,
int  ypos,
const animated< image::locator >::anim_description &  img,
const map_location loc,
ORIENTATION  orientation,
bool  infinite 
)

Definition at line 137 of file halo.cpp.

References disp, images_, set_location(), and animated< T >::start_animation().

Referenced by halo::halo_impl::add().

Member Function Documentation

◆ add_overlay_location()

void halo::halo_impl::effect::add_overlay_location ( std::set< map_location > &  locations)

Definition at line 294 of file halo.cpp.

References overlayed_hexes_.

Referenced by does_change().

◆ current_image()

const image::locator& halo::halo_impl::effect::current_image ( ) const
inlineprivate

Definition at line 59 of file halo.cpp.

References animated< T >::get_current_frame(), and images_.

Referenced by render().

◆ does_change()

bool halo::halo_impl::effect::does_change ( ) const
inline

◆ expired()

bool halo::halo_impl::effect::expired ( ) const
inline

Definition at line 50 of file halo.cpp.

References animated< T >::animation_finished(), animated< T >::cycles(), and images_.

◆ location_not_known()

bool halo::halo_impl::effect::location_not_known ( ) const

Definition at line 289 of file halo.cpp.

References overlayed_hexes_.

Referenced by does_change(), and render().

◆ need_update()

bool halo::halo_impl::effect::need_update ( ) const
inline

Definition at line 51 of file halo.cpp.

References images_, and animated< T >::need_update().

◆ on_location()

bool halo::halo_impl::effect::on_location ( const std::set< map_location > &  locations) const

Definition at line 278 of file halo.cpp.

References overlayed_hexes_.

Referenced by does_change().

◆ render()

bool halo::halo_impl::effect::render ( )

◆ set_location()

void halo::halo_impl::effect::set_location ( int  x,
int  y 
)

◆ unrender()

void halo::halo_impl::effect::unrender ( )

Member Data Documentation

◆ buffer_

surface halo::halo_impl::effect::buffer_
private

Definition at line 66 of file halo.cpp.

Referenced by render(), set_location(), and unrender().

◆ disp

display* halo::halo_impl::effect::disp
private

Definition at line 75 of file halo.cpp.

Referenced by halo::halo_impl::add(), effect(), render(), set_location(), and unrender().

◆ images_

animated<image::locator> halo::halo_impl::effect::images_
private

Definition at line 61 of file halo.cpp.

Referenced by current_image(), does_change(), effect(), expired(), need_update(), and render().

◆ loc_

map_location halo::halo_impl::effect::loc_
private

The location of the center of the halo.

Definition at line 70 of file halo.cpp.

Referenced by render(), and unrender().

◆ orientation_

ORIENTATION halo::halo_impl::effect::orientation_
private

Definition at line 63 of file halo.cpp.

Referenced by render().

◆ overlayed_hexes_

std::vector<map_location> halo::halo_impl::effect::overlayed_hexes_
private

All locations over which the halo lies.

Definition at line 73 of file halo.cpp.

Referenced by add_overlay_location(), location_not_known(), on_location(), render(), and set_location().

◆ rect_

SDL_Rect halo::halo_impl::effect::rect_
private

Definition at line 67 of file halo.cpp.

Referenced by render().

◆ surf_

surface halo::halo_impl::effect::surf_
private

Definition at line 66 of file halo.cpp.

Referenced by render(), and unrender().

◆ x_

int halo::halo_impl::effect::x_
private

Definition at line 65 of file halo.cpp.

Referenced by render(), set_location(), and unrender().

◆ y_

int halo::halo_impl::effect::y_
private

Definition at line 65 of file halo.cpp.

Referenced by render(), set_location(), and unrender().


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