Mouse Class Reference

#include <mouse.h>

Collaboration diagram for Mouse:

Collaboration graph
[legend]
List of all members.

Public Types

enum  Mouse_shapes {
  dontchange = 1000, hand = 0, redx = 1, greenselect = 2,
  tooheavy = 3, outofrange = 4, outofammo = 5, wontfit = 6,
  hourglass = 7, greensquare = 23, blocked = 49
}
enum  Avatar_Speed_Factors { slow_speed_factor = 100, medium_combat_speed_factor = 133, medium_speed_factor = 200, fast_speed_factor = 400 }

Public Member Functions

 Mouse (Game_window *gw)
 Mouse (Game_window *gw, DataSource &shapes)
 ~Mouse ()
void show ()
void hide ()
void set_shape (int framenum)
void set_shape (Mouse_shapes shape)
Mouse_shapes get_shape ()
void move (int x, int y)
void blit_dirty ()
void set_location (int x, int y)
void flash_shape (Mouse_shapes flash)
int get_short_arrow (Direction dir)
int get_medium_arrow (Direction dir)
int get_long_arrow (Direction dir)
int get_short_combat_arrow (Direction dir)
int get_medium_combat_arrow (Direction dir)
unsigned char is_onscreen ()
void set_speed_cursor ()

Public Attributes

int avatar_speed

Static Public Attributes

static bool mouse_update
static Mousemouse

Protected Member Functions

void set_shape0 (int framenum)
void Init ()

Protected Attributes

Shape_file pointers
Game_windowgwin
Image_window8iwin
Image_bufferbackup
Rectangle box
Rectangle dirty
int mousex
int mousey
int cur_framenum
Shape_framecur
unsigned char focus
unsigned char onscreen

Static Protected Attributes

static short short_arrows [8]
static short med_arrows [8]
static short long_arrows [8]
static short short_combat_arrows [8]
static short med_combat_arrows [8]

Detailed Description

Definition at line 35 of file mouse.h.


Member Enumeration Documentation

enum Mouse::Mouse_shapes

Enumerator:
dontchange 
hand 
redx 
greenselect 
tooheavy 
outofrange 
outofammo 
wontfit 
hourglass 
greensquare 
blocked 

Definition at line 59 of file mouse.h.

enum Mouse::Avatar_Speed_Factors

Enumerator:
slow_speed_factor 
medium_combat_speed_factor 
medium_speed_factor 
fast_speed_factor 

Definition at line 92 of file mouse.h.


Constructor & Destructor Documentation

Mouse::Mouse ( Game_window gw  ) 

Definition at line 58 of file mouse.cc.

References east, Game_window::get_fastmouse(), gwin, Init(), is_system_path_defined(), PATCH_POINTERS, POINTERS, and U7exists().

Here is the call graph for this function:

Mouse::Mouse ( Game_window gw,
DataSource shapes 
)

Definition at line 74 of file mouse.cc.

References Game_window::get_fastmouse(), gwin, and Init().

Here is the call graph for this function:

Mouse::~Mouse (  ) 

Definition at line 119 of file mouse.cc.


Member Function Documentation

void Mouse::set_shape0 ( int  framenum  )  [protected]

Definition at line 177 of file mouse.cc.

Referenced by set_shape().

void Mouse::Init (  )  [protected]

Definition at line 87 of file mouse.cc.

References backup, box, Image_window::create_buffer(), Ucscript::frame, Shape::get_frame(), Shape::get_num_frames(), Rectangle::h, iwin, onscreen, pointers, and Rectangle::w.

Here is the call graph for this function:

void Mouse::show (  ) 

Definition at line 130 of file mouse.cc.

Referenced by Gump_manager::do_modal_gump(), Get_click(), MenuList::handle_events(), Handle_events(), SoundTester::test_sound(), Wait_for_arrival(), and Wizard_eye().

void Mouse::hide (  )  [inline]

Definition at line 109 of file mouse.h.

References backup, box, dirty, iwin, onscreen, Image_window::put(), Rectangle::x, and Rectangle::y.

Referenced by Gump_manager::do_modal_gump(), Get_click(), MenuList::handle_events(), Handle_events(), Play(), SoundTester::test_sound(), Wait_for_arrival(), and Wizard_eye().

