ScummVM API documentation
QDEngine::qdAnimation Class Reference

Анимация. More...

#include <qd_animation.h>

Inheritance diagram for QDEngine::qdAnimation:
QDEngine::qdNamedObject QDEngine::qdResource QDEngine::qdNamedObjectBase

Public Member Functions

 qdAnimation (const qdAnimation &anm)
 
qdAnimation & operator= (const qdAnimation &anm)
 
int named_object_type () const
 Возвращает тип объекта. More...
 
const qdAnimationFrame * get_cur_frame () const
 
const qdAnimationFrame * get_cur_frame (float &scale) const
 
qdAnimationFrame * get_cur_frame ()
 
void set_cur_frame (int number)
 
int get_cur_frame_number () const
 
qdAnimationFrame * get_frame (int number)
 
const qdAnimationFrame * get_scaled_frame (int number, int scale_index) const
 
int num_frames () const
 
float length () const
 
float cur_time () const
 
void set_time (float tm)
 
float cur_time_rel () const
 
void set_time_rel (float tm)
 
void advance_time (float tm)
 
void init_size ()
 
int size_x () const
 
int size_y () const
 
int picture_size_x () const
 
int picture_size_y () const
 
bool is_playing () const
 
int status () const
 
bool is_finished () const
 
bool need_stop () const
 
void start ()
 
void stop ()
 
void pause ()
 
void resume ()
 
void quant (float dt)
 
void redraw (int x, int y, int z, int mode=0) const
 
void redraw (int x, int y, int z, float scale, int mode=0) const
 
void redraw_rot (int x, int y, int z, float angle, int mode=0) const
 
void redraw_rot (int x, int y, int z, float angle, const Vect2f &scale, int mode=0) const
 
void draw_mask (int x, int y, int z, uint32 mask_color, int mask_alpha, int mode=0) const
 
void draw_mask (int x, int y, int z, uint32 mask_color, int mask_alpha, float scale, int mode=0) const
 
void draw_mask_rot (int x, int y, int z, float angle, uint32 mask_color, int mask_alpha, int mode=0) const
 
void draw_mask_rot (int x, int y, int z, float angle, uint32 mask_color, int mask_alpha, const Vect2f &scale, int mode=0) const
 
void draw_contour (int x, int y, uint32 color) const
 
void draw_contour (int x, int y, uint32 color, float scale) const
 
bool hit (int x, int y) const
 
bool hit (int x, int y, float scale) const
 
bool add_frame (qdAnimationFrame *p, qdAnimationFrame *insert_pos=0, bool insert_after=true)
 
bool remove_frame (int number)
 
bool remove_frame_range (int number0, int number1)
 
bool reverse_frame_range (int number0, int number1)
 
void load_script (const xml::tag *p)
 
bool save_script (Common::WriteStream &fh, int indent=0) const
 
const Common::Path qda_file () const
 
void qda_set_file (const Common::Path &fname)
 
bool qda_load (const Common::Path &fname)
 
bool load_resources ()
 
void free_resources ()
 
bool scale (float coeff_x, float coeff_y)
 
bool crop ()
 
bool undo_crop ()
 
Vect2i remove_edges ()
 
bool compress ()
 
bool uncompress ()
 
bool tileCompress (grTileCompressionMethod method=TILE_UNCOMPRESSED, int tolerance=0)
 
qdAnimationFrameList & frames_list ()
 
void create_reference (qdAnimation *p, const qdAnimationInfo *inf=NULL) const
 
bool is_reference (const qdAnimation *p) const
 
void clear ()
 
bool is_empty () const
 
grScreenRegion screen_region (int mode=0, float scale=1.0f) const
 Возвращает область экрана, занимаемую анимацией. More...
 
const qdAnimation * parent () const
 
bool load_resource ()
 Загружает в память данные ресурса. More...
 
bool free_resource ()
 Выгружает из памяти данные ресурса. More...
 
void set_resource_file (const Common::Path &file_name)
 Устанавливает имя файла, в котором хранятся данные ресурса. More...
 
const Common::Path resource_file () const
 Возвращает имя файла, в котором хранится анимация. More...
 
bool load_data (Common::SeekableReadStream &fh, int save_version)
 Загрузка данных из сэйва. More...
 
bool save_data (Common::WriteStream &fh) const
 Запись данных в сэйв. More...
 
bool add_scale (float value)
 
bool create_scaled_frames ()
 
const Std::vector< float > & scales () const
 
void clear_scales ()
 
const grTileAnimation * tileAnimation () const
 
- Public Member Functions inherited from QDEngine::qdNamedObject
 qdNamedObject (const qdNamedObject &p)
 
qdNamedObject & operator= (const qdNamedObject &p)
 
qdNamedObject * owner () const
 Возвращает владельца объекта.
 
qdNamedObject * owner (qdNamedObjectType tp) const
 Возвращает владельца объекта, тип которого tp.
 
void set_owner (qdNamedObject *p)
 Устанавливает владельца объекта.
 
void set_flag (int fl)
 Устанавливает флаг.
 
void drop_flag (int fl)
 Скидывает флаг.
 
bool check_flag (int fl) const
 Возвращает true, если установлен флаг fl.
 
void clear_flags ()
 Очищает флаги.
 
int flags () const
 Возвращает значение флагов объекта.
 
virtual int named_object_type () const =0
 Возвращает тип объекта. More...
 
virtual bool load_data (Common::SeekableReadStream &fh, int save_version)
 Загрузка данных из сэйва. More...
 
virtual bool save_data (Common::WriteStream &fh) const
 Запись данных в сэйв. More...
 
void add_trigger_reference ()
 Добавляет ссылку из триггеров на объект.
 
void remove_trigger_reference ()
 Удаляет ссылку из триггеров на объект.
 
void clear_trigger_references ()
 Очищает счётчик ссылок из триггеров на объект.
 
bool is_in_triggers () const
 Возвращает true, если на объект есть ссылки из триггеров.
 
Common::String toString () const
 
- Public Member Functions inherited from QDEngine::qdNamedObjectBase
 qdNamedObjectBase (const qdNamedObjectBase &obj)
 
qdNamedObjectBase & operator= (const qdNamedObjectBase &obj)
 
const char * name () const
 Возвращает имя объекта.
 
void set_name (const char *p)
 Устанавливает имя объекта.
 
- Public Member Functions inherited from QDEngine::qdResource
 qdResource (const qdResource &res)
 
qdResource & operator= (const qdResource &res)
 
virtual bool load_resource ()=0
 Загружает в память данные ресурса. More...
 
virtual bool free_resource ()=0
 Выгружает из памяти данные ресурса. More...
 
virtual void set_resource_file (const Common::Path &file_name)=0
 Устанавливает имя файла, в котором хранятся данные ресурса. More...
 
virtual const Common::Path resource_file () const =0
 Возвращает имя файла, в котором хранятся данные ресурса. More...
 
bool is_resource_loaded () const
 Возвращает true, если данные ресурса загружены в память.
 

Static Public Member Functions

static Common::String flag2str (int fl, bool truncate=false, bool icon=false)
 
static Common::String status2str (int fl, bool truncate=false)
 
- Static Public Member Functions inherited from QDEngine::qdResource
static file_format_t file_format (const Common::Path &file_name)
 

Additional Inherited Members

- Public Types inherited from QDEngine::qdResource
enum  file_format_t { RES_ANIMATION , RES_SPRITE , RES_SOUND , RES_UNKNOWN }
 Форматы файлов. More...
 
- Protected Member Functions inherited from QDEngine::qdResource
void toggle_resource_status (bool st=true)
 Устанавливает или скидывает флаг, показывающий что данные ресурса загружены в память.
 

Detailed Description

Анимация.

Member Function Documentation

◆ named_object_type()

int QDEngine::qdAnimation::named_object_type ( ) const
inlinevirtual

Возвращает тип объекта.

Implements QDEngine::qdNamedObject.

◆ screen_region()

grScreenRegion QDEngine::qdAnimation::screen_region ( int  mode = 0,
float  scale = 1.0f 
) const

Возвращает область экрана, занимаемую анимацией.

Координаты области - смещение от центра анимации. В mode задаются повороты анимации по горизонтали и вертикали (QD_ANIMATION_FLAG_FLIP_HORIZONTAL, QD_ANIMATION_FLAG_FLIP_VERTICAL)

◆ load_resource()

bool QDEngine::qdAnimation::load_resource ( )
virtual

Загружает в память данные ресурса.

Implements QDEngine::qdResource.

◆ free_resource()

bool QDEngine::qdAnimation::free_resource ( )
virtual

Выгружает из памяти данные ресурса.

Implements QDEngine::qdResource.

◆ set_resource_file()

void QDEngine::qdAnimation::set_resource_file ( const Common::Path &  file_name)
inlinevirtual

Устанавливает имя файла, в котором хранятся данные ресурса.

Implements QDEngine::qdResource.

◆ resource_file()

const Common::Path QDEngine::qdAnimation::resource_file ( ) const
inlinevirtual

Возвращает имя файла, в котором хранится анимация.

Implements QDEngine::qdResource.

◆ load_data()

bool QDEngine::qdAnimation::load_data ( Common::SeekableReadStream &  fh,
int  save_version 
)
virtual

Загрузка данных из сэйва.

Reimplemented from QDEngine::qdNamedObject.

◆ save_data()

bool QDEngine::qdAnimation::save_data ( Common::WriteStream &  fh) const
virtual

Запись данных в сэйв.

Reimplemented from QDEngine::qdNamedObject.


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