ScummVM API documentation
QDEngine::qdGameDispatcher Class Reference
Inheritance diagram for QDEngine::qdGameDispatcher:
QDEngine::qdGameDispatcherBase QDEngine::qdResourceDispatcher< qdNamedObject > QDEngine::qdFileOwner QDEngine::qdConditionalObject QDEngine::qdNamedObject QDEngine::qdNamedObjectBase

Public Types

enum  { TEXT_SET_DIALOGS = 0 }
 Идентификаторы наборов текстов. More...
 
enum  {
  EXIT_FLAG = 0x01 , RESTART_FLAG = 0x02 , OBJECT_CLICK_FLAG = 0x04 , DIALOG_CLICK_FLAG = 0x08 ,
  FULLSCREEN_REDRAW_FLAG = 0x10 , SKIP_REDRAW_FLAG = 0x20 , MAIN_MENU_FLAG = 0x40 , INTRO_MODE_FLAG = 0x80 ,
  CLICK_FAILED_FLAG = 0x100 , OBJECT_CLICK_FAILED_FLAG = 0x200 , CLICK_WAS_FAILED_FLAG = 0x400 , OBJECT_CLICK_WAS_FAILED_FLAG = 0x800 ,
  LOAD_GAME_FLAG = 0x1000 , SAVE_GAME_FLAG = 0x2000 , FADE_IN_FLAG = 0x4000 , FADE_OUT_FLAG = 0x8000 ,
  NEXT_FRAME_FLAG = 0x10000
}
 Флаги
 
- Public Types inherited from QDEngine::qdConditionalObject
enum  ConditionsMode { CONDITIONS_AND , CONDITIONS_OR }
 Режим проверки условий. More...
 
enum  trigger_start_mode { TRIGGER_START_FAILED , TRIGGER_START_ACTIVATE , TRIGGER_START_WAIT }
 Варианты старта триггера. More...
 
typedef Std::vector< qdCondition > conditions_container_t
 
typedef Std::vector< qdConditionGroup > condition_groups_container_t
 

Public Member Functions

int named_object_type () const
 Возвращает тип объекта. More...
 
qdGameObjectMouse * mouse_object ()
 
qdGameObjectMouse const * mouse_object () const
 
bool drop_mouse_object ()
 
int CD_count () const
 
int resource_compression () const
 
void set_resource_compression (int compression)
 
void request_file_package (const qdFileOwner &file_owner) const
 
Common::Path find_file (const Common::Path &file_name, const qdFileOwner &file_owner) const
 
void startup_check () const
 
qdLoadingProgressFnc set_scene_loading_progress_callback (qdLoadingProgressFnc p, void *dp=0)
 
qdLoadingProgressFnc get_scene_loading_progress_callback ()
 
void * get_scene_loading_progress_data ()
 
void set_time (int tm)
 
int get_time () const
 
bool start_intro_videos ()
 
void quant ()
 
void quant (float dt)
 
void pre_redraw ()
 
void redraw ()
 
void post_redraw ()
 
void update_time ()
 
bool mouse_handler (int x, int y, mouseDispatcher::mouseEvent ev)
 
bool keyboard_handler (Common::KeyCode vkey, bool event)
 
bool add_game_end (qdGameEnd *p)
 
bool rename_game_end (qdGameEnd *p, const char *name)
 
bool remove_game_end (qdGameEnd *p)
 
qdGameEnd * get_game_end (const char *name)
 
bool is_game_end_in_list (const char *name)
 
bool is_game_end_in_list (qdGameEnd *p)
 
bool add_counter (qdCounter *p)
 
bool rename_counter (qdCounter *p, const char *name)
 
bool remove_counter (qdCounter *p)
 
qdCounter * get_counter (const char *name)
 
bool is_counter_in_list (const char *name)
 
bool is_counter_in_list (qdCounter *p)
 
bool add_minigame (qdMiniGame *p)
 
bool rename_minigame (qdMiniGame *p, const char *name)
 
bool remove_minigame (const char *name)
 
bool remove_minigame (qdMiniGame *p)
 
qdMiniGame * get_minigame (const char *name)
 
bool is_minigame_in_list (const char *name)
 
bool is_minigame_in_list (qdMiniGame *p)
 
void set_mouse_click_state (const qdGameObjectState *p)
 
bool add_inventory (qdInventory *p)
 
bool remove_inventory (const char *name)
 
bool remove_inventory (qdInventory *p)
 
qdInventory * get_inventory (const char *name)
 
bool is_inventory_in_list (const char *name)
 
bool is_inventory_in_list (qdInventory *p)
 
bool rename_inventory (qdInventory *p, const char *name)
 
const qdInventoryCellType * add_inventory_cell_type (const qdInventoryCellType &tp)
 
bool remove_inventory_cell_type (int type)
 
const qdInventoryCellType * get_inventory_cell_type (int type) const
 
int get_unique_inventory_cell_type () const
 
bool set_inventory_cell_type (const qdInventoryCellType &tp)
 
const qdInventoryCellTypeVector & inventory_cell_types () const
 
qdInventoryCellTypeVector & not_const_inventory_cell_types ()
 
bool add_font_info (qdFontInfo *fi)
 Операции со шрифтами More...
 
bool remove_font_info (qdFontInfo *fi)
 
bool rename_font_info (qdFontInfo *fi, char const *name)
 
const qdFontInfo * get_font_info (int type) const
 
int get_unique_font_info_type () const
 
bool set_font_info (const qdFontInfo &fi)
 
const qdFontInfoList & fonts_list () const
 
int default_font () const
 
void set_default_font (int font)
 
bool toggle_inventory (bool state)
 
bool toggle_inventory ()
 
bool put_to_inventory (qdGameObjectAnimated *p)
 
bool remove_from_inventory (qdGameObjectAnimated *p)
 
bool is_in_inventory (const qdGameObjectAnimated *p) const
 
bool is_on_mouse (const qdGameObjectAnimated *p) const
 
const qdInventory * cur_inventory () const
 
bool add_video (qdVideo *p, qdVideo const *before=NULL)
 
bool remove_video (const char *name)
 
bool remove_video (qdVideo *p)
 
qdVideo * get_video (const char *name)
 
bool is_video_in_list (const char *name)
 
bool is_video_in_list (qdVideo *p)
 
bool rename_video (qdVideo *p, const char *name)
 
bool add_trigger_chain (qdTriggerChain *p)
 
bool remove_trigger_chain (const char *name)
 
bool remove_trigger_chain (qdTriggerChain *p)
 
qdTriggerChain * get_trigger_chain (const char *name)
 
bool is_trigger_chain_in_list (const char *name)
 
bool is_trigger_chain_in_list (qdTriggerChain *p)
 
bool rename_trigger_chain (qdTriggerChain *p, const char *name)
 
bool add_scene (qdGameScene *p)
 
bool rename_scene (qdGameScene *p, const char *name)
 
bool remove_scene (qdGameScene *p)
 
qdGameScene * get_scene (const char *name)
 
bool is_scene_in_list (const char *name)
 
bool is_scene_in_list (const qdGameScene *p)
 
bool add_global_object (qdGameObject *p)
 
bool rename_global_object (qdGameObject *p, const char *name)
 
bool remove_global_object (const char *name)
 
bool remove_global_object (qdGameObject *p)
 
qdGameObject * get_global_object (const char *name)
 
bool is_global_object_in_list (const char *name)
 
bool is_global_object_in_list (qdGameObject *p)
 
bool merge_global_objects (qdGameObject *obj=NULL)
 
bool split_global_objects (qdGameObject *obj=NULL)
 
bool update_walk_state (const char *object_name, qdGameObjectState *p)
 
qdGameObjectState * get_walk_state (const char *object_name)
 
bool play_video (const char *vid_name)
 
bool play_video (qdVideo *p)
 
bool pause_video ()
 
bool stop_video ()
 
bool close_video ()
 
bool is_video_finished ()
 
bool is_video_playing ()
 
void continueVideo ()
 
bool is_video_playing (qdVideo *p)
 
bool play_music_track (const qdMusicTrack *p, bool interface_mode=false)
 
const qdMusicTrack * current_music () const
 
bool stop_music ()
 
bool select_scene (const char *s_name)
 
bool select_scene (qdGameScene *sp, bool resources_flag=true)
 
bool activate_trigger_links (const qdNamedObject *p)
 Делает активными все линки, идущие от объекта в триггерах.
 
bool deactivate_scene_triggers (const qdGameScene *p)
 Делает неактивными все триггера сцены.
 