Here is the call graph for this function:

void Mouse::set_shape ( int  framenum  )  [inline]

Definition at line 118 of file mouse.h.

References cur_framenum, and set_shape0().

Referenced by Gump_manager::do_modal_gump(), exult_main(), Get_click(), set_shape(), set_speed_cursor(), and Wizard_eye().

Here is the call graph for this function:

void Mouse::set_shape ( Mouse_shapes  shape  )  [inline]

Definition at line 123 of file mouse.h.

References set_shape().

Here is the call graph for this function:

Mouse_shapes Mouse::get_shape (  )  [inline]

Definition at line 125 of file mouse.h.

References cur_framenum.

Referenced by Gump_manager::do_modal_gump(), and Get_click().

void Mouse::move ( int  x,
int  y 
)

Definition at line 148 of file mouse.cc.

References Rectangle::add(), box, dirty, Game_window::get_height(), Game_window::get_width(), gwin, mousex, mousey, onscreen, and Rectangle::shift().

Referenced by Get_click(), Handle_event(), MenuList::handle_events(), Gump_manager::handle_modal_gump_event(), Wait_for_arrival(), and Wizard_eye().

Here is the call graph for this function:

void Mouse::blit_dirty (  )  [inline]

Definition at line 128 of file mouse.h.

References dirty, GL_manager::get_instance(), Rectangle::h, iwin, Image_window::show(), Rectangle::w, Rectangle::x, and Rectangle::y.

Referenced by MenuList::handle_events().

Here is the call graph for this function:

void Mouse::set_location ( int  x,
int  y 
)

Definition at line 196 of file mouse.cc.

Referenced by Handle_event().

void Mouse::flash_shape ( Mouse_shapes  flash  ) 

Definition at line 211 of file mouse.cc.

References gwin, Game_window::paint(), Game_window::set_painted(), and Game_window::show().

Referenced by ActionTryKeys(), Spellbook_gump::do_spell(), Game_window::double_clicked(), Dragging_info::drop_on_gump(), Dragging_info::drop_on_map(), Game_window::paused_combat_select(), Dragging_info::start(), and Usecode_internal::UI_flash_mouse().

Here is the call graph for this function:

int Mouse::get_short_arrow ( Direction  dir  )  [inline]

Definition at line 138 of file mouse.h.

References short_arrows.

Referenced by set_speed_cursor().

int Mouse::get_medium_arrow ( Direction  dir  )  [inline]

Definition at line 141 of file mouse.h.

References med_arrows.

Referenced by set_speed_cursor().

int Mouse::get_long_arrow ( Direction  dir  )  [inline]

Definition at line 144 of file mouse.h.

References long_arrows.

Referenced by set_speed_cursor().

int Mouse::get_short_combat_arrow ( Direction  dir  )  [inline]

Definition at line 147 of file mouse.h.

References short_combat_arrows.

Referenced by set_speed_cursor().

int Mouse::get_medium_combat_arrow ( Direction  dir  )  [inline]

Definition at line 150 of file mouse.h.

References med_combat_arrows.

Referenced by set_speed_cursor().

unsigned char Mouse::is_onscreen (  )  [inline]

Definition at line 153 of file mouse.h.

References onscreen.

Referenced by MenuList::handle_events(), Wait_for_arrival(), and Wizard_eye().

void Mouse::set_speed_cursor (  ) 

Definition at line 232 of file mouse.cc.

References avatar_speed, Exult_queue< T >::begin(), c_tilesize, cheat, Schedule::combat, Cheat::combo_pick, dontchange, Exult_queue< T >::end(), fast_speed_factor, Gump_manager::find_gump(), Get_direction(), Game_window::get_dragging_gump(), Cheat::get_edit_mode(), Game_window::get_gump_man(), Game_window::get_instance(), get_long_arrow(), Game_window::get_main_actor(), get_medium_arrow(), get_medium_combat_arrow(), Game_window::get_moving_barge(), Game_window::get_nearby_npcs(), Game_window::get_shape_location(), get_short_arrow(), get_short_combat_arrow(), Game_window::get_std_delay(), Game_window::get_win_rect(), greenselect, Gump_manager::gump_mode(), Gump_manager::gumps_dont_pause_game(), gwin, Rectangle::h, hand, Actor::hostile, Game_window::in_combat(), Cheat::in_god_mode(), Cheat::in_map_editor(), Combat::is_paused(), Game_window::main_actor_dont_move(), med_combat_arrows, medium_combat_speed_factor, medium_speed_factor, mousex, mousey, Cheat::move, Cheat::paint, Cheat::paint_chunks, redx, set_shape(), short_arrows, short_combat_arrows, slow_speed_factor, and Rectangle::w.

Referenced by ActionCombat(), ActionCombatPause(), ActionInventory(), ActionStats(), ActionTarget(), ActionUseFood(), ActionUseItem(), and Handle_event().

Here is the call graph for this function:


Member Data Documentation

Shape_file Mouse::pointers [protected]

Definition at line 38 of file mouse.h.

Referenced by Init().

Game_window* Mouse::gwin [protected]

Definition at line 39 of file mouse.h.

Referenced by move(), and set_speed_cursor().

Image_window8* Mouse::iwin [protected]

Definition at line 40 of file mouse.h.

Referenced by blit_dirty(), hide(), and Init().

Image_buffer* Mouse::backup [protected]

Definition at line 41 of file mouse.h.

Referenced by hide(), and Init().

Rectangle Mouse::box [protected]

Definition at line 42 of file mouse.h.

Referenced by hide(), Init(), and move().

Rectangle Mouse::dirty [protected]

Definition at line 43 of file mouse.h.

Referenced by blit_dirty(), hide(), and move().

int Mouse::mousex [protected]

Definition at line 44 of file mouse.h.

Referenced by move(), and set_speed_cursor().

int Mouse::mousey [protected]

Definition at line 44 of file mouse.h.

Referenced by move(), and set_speed_cursor().

int Mouse::cur_framenum [protected]

Definition at line 45 of file mouse.h.

Referenced by get_shape(), and set_shape().

Shape_frame* Mouse::cur [protected]

Definition at line 46 of file mouse.h.

unsigned char Mouse::focus [protected]

Definition at line 47 of file mouse.h.

unsigned char Mouse::onscreen [protected]

Definition at line 48 of file mouse.h.

Referenced by hide(), Init(), is_onscreen(), and move().

short Mouse::short_arrows [static, protected]

Definition at line 49 of file mouse.h.

Referenced by get_short_arrow(), and set_speed_cursor().

short Mouse::med_arrows [static, protected]

Definition at line 51 of file mouse.h.

Referenced by get_medium_arrow().

short Mouse::long_arrows [static, protected]

Definition at line 52 of file mouse.h.

Referenced by get_long_arrow().

short Mouse::short_combat_arrows [static, protected]

Definition at line 53 of file mouse.h.

Referenced by get_short_combat_arrow(), and set_speed_cursor().

short Mouse::med_combat_arrows [static, protected]

Definition at line 54 of file mouse.h.

Referenced by get_medium_combat_arrow(), and set_speed_cursor().

int Mouse::avatar_speed

Definition at line 99 of file mouse.h.

Referenced by Handle_event(), and set_speed_cursor().

bool Mouse::mouse_update [static]

Definition at line 101 of file mouse.h.

Referenced by Gump_manager::do_modal_gump(), Get_click(), Handle_event(), Handle_events(), Gump_manager::handle_modal_gump_event(), Wait_for_arrival(), and Wizard_eye().

Mouse * Mouse::mouse [static]

Definition at line 102 of file mouse.h.

Referenced by ActionCombat(), ActionCombatPause(), ActionInventory(), ActionStats(), ActionTarget(), ActionTryKeys(), ActionUseFood(), ActionUseItem(), Check_weight(), Gump_manager::do_modal_gump(), Spellbook_gump::do_spell(), Game_window::double_clicked(), Dragging_info::drop_on_gump(), Dragging_info::drop_on_map(), exult_main(), Get_click(), Handle_event(), Handle_events(), Gump_manager::handle_modal_gump_event(), Game_window::paused_combat_select(), Play(), Dragging_info::start(), SoundTester::test_sound(), Usecode_internal::UI_flash_mouse(), Wait_for_arrival(), and Wizard_eye().


The documentation for this class was generated from the following files:
Generated on Mon Jul 9 14:58:46 2007 for ExultEngine by  doxygen 1.5.1