mapsquare_walkable_area Class Reference

Area of mapsquare_walkables, for use with mapcharacter and mapobject classes. More...

#include <mapsquare_walkable.h>

Inheritance diagram for mapsquare_walkable_area:

Inheritance graph
[legend]
Collaboration diagram for mapsquare_walkable_area:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 mapsquare_walkable_area ()
 Default constructor.
 ~mapsquare_walkable_area ()
 Destructor.
void clear ()
 Totally clears the area.
virtual void draw (s_int16 x, s_int16 y, const drawing_area *da_opt=NULL, surface *target=NULL) const =0
 Draw the object on the screen.
s_int8 get (igzstream &file)
 Loads an area from an opened file.
s_int8 put (ogzstream &file) const
 Saves an area into an opened file.
mapsquare_walkable_areaoperator= (const mapsquare_walkable_area &mo)
 Area copy (similar to copy ()).
void copy (const mapsquare_walkable_area &src)
 Synonym of operator = to guarantee its access from Python.
Area settings.
u_int16 area_length () const
 Returns the length of the area.
u_int16 area_height () const
 Returns the height of the area.
mapsquare_walkableget_square (u_int16 x, u_int16 y) const
 Returns a pointer to a desired square.
void resize_area (u_int16 nl, u_int16 nh)
 Resize the area.
Base square settings.
u_int16 base_x () const
 Returns the X offset of the base square of this object.
u_int16 base_y () const
 Returns the Y offset of the base square of this object.
void set_base (u_int16 nx, u_int16 ny)
 Sets the base square of this object.


Detailed Description

Area of mapsquare_walkables, for use with mapcharacter and mapobject classes.

Definition at line 235 of file mapsquare_walkable.h.


Constructor & Destructor Documentation

mapsquare_walkable_area::mapsquare_walkable_area (  ) 

Default constructor.

Definition at line 43 of file mapsquare_walkable.cc.

mapsquare_walkable_area::~mapsquare_walkable_area (  ) 

Destructor.

Definition at line 49 of file mapsquare_walkable.cc.


Member Function Documentation

void mapsquare_walkable_area::clear (  ) 

Totally clears the area.

Reimplemented in mapcharacter, and mapobject.

Definition at line 53 of file mapsquare_walkable.cc.

virtual void mapsquare_walkable_area::draw ( s_int16  x,
s_int16  y,
const drawing_area da_opt = NULL,
surface target = NULL 
) const [pure virtual]

Draw the object on the screen.

Parameters:
x X position where to draw.
y Y position where to draw.
da_opt optional drawing_area to use during the drawing operation.
target pointer to the surface where to draw the drawable. If NULL, draw on the screen.

Implements drawable.

Implemented in mapcharacter, and mapobject.

u_int16 mapsquare_walkable_area::area_length (  )  const [inline]

Returns the length of the area.

Returns:
length (in number of squares) of the area.

Definition at line 271 of file mapsquare_walkable.h.

u_int16 mapsquare_walkable_area::area_height (  )  const [inline]

Returns the height of the area.

Returns:
height (in number of squares) of the area.

Definition at line 282 of file mapsquare_walkable.h.

mapsquare_walkable* mapsquare_walkable_area::get_square ( u_int16  x,
u_int16  y 
) const [inline]

Returns a pointer to a desired square.

Parameters:
x X position of the square to get.
y Y position of the square to get.
Returns:
pointer to the (x,y) square.

Definition at line 296 of file mapsquare_walkable.h.

void mapsquare_walkable_area::resize_area ( u_int16  nl,
u_int16  nh 
)

Resize the area.

Parameters:
nl new length (in number of squares) of the area.
nh new height (in number of squares) of the area.

Definition at line 107 of file mapsquare_walkable.cc.

u_int16 mapsquare_walkable_area::base_x (  )  const [inline]

Returns the X offset of the base square of this object.

Returns:
X offset of the base square.

Definition at line 324 of file mapsquare_walkable.h.

u_int16 mapsquare_walkable_area::base_y (  )  const [inline]

Returns the Y offset of the base square of this object.

Returns:
Y offset of the base square.

Definition at line 335 of file mapsquare_walkable.h.

void mapsquare_walkable_area::set_base ( u_int16  nx,
u_int16  ny 
)

Sets the base square of this object.

Parameters:
nx X offset of the new base square.
ny Y offset of the new base square.

Definition at line 119 of file mapsquare_walkable.cc.

s_int8 mapsquare_walkable_area::get ( igzstream file  ) 

Loads an area from an opened file.

Parameters:
file the opened file from which to load.
Returns:
0 in case of success, error code otherwise.

Reimplemented in mapcharacter, and mapobject.

Definition at line 61 of file mapsquare_walkable.cc.

s_int8 mapsquare_walkable_area::put ( ogzstream file  )  const

Saves an area into an opened file.

Parameters:
file the opened file where to write.
Returns:
0 in case of success, error code otherwise.

Reimplemented in mapcharacter, and mapobject.

Definition at line 86 of file mapsquare_walkable.cc.

mapsquare_walkable_area & mapsquare_walkable_area::operator= ( const mapsquare_walkable_area mo  ) 

Area copy (similar to copy ()).

Attention:
Not available from Python. Use copy () from Python instead.
See also:
copy ()

Definition at line 125 of file mapsquare_walkable.cc.

void mapsquare_walkable_area::copy ( const mapsquare_walkable_area src  )  [inline]

Synonym of operator = to guarantee its access from Python.

See also:
operator =

Definition at line 381 of file mapsquare_walkable.h.


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

Generated on Thu Jun 26 02:08:11 2008 for Adonthell by  doxygen 1.5.6