void set_next_scene (qdGameScene *p)
 
int load_resources ()
 
void free_resources ()
 
int get_resources_size ()
 
void load_script (const char *fname)
 
void load_script (const xml::tag *p)
 
bool save_script (Common::SeekableWriteStream &fh) const
 
bool save_script (const char *fname) const
 
bool load_save (Common::SeekableReadStream *fh)
 Загрузка данных из сэйва.
 
bool save_save (Common::WriteStream *stream) const
 Запись данных в сэйв.
 
bool save_game (int slot_id) const
 
bool init ()
 Инициализация данных, вызывается один раз сразу после загрузки скрипта. More...
 
bool init_triggers ()
 
bool reset_triggers ()
 
const qdVideoList & video_list () const
 
const qdTriggerChainList & trigger_chain_list () const
 
const qdGameObjectList & global_object_list () const
 
const qdInventoryList & inventory_list () const
 
const qdMiniGameList & minigame_list () const
 
const qdGameEndList & game_end_list () const
 
const qdGameSceneList & scene_list () const
 
const qdCounterList & counter_list () const
 
qdGameScene * get_active_scene () const
 
qdSound * get_sound (const char *name)
 
qdAnimation * get_animation (const char *name)
 
qdAnimationSet * get_animation_set (const char *name)
 
qdGameObject * get_object (const char *name)
 
qdGameObjectMoving * get_active_personage ()
 
qdNamedObject * get_named_object (const qdNamedObjectReference *ref)
 
qdScaleInfo * get_scale_info (const char *p)
 
bool check_condition (qdCondition *cnd)
 
void pause ()
 
void resume ()
 
bool is_paused ()
 
bool is_gameplay_paused ()
 
void pause_gameplay (bool pause)
 
bool restart ()
 
qdScreenTextDispatcher & screen_texts_dispatcher ()
 
bool toggle_main_menu ()
 
bool toggle_main_menu (bool state, const char *screen_name=NULL)
 
bool has_main_menu () const
 
bool is_main_menu_exit_enabled () const
 
void set_game_end (const qdGameEnd *p)
 
bool end_game (const qdGameEnd *p)
 
bool add_redraw_region (const grScreenRegion &reg)
 
void toggle_exit ()
 Ставит флаг, что надо выйти из игры.
 
bool need_exit () const
 Возвращает true, если надо выйти из игры.
 
void toggle_restart ()
 Ставит флаг, что надо перезапустить игру.
 
bool need_restart () const
 Возвращает true, если надо перезапустить игру.
 
void toggle_full_redraw ()
 
bool need_full_redraw () const
 
const char * startup_scene () const
 Возвращает имя стартовой сцены игры.
 
void set_startup_scene (const char *name)
 Устанавливает имя стартовой сцены игры. More...
 
bool has_startup_scene () const
 Возвращает true, если задана стартовая сцена игры.
 
bool game_screenshot (Graphics::Surface &thumb) const
 
void set_game_title (const char *p)
 
const char * game_title () const
 
void set_texts_database (const Common::Path &file_name)
 
const Common::Path texts_database () const
 
void set_cd_key (const char *key)
 
const char * cd_key () const
 
bool add_dialog_state (qdGameObjectState *p)
 
const Vect2f & mouse_cursor_pos () const
 
bool is_autosave_slot (int save_slot)
 
void set_auto_save (int save_slot)
 
void set_auto_load (int save_slot)
 
qdFontInfo * find_font_info (int type)
 Поиск шрифтов
 
const qdFontInfo * find_font_info (int type) const
 
const grFont * find_font (int type) const
 
bool set_fade (bool fade_in, float duration)
 
bool write_resource_stats (const char *file_name) const
 
int hall_of_fame_size () const
 
void set_hall_of_fame_size (int size)
 
const char * hall_of_fame_player_name (int place) const
 
void set_hall_of_fame_player_name (int place, const char *name)
 
int hall_of_fame_player_score (int place) const
 
bool is_hall_of_fame_updated (int place) const
 
bool has_hall_of_fame () const
 
bool load_hall_of_fame ()
 
bool save_hall_of_fame () const
 
bool add_hall_of_fame_entry (int score)
 
- Public Member Functions inherited from QDEngine::qdGameDispatcherBase
void set_resources_size (int sz)
 
qdLoadingProgressFnc set_loading_progress_callback (qdLoadingProgressFnc p, void *dp=0)
 
void show_loading_progress (int sz=0)
 
bool add_sound (qdSound *p)
 
bool remove_sound (const char *name)
 
bool remove_sound (qdSound *p)
 
virtual qdSound * get_sound (const char *name)
 
bool is_sound_in_list (const char *name)
 
bool is_sound_in_list (qdSound *p)
 
bool add_animation (qdAnimation *p)
 
bool remove_animation (const char *name)
 
bool remove_animation (qdAnimation *p)
 
virtual qdAnimation * get_animation (const char *name)
 
bool is_animation_in_list (const char *name)
 
bool is_animation_in_list (qdAnimation *p)
 
bool add_animation_set (qdAnimationSet *p)
 
bool remove_animation_set (const char *name)
 
bool remove_animation_set (qdAnimationSet *p)
 
virtual qdAnimationSet * get_animation_set (const char *name)
 
bool is_animation_set_in_list (const char *name)
 
bool is_animation_set_in_list (qdAnimationSet *p)
 
const qdSoundList & sound_list () const
 
const qdAnimationList & animation_list () const
 
const qdAnimationSetList & animation_set_list () const
 
virtual void load_script_body (const xml::tag *p)
 
virtual bool save_script_body (Common::WriteStream &fh, int indent=0) const
 
virtual int load_resources ()
 
void free_resources ()
 
virtual void quant (float dt)
 
void add_scale_info (qdScaleInfo *p)
 
bool get_object_scale (const char *p, float &sc)
 
bool set_object_scale (const char *p, float sc)
 
virtual qdScaleInfo * get_scale_info (const char *p)
 
virtual int get_resources_size ()
 
qdConditionalObject::trigger_start_mode trigger_start ()
 Активация триггера. More...
 
- Public Member Functions inherited from QDEngine::qdConditionalObject
 qdConditionalObject (const qdConditionalObject &obj)
 
qdConditionalObject & operator= (const qdConditionalObject &obj)
 
virtual bool check_conditions ()
 Возвращает true, если условия выполняются. More...
 
int add_condition (const qdCondition *p)
 Добавляет условие. Возвращает поярдковый номер,-1 в случае ошибки.
 
bool update_condition (int num, const qdCondition &p)
 Обновляет условие условие с порядковым номером num.
 
bool remove_conditon (int idx)
 Удаляет условие.
 
const qdCondition * get_condition (int idx=0) const
 Возвращает указатель на условие.
 
int conditions_count () const
 Возвращает количество условий.
 
int add_condition_group (const qdConditionGroup *p)
 Добавляет группу условий. Возвращает поярдковый номер,-1 в случае ошибки.
 
bool update_condition_group (int num, const qdConditionGroup &p)
 Обновляет группу условий с порядковым номером num.
 
bool remove_conditon_group (int idx)
 Удаляет группу условий.
 
const qdConditionGroup * get_condition_group (int idx=0) const
 Возвращает указатель на группу условий.
 
int condition_groups_count () const
 Возвращает количество групп условий.
 
ConditionsMode conditions_mode () const
 Возвращает режим проверки условий.
 
void set_conditions_mode (ConditionsMode m)
 Устанавливает режим проверки условий.
 
bool has_conditions () const
 Возвращает true, если список условий не пустой.
 
void conditions_quant (float dt)
 Обсчет логики условий, dt - время в секундах.
 
virtual bool init ()
 Инициализация объекта, вызывается при старте и перезепуске игры. More...
 
bool load_data (Common::SeekableReadStream &fh, int save_version)
 Загрузка данных из сэйва. More...
 
bool save_data (Common::WriteStream &fh) const
 Запись данных в сэйв. More...
 
bool is_condition_in_group (int condition_idx) const
 
virtual trigger_start_mode trigger_start ()=0
 Активация триггера. More...
 
virtual bool trigger_can_start () const
 Возвращает true, если триггер может быть активирован при выполнении его внутренних условий. More...
 
- 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::qdResourceDispatcher< qdNamedObject >
bool register_resource (qdResource *res, const qdNamedObject *res_owner)
 Регистрация ресурса.
 
bool unregister_resource (qdResource *res, const qdNamedObject *res_owner)
 Отмена регистрации ресурса.
 
