unit_frame Class Reference

Describe a unit's animation sequence. More...

#include <unit_frame.hpp>

Collaboration diagram for unit_frame:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 unit_frame (const frame_builder builder=frame_builder())
void redraw (const int frame_time, bool first_time, const gamemap::location &src, const gamemap::location &dst, int *halo_id, const frame_parameters &animation_val, const frame_parameters &engine_val) const
const frame_parameters merge_parameters (int current_time, const frame_parameters &animation_val, const frame_parameters &engine_val=frame_parameters(), bool primary=false) const
const frame_parameters parameters (int current_time) const
int duration () const
bool does_not_change () const
bool need_update () const
void invalidate (const int frame_time, const gamemap::location &src, const gamemap::location &dst, const frame_parameters &animation_val, const frame_parameters &engine_val, const bool primary) const

Private Attributes

frame_builder builder_


Detailed Description

Describe a unit's animation sequence.

Definition at line 176 of file unit_frame.hpp.


Constructor & Destructor Documentation

unit_frame::unit_frame ( const frame_builder  builder = frame_builder()  )  [inline]

Definition at line 179 of file unit_frame.hpp.


Member Function Documentation

void unit_frame::redraw ( const int  frame_time,
bool  first_time,
const gamemap::location src,
const gamemap::location dst,
int *  halo_id,
const frame_parameters animation_val,
const frame_parameters engine_val 
) const

const frame_parameters unit_frame::merge_parameters ( int  current_time,
const frame_parameters animation_val,
const frame_parameters engine_val = frame_parameters(),
bool  primary = false 
) const

this function merges the value provided by * the frame * the engine (poison, flying unit...) * the animation as a whole there is no absolute rule for merging, so creativity is the rule if a value is never provided by the engine, assert. (this way if it becomes used, people will easily find the right place to look)

Definition at line 459 of file unit_frame.cpp.

References frame_parameters::blend_ratio, frame_parameters::blend_with, builder_, frame_parameters::duration, image::locator::get_filename(), frame_parameters::halo, frame_parameters::halo_x, frame_parameters::halo_y, frame_parameters::highlight_ratio, frame_parameters::image, frame_parameters::image_diagonal, frame_parameters::image_mod, image::locator::is_void(), frame_parameters::offset, frame_builder::parameters(), frame_parameters::sound, frame_parameters::submerge, frame_parameters::text, frame_parameters::text_color, frame_parameters::x, and frame_parameters::y.

Referenced by invalidate(), unit_animation::particule::parameters(), and redraw().

const frame_parameters unit_frame::parameters ( int  current_time  )  const [inline]

Definition at line 182 of file unit_frame.hpp.

References builder_, and frame_builder::parameters().

int unit_frame::duration (  )  const [inline]

bool unit_frame::does_not_change (  )  const [inline]

bool unit_frame::need_update (  )  const [inline]

Definition at line 186 of file unit_frame.hpp.

References builder_, and frame_builder::need_update().

void unit_frame::invalidate ( const int  frame_time,
const gamemap::location src,
const gamemap::location dst,
const frame_parameters animation_val,
const frame_parameters engine_val,
const bool  primary 
) const


Member Data Documentation

Definition at line 189 of file unit_frame.hpp.

Referenced by does_not_change(), duration(), merge_parameters(), need_update(), and parameters().


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

Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs