Mouse. More...
#include <qd_game_object_mouse.h>
Public Types | |
| enum | cursor_ID_t { DEFAULT_CURSOR, OBJECT_CURSOR, ZONE_CURSOR, MAIN_MENU_CURSOR, INGAME_INTERFACE_CURSOR, INVENTORY_OBJECT_CURSOR, MAX_CURSOR_ID } |
| Идентификаторы для курсоров по-умолчанию. More... | |
Public Types inherited from QDEngine::qdGameObjectAnimated | |
| enum | StateStatus { STATE_INACTIVE, STATE_QUEUED, STATE_ACTIVE, STATE_DONE } |
Public Member Functions | |
| qdGameObjectMouse (const qdGameObjectMouse &obj) | |
| qdGameObjectMouse & | operator= (const qdGameObjectMouse &obj) |
| int | named_object_type () const |
| Возвращает тип объекта. | |
| bool | load_script (const xml::tag *p) |
| bool | save_script (Common::WriteStream &fh, int indent=0) const |
| bool | load_data (Common::SeekableReadStream &fh, int save_version) |
| Загрузка данных из сэйва. | |
| bool | save_data (Common::WriteStream &fh) const |
| Запись данных в сэйв. | |
| void | take_object (qdGameObjectAnimated *p) |
| qdGameObjectAnimated * | object () |
| void | set_default_cursor (cursor_ID_t id, int state_index) |
| Установка курсора по-умолчанию. More... | |
| int | default_cursor (cursor_ID_t id) const |
| Возвращает курсор по-умолчанию. | |
| void | set_cursor (cursor_ID_t id) |
| void | set_cursor_state (int state_idx) |
| void | pre_redraw () |
| void | redraw (int offs_x=0, int offs_y=0) const |
| void | post_redraw () |
| void | quant (float dt) |
| bool | update_screen_pos () |
| const Vect2f & | screen_pos_offset () const |
Public Member Functions inherited from QDEngine::qdGameObjectAnimated | |
| qdGameObjectAnimated (const qdGameObjectAnimated &obj) | |
| qdGameObjectAnimated & | operator= (const qdGameObjectAnimated &obj) |
| virtual const Vect3f & | bound (bool perspective_correction=true) const |
| Возвращает баунд объекта. | |
| bool | auto_bound () |
| Устанавливает баунд объекта по текущему состоянию. | |
| virtual float | radius () const |
| Возвращает радиус объекта. | |
| void | set_bound (const Vect3f &b) |
| Устанавливает баунд объекта. | |
| bool | has_bound () const |
| Возвращает true, если у объекта выставлен баунд. | |
| void | draw_bound () const |
| Отрисовка баунда (для отладки). | |
| void | draw_bound (Vect3f r, Vect3f const &bound, int const color) const |
| bool | inters_with_bound (Vect3f bnd, Vect3f cen, bool perspective_correction=true) const |
| Пересекается ли баунд, расположенный в точке с заданным баундом с центром в cen. | |
| int | cur_state () const |
| Возвращает номер текущего состояния объекта. | |
| void | set_cur_state (int st) |
| Устанавливает номер текущего состояния объекта. | |
| int | max_state () const |
| Возвращает количество состояний объекта. | |
| int | get_state_index (const qdGameObjectState *p) const |
| Возвращает номер состояния или -1 если не может такое состояние найти. | |
| void | set_states_owner () |
| Установка владельца состояний. | |
| bool | is_state_active (const char *state_name) const |
| Возвращает true, если состояние с именем state_name активно. | |
| bool | was_state_active (const char *state_name) const |
| Возвращает true, если состояние с именем state_name было активировано. | |
| bool | is_state_active (const qdGameObjectState *p) const |
| Возвращает true, если состояние state активно. | |
| bool | was_state_previous (const char *state_name) const |
| Возвращает true, если состояние с именем state_name было активно перед активным в данный момент состоянием. | |
| bool | was_state_previous (const qdGameObjectState *p) const |
| Возвращает true, если состояние p было активно перед активным в данный момент состоянием. | |
| bool | was_state_active (const qdGameObjectState *p) const |
| Возвращает true, если состояние state было активировано. | |
| bool | is_state_waiting (const qdGameObjectState *p) const |
| bool | is_state_waiting (const char *state_name) const |
| const qdGameObjectStateVector & | state_vector () const |
| Возвращает состояния объекта. | |
| virtual bool | can_change_state (const qdGameObjectState *state=NULL) const |
| Возвращает true, если объект в данный момент может менять состояние. | |
| qdGameObjectState * | get_state (const char *state_name) |
| qdGameObjectState * | get_state (int state_index) |
| qdGameObjectState * | get_cur_state () |
| const qdGameObjectState * | get_state (const char *state_name) const |
| const qdGameObjectState * | get_state (int state_index) const |
| const qdGameObjectState * | get_cur_state () const |
| void | set_queued_state (qdGameObjectState *st) |
| qdGameObjectState * | queued_state () |
| const qdGameObjectState * | queued_state () const |
| void | merge_states (qdGameObjectAnimated *p) |
| void | split_states (qdGameObjectAnimated *p) |
| StateStatus | state_status (const qdGameObjectState *p) const |
| bool | add_state (qdGameObjectState *p) |
| bool | insert_state (int iBefore, qdGameObjectState *p) |
| qdGameObjectState * | remove_state (int state_num) |
| bool | remove_state (qdGameObjectState *p) |
| virtual void | set_state (int st) |
| virtual void | set_state (qdGameObjectState *p) |
| void | restore_state () |
| bool | has_camera_mode () const |
| const qdCameraMode & | camera_mode () const |
| int | num_directions () const |
| Возвращает количество имеющихся у объекта направлений. | |
| const Vect3f & | default_R () const |
| void | set_default_pos (const Vect3f &r) |
| void | set_default_state () |
| virtual qdGameObjectState * | get_default_state () |
| virtual const qdGameObjectState * | get_default_state () const |
| qdGameObjectState * | get_inventory_state () |
| qdGameObjectState * | get_mouse_state () |
| qdGameObjectState * | get_mouse_hover_state () |
| qdAnimation * | get_animation () |
| const qdAnimation * | get_animation () const |
| void | set_animation (qdAnimation *p, const qdAnimationInfo *inf=NULL) |
| void | set_animation_info (qdAnimationInfo *inf) |
| Vect2s | screen_size () const |
| void | set_screen_rotation (float target_angle, float speed) |
| float | screen_rotation () const |
| void | set_screen_scale (const Vect2f &scale, const Vect2f &speed) |
| const Vect2f & | screen_scale () const |
| bool | has_screen_transform () const |
| int | inventory_type () const |
| void | set_inventory_type (int tp) |
| bool | hit (int x, int y) const |
| bool | mouse_handler (int x, int y, mouseDispatcher::mouseEvent ev) |
| bool | handle_state_end () |
| Обработка окончания текущего состояния. | |
| bool | need_redraw () const |
| void | draw_shadow (int offs_x, int offs_y, uint32 color, int alpha) const |
| bool | get_debug_info (Common::String &buf) const |
| Копирует в буфер отладочную информацию для вывода на экран в отладочном режиме. | |
| void | debug_redraw () const |
| void | draw_contour (uint32 color) const |
| void | draw_grid_zone (const Vect2s sz) const |
| int | mouse_cursor_ID () const |
| bool | load_resources () |
| void | free_resources () |
| bool | init () |
| Инициализация объекта, вызывается при старте и перезапуске игры. | |
| bool | is_visible () const |
| const Vect2s & | grid_size () const |
| bool | init_grid_zone () |
| virtual bool | toggle_grid_zone (bool make_walkable=false) |
| bool | save_grid_zone () |
| bool | restore_grid_zone () |
| bool | set_grid_zone_attributes (int attr) const |
| bool | check_grid_zone_attributes (int attr) const |
| bool | drop_grid_zone_attributes (int attr) const |
| bool | set_grid_zone_attributes (const Vect2f &r, int attr) const |
| bool | check_grid_zone_attributes (const Vect2f &r, int attr) const |
| bool | drop_grid_zone_attributes (const Vect2f &r, int attr) const |
| const char * | inventory_name () const |
| void | set_inventory_name (const char *name) |
| bool | has_inventory_name () const |
| const grScreenRegion | last_screen_region () const |
| virtual grScreenRegion | screen_region () const |
| int | inventory_cell_index () const |
| void | set_inventory_cell_index (int idx) |
| int | last_chg_time () const |
| void | set_last_chg_time (int time) |
| int | idle_time () const |
| int | shadow_color () const |
| int | shadow_alpha () const |
| void | set_shadow (uint32 color, int alpha) |
| void | clear_shadow () |
Public Member Functions inherited from QDEngine::qdGameObject | |
| qdGameObject (const qdGameObject &obj) | |
| qdGameObject & | operator= (const qdGameObject &obj) |
| void | set_parallax_offset (int offs_x, int offs_y) |
| const Vect2i & | get_parallax_offset () const |
| const Vect2i & | screen_pos () const |
| float | screen_depth () const |
| const Vect3f & | R () const |
| void | set_pos (const Vect3f &rr) |
| const Vect2i & | get_screen_R () const |
| void | setTempPosInList (uint pos) |
| uint | tempPosInList () const |
| Common::String | flag2str (int flags) 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 |
| Возвращает значение флагов объекта. | |
| 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) |
| Устанавливает имя объекта. | |
Protected Member Functions | |
| bool | load_script_body (const xml::tag *p) |
| bool | save_script_body (Common::WriteStream &fh, int indent=0) const |
Protected Member Functions inherited from QDEngine::qdGameObjectAnimated | |
| void | set_last_state (qdGameObjectState *p) |
| void | set_last_inventory_state (qdGameObjectState *p) |
Protected Member Functions inherited from QDEngine::qdGameObject | |
| void | set_screen_R (const Vect2i &v) |
Mouse.
Идентификаторы для курсоров по-умолчанию.
|
inline |
Установка курсора по-умолчанию.
Номер состояния отсчитывается с нуля.