bool is_registered (const qdResource *res, const qdNamedObject *res_owner=NULL) const
 Возвращает true, если ресурс res (опционально - с владельцем res_owner) есть в списке.
 
const qdNamedObject * find_owner (const qdResource *res) const
 
void load_resources (const qdNamedObject *owner=NULL) const
 Загружает в память данные для ресурсов.
 
void release_resources (const qdNamedObject *owner=NULL, const qdNamedObject *hold_owner=NULL) const
 Выгружает из памяти данные ресурсов.
 
bool load_resource (qdResource *res, const qdNamedObject *res_owner)
 Загружает в память данные ресурса, если они еще не загружены.
 
bool release_resource (qdResource *res, const qdNamedObject *res_owner)
 Выгружает из памяти данные ресурса, если на него нет больше ссылок.
 
- Public Member Functions inherited from QDEngine::qdFileOwner
void add_to_CD (int cd_number)
 
void remove_from_CD (int cd_number)
 
bool is_on_CD (int cd_number=1) const
 
void clear_cd_info ()
 
uint32 CD_info () const
 
void set_CD_info (uint32 inf)
 

Static Public Member Functions

static void set_dispatcher (qdGameDispatcher *p)
 
static qdGameDispatcher * get_dispatcher ()
 
static grFont * create_font (int font_idx)
 
static void free_font (grFont *fnt)
 

Additional Inherited Members

- Protected Types inherited from QDEngine::qdResourceDispatcher< qdNamedObject >
typedef Std::list< qdResourceHandle< qdNamedObject > > handle_container_t
 
- Protected Member Functions inherited from QDEngine::qdConditionalObject
bool load_conditions_script (const xml::tag *p)
 Загрузка данных из скрипта.
 
bool save_conditions_script (Common::WriteStream &fh, int indent=0) const
 Запись данных в скрипт.
 
- Protected Attributes inherited from QDEngine::qdResourceDispatcher< qdNamedObject >
handle_container_t _handles
 Хэндлы ресурсов.
 

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

Идентификаторы наборов текстов.

Enumerator
TEXT_SET_DIALOGS 

Фразы диалогов, отображаемые в данный момент на экране

Member Function Documentation

◆ named_object_type()

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

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

Implements QDEngine::qdNamedObject.

◆ quant()

void QDEngine::qdGameDispatcher::quant ( float  dt)
virtual

Reimplemented from QDEngine::qdGameDispatcherBase.

◆ add_font_info()

bool QDEngine::qdGameDispatcher::add_font_info ( qdFontInfo *  fi)

Операции со шрифтами

Для создания типов всех добавляемых шрифтов нужно использовать get_unique_font_info_type(). Самостоятельное задание типов шрифтов крайне не рекомендуется - возможны проблемы с уникальностью типов шрифтов и извлечением шрифта по типу.

◆ load_resources()

int QDEngine::qdGameDispatcher::load_resources ( )
virtual

Reimplemented from QDEngine::qdGameDispatcherBase.

◆ get_resources_size()

int QDEngine::qdGameDispatcher::get_resources_size ( )
virtual

Reimplemented from QDEngine::qdGameDispatcherBase.

◆ init()

bool QDEngine::qdGameDispatcher::init ( )
virtual

Инициализация данных, вызывается один раз сразу после загрузки скрипта.

Reimplemented from QDEngine::qdConditionalObject.

◆ get_sound()

qdSound * QDEngine::qdGameDispatcher::get_sound ( const char *  name)
virtual

Reimplemented from QDEngine::qdGameDispatcherBase.

◆ get_animation()

qdAnimation * QDEngine::qdGameDispatcher::get_animation ( const char *  name)
virtual

Reimplemented from QDEngine::qdGameDispatcherBase.

◆ get_animation_set()

qdAnimationSet * QDEngine::qdGameDispatcher::get_animation_set ( const char *  name)
virtual

Reimplemented from QDEngine::qdGameDispatcherBase.

◆ get_scale_info()

qdScaleInfo * QDEngine::qdGameDispatcher::get_scale_info ( const char *  p)
virtual

Reimplemented from QDEngine::qdGameDispatcherBase.

◆ set_startup_scene()

void QDEngine::qdGameDispatcher::set_startup_scene ( const char *  name)
inline

Устанавливает имя стартовой сцены игры.

Передавать NULL, чтобы скинуть установку.


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