Adonthell  0.4
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:
Collaboration diagram for mapsquare_walkable_area:

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

Default constructor.

Definition at line 43 of file mapsquare_walkable.cc.

Destructor.

Definition at line 49 of file mapsquare_walkable.cc.


Member Function Documentation

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:
xX position where to draw.
yY position where to draw.
da_optoptional drawing_area to use during the drawing operation.
targetpointer to the surface where to draw the drawable. If NULL, draw on the screen.

Implements drawable.

Implemented in mapcharacter, and mapobject.

Returns the length of the area.

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

Definition at line 271 of file mapsquare_walkable.h.

Returns the height of the area.

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

Definition at line 282 of file mapsquare_walkable.h.

Returns a pointer to a desired square.

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

Definition at line 296 of file mapsquare_walkable.h.

Resize the area.

Parameters:
nlnew length (in number of squares) of the area.
nhnew height (in number of squares) of the area.

Definition at line 107 of file mapsquare_walkable.cc.

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.

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.

Sets the base square of this object.

Parameters:
nxX offset of the new base square.
nyY offset of the new base square.

Definition at line 119 of file mapsquare_walkable.cc.

Loads an area from an opened file.

Parameters:
filethe 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.

Saves an area into an opened file.

Parameters:
filethe 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.

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: