Barge_object Class Reference

#include <barge.h>

Inheritance diagram for Barge_object:

Inheritance graph
[legend]
Collaboration diagram for Barge_object:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Barge_object (int shapenum, int framenum, unsigned int shapex, unsigned int shapey, unsigned int lft, int xt, int yt, int d)
Rectangle get_tile_footprint ()
bool is_moving ()
int get_xtiles ()
int get_ytiles ()
Tile_coord get_center ()
virtual ~Barge_object ()
void set_to_gather ()
void gather ()
void face_direction (int ndir)
void travel_to_tile (Tile_coord dest, int speed)
void turn_right ()
void turn_left ()
void turn_around ()
void stop ()
void done ()
int okay_to_land ()
virtual Barge_objectas_barge ()
virtual void handle_event (unsigned long curtime, long udata)
virtual void move (int newtx, int newty, int newlift)
virtual void remove (Game_object *obj)
virtual bool add (Game_object *obj, bool dont_check=false, bool combine=false)
virtual int drop (Game_object *obj)
virtual void paint ()
virtual int step (Tile_coord t, int frame=-1)
virtual void write_ireg (DataSource *out)
virtual int get_ireg_size ()
virtual void elements_read ()

Private Member Functions

Game_objectget_object (int i)
void swap_dims ()
void set_center ()
int okay_to_rotate (Tile_coord pos)
void add_dirty ()
void finish_move (Tile_coord *positions)

Private Attributes

Game_object_vector objects
int perm_count
unsigned char xtiles
unsigned char ytiles
unsigned char dir
bool complete
bool gathered
bool ice_raft
bool first_step
signed char boat
int frame_time
PathFinderpath
Tile_coord center

Detailed Description

Definition at line 35 of file barge.h.


Constructor & Destructor Documentation

Barge_object::Barge_object ( int  shapenum,
int  framenum,
unsigned int  shapex,
unsigned int  shapey,
unsigned int  lft,
int  xt,
int  yt,
int  d 
) [inline]

Definition at line 60 of file barge.h.

Barge_object::~Barge_object (  )  [virtual]

Definition at line 257 of file barge.cc.


Member Function Documentation

Game_object* Barge_object::get_object ( int  i  )  [inline, private]

Definition at line 51 of file barge.h.

References objects.

Referenced by get_ireg_size().

void Barge_object::swap_dims (  )  [inline, private]

Definition at line 169 of file barge.cc.

void Barge_object::set_center (  )  [inline, private]

Definition at line 197 of file barge.cc.

References c_num_tiles.

int Barge_object::okay_to_rotate ( Tile_coord  pos  )  [private]

Definition at line 211 of file barge.cc.

References Rectangle::h, Map_chunk::is_blocked(), MOVE_ALL_TERRAIN, MOVE_LEVITATE, Tile_coord::tx, Tile_coord::ty, Rectangle::w, Rectangle::x, and Rectangle::y.

Here is the call graph for this function:

void Barge_object::add_dirty (  )  [private]

Definition at line 342 of file barge.cc.

References Game_window::add_dirty(), c_tilesize, Game_window::clip_to_win(), Rectangle::enlarge(), Game_window::get_shape_location(), gwin, Rectangle::h, Rectangle::w, Rectangle::x, and Rectangle::y.

Here is the call graph for this function:

void Barge_object::finish_move ( Tile_coord positions  )  [private]

Definition at line 364 of file barge.cc.

References gwin, Exult_server::obj, and Game_window::scroll_if_needed().

Here is the call graph for this function:

Rectangle Barge_object::get_tile_footprint (  ) 

Definition at line 182 of file barge.cc.

References c_num_tiles, Tile_coord::tx, and Tile_coord::ty.

Referenced by Get_barge(), and Usecode_internal::UI_on_barge().

bool Barge_object::is_moving (  )  [inline]

Definition at line 71 of file barge.h.

References frame_time.

int Barge_object::get_xtiles (  )  [inline]

Definition at line 73 of file barge.h.

References xtiles.

int Barge_object::get_ytiles (  )  [inline]

Definition at line 75 of file barge.h.

References ytiles.

Tile_coord Barge_object::get_center (  )  [inline]

Definition at line 77 of file barge.h.

References center.

void Barge_object::set_to_gather (  )  [inline]

Definition at line 80 of file barge.h.

References gathered.

Referenced by Usecode_internal::call_usecode(), and Dragging_info::drop().

void Barge_object::gather (  ) 

Definition at line 269 of file barge.cc.

References c_tiles_per_chunk, Map_chunk::get_flat(), Game::get_game_type(), ShapeID::get_info(), Chunk_intersect_iterator::get_next(), Rectangle::has_point(), Exult_server::info, ShapeID::is_invalid(), Exult_server::obj, SERPENT_ISLE, Tile_coord::tx, Tile_coord::ty, Tile_coord::tz, Rectangle::x, and Rectangle::y.

Referenced by Game_window::set_moving_barge().

Here is the call graph for this function:

void Barge_object::face_direction ( int  ndir  ) 

Definition at line 387 of file barge.cc.

Referenced by Usecode_internal::UI_set_barge_dir().

void Barge_object::travel_to_tile ( Tile_coord  dest,
int  speed 
)

Definition at line 413 of file barge.cc.

References Time_queue::add(), Tile_coord::delta(), Get_direction4(), Game::get_ticks(), Game_window::get_tqueue(), gwin, Tile_coord::tx, and Tile_coord::ty.

Here is the call graph for this function:

void Barge_object::turn_right (  ) 

Definition at line 443 of file barge.cc.

References Ucscript::frame, gwin, Exult_server::info, Ireg_game_object::move(), Exult_server::obj, Rotate90r(), Tile_coord::tx, Tile_coord::ty, and Tile_coord::tz.

Here is the call graph for this function:

void Barge_object::turn_left (  ) 

Definition at line 477 of file barge.cc.

References Ucscript::frame, gwin, Exult_server::info, Ireg_game_object::move(), Exult_server::obj, Rotate90l(), Tile_coord::tx, Tile_coord::ty, and Tile_coord::tz.

Here is the call graph for this function:

void Barge_object::turn_around (  ) 

Definition at line 511 of file barge.cc.

References Ucscript::frame, gwin, Exult_server::info, Ireg_game_object::move(), Exult_server::obj, Rotate180(), Tile_coord::tx, Tile_coord::ty, and Tile_coord::tz.

Here is the call graph for this function:

void Barge_object::stop (  )  [inline]

Definition at line 89 of file barge.h.

References first_step, and frame_time.

void Barge_object::done (  ) 

Definition at line 542 of file barge.cc.

References Exult_server::obj.

Referenced by Usecode_internal::UI_on_barge().

int Barge_object::okay_to_land (  ) 

Definition at line 572 of file barge.cc.

References Chunk_intersect_iterator::get_next(), Rectangle::h, Rectangle::w, Rectangle::x, and Rectangle::y.

Referenced by Usecode_internal::UI_get_item_flag().

Here is the call graph for this function:

virtual Barge_object* Barge_object::as_barge (  )  [inline, virtual]

Reimplemented from Game_object.

Definition at line 93 of file barge.h.

Referenced by Get_barge().

void Barge_object::handle_event ( unsigned long  curtime,
long  udata 
) [virtual]

Implements Time_sensitive.

Definition at line 598 of file barge.cc.

References Time_queue::add(), Game_window::get_moving_barge(), Game_window::get_tqueue(), gwin, and Ucscript::step.

Here is the call graph for this function:

void Barge_object::move ( int  newtx,
int  newty,
int  newlift 
) [virtual]

Reimplemented from Ireg_game_object.

Definition at line 622 of file barge.cc.

References c_num_tiles, Ucscript::frame, Ireg_game_object::move(), Exult_server::obj, Tile_coord::tx, Tile_coord::ty, and Tile_coord::tz.

Here is the call graph for this function:

void Barge_object::remove ( Game_object obj  )  [virtual]

Reimplemented from Container_game_object.

Definition at line 673 of file barge.cc.

References Exult_server::obj.

bool Barge_object::add ( Game_object obj,
bool  dont_check = false,
bool  combine = false 
) [virtual]

Reimplemented from Container_game_object.

Definition at line 688 of file barge.cc.

References Exult_server::obj.

int Barge_object::drop ( Game_object obj  )  [virtual]

Reimplemented from Container_game_object.

Definition at line 706 of file barge.cc.

void Barge_object::paint (  )  [virtual]

Reimplemented from Ireg_game_object.

Definition at line 718 of file barge.cc.

References gwin, Ireg_game_object::paint(), and Game_window::paint_eggs.

Here is the call graph for this function:

int Barge_object::step ( Tile_coord  t,
int  frame = -1 
) [virtual]

Reimplemented from Game_object.

Definition at line 735 of file barge.cc.

References Map_chunk::activate_eggs(), c_tiles_per_schunk, Game::get_game_type(), Game_window::get_main_actor(), gwin, Map_chunk::is_blocked(), MOVE_LEVITATE, MOVE_SWIM, MOVE_WALK, SERPENT_ISLE, Tile_coord::tx, Tile_coord::ty, and Tile_coord::tz.

Here is the call graph for this function:

void Barge_object::write_ireg ( DataSource out  )  [virtual]

Reimplemented from Container_game_object.

Definition at line 780 of file barge.cc.

References Game_window::get_moving_barge(), gwin, Exult_server::obj, DataSource::write(), DataSource::write1(), and Game_map::write_scheduled().

Here is the call graph for this function:

int Barge_object::get_ireg_size (  )  [virtual]

Reimplemented from Container_game_object.

Definition at line 813 of file barge.cc.

References Usecode_script::find(), Game_window::get_moving_barge(), get_object(), Game_singletons::gwin, Exult_server::obj, perm_count, and size.

Here is the call graph for this function:

void Barge_object::elements_read (  )  [virtual]

Reimplemented from Game_object.

Definition at line 841 of file barge.cc.


Member Data Documentation

Game_object_vector Barge_object::objects [private]

Reimplemented from Container_game_object.

Definition at line 37 of file barge.h.

Referenced by get_object().

int Barge_object::perm_count [private]

Definition at line 38 of file barge.h.

Referenced by get_ireg_size().

unsigned char Barge_object::xtiles [private]

Definition at line 40 of file barge.h.

Referenced by get_xtiles().

unsigned char Barge_object::ytiles [private]

Definition at line 40 of file barge.h.

Referenced by get_ytiles().

unsigned char Barge_object::dir [private]

Definition at line 41 of file barge.h.

bool Barge_object::complete [private]

Definition at line 42 of file barge.h.

bool Barge_object::gathered [private]

Definition at line 43 of file barge.h.

Referenced by set_to_gather().

bool Barge_object::ice_raft [private]

Definition at line 44 of file barge.h.

bool Barge_object::first_step [private]

Definition at line 45 of file barge.h.

Referenced by stop().

signed char Barge_object::boat [private]

Definition at line 46 of file barge.h.

int Barge_object::frame_time [private]

Definition at line 47 of file barge.h.

Referenced by is_moving(), and stop().

PathFinder* Barge_object::path [private]

Definition at line 49 of file barge.h.

Tile_coord Barge_object::center [private]

Definition at line 50 of file barge.h.

Referenced by get_center().


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