74 return (mt.y > y || (mt.y == y && mt.x > x));
90 return (mt.y > y || (mt.y == y && mt.x >= x));
105 return (mt.y == y && mt.x == x);
119 list <mapsquare_tile>::iterator base_tile;
165 return (mt.y > y || (mt.y == y && mt.x > x));
178 return (mt.y > y || (mt.y == y && mt.x >= x));
190 return (mt.y == y && mt.x == x);
206 list <mapsquare_char>::iterator base_tile;
343 list <mapsquare_tile> tiles;
349 list <mapsquare_tile>::iterator base_begin;
352 list <mapsquare_char> mapchars;
418 if (area.size ())
return area[0].size ();
432 return &(area[x][y]);
483 mutable vector <vector<mapsquare> > area;
u_int16 x()
Returns the X position of this mapsquare.
~mapsquare_char()
Destructor.
bool is_free()
Returns whether the mapsquare is free for a character to go on or not.
#define u_int16
16 bits long unsigned integer
mapsquare * parent
Parent square for the path.
mapsquare * get_square(u_int16 x, u_int16 y) const
Returns a pointer to a desired square.
Contains informations about the position of an object on a map.
~mapsquare_area()
Destructor.
u_int16 area_length() const
Returns the length of the area.
bool can_use_for_pathfinding
If == false, then this square will never be considered as walkable by pathfinding functions...
Declares the mapsquare_walkable and mapsquare_walkable_area classes.
mapsquare()
Default constructor.
Contains informations about the position of a character on a map.
~mapsquare_tile()
Destructor.
u_int16 g
Distance from the source square.
bool operator==(const mapsquare_tile &mt) const
Compare the location on the landsubmap of two mapsquare_tiles.
mapcharacter * whoshere()
Return a pointer to the mapcharacter that occupies this mapsquare.
u_int16 y()
Returns the Y position of this mapsquare.
Allows you to display a landmap on a specified area of a surface.
Contains information about the walkability of a mapsquare.
mapsquare_area()
Default constructor.
Base unit of a landsubmap, where you can place mapobjects or mapcharacters.
bool operator<(const mapsquare_tile &mt) const
Compare the location on the landsubmap of two mapsquare_tiles.
bool operator<(const mapsquare_char &mt) const
Compare the location on the landsubmap of two mapsquare_chars.
void resize_area(u_int16 nl, u_int16 nh)
Resize the area.
bool operator==(const mapsquare_char &mt) const
Compare the location on the landsubmap of two mapsquare_chars.
Map where the world takes place.
bool operator<=(const mapsquare_char &mt) const
Compare the location on the landsubmap of two mapsquare_chars.
void clear()
Totally clears the area.
u_int16 h
Estimated distance to the goal square.
Representation of characters on a landmap.
mapsquare_char()
Default constructor.
u_int16 area_height() const
Returns the height of the area.
bool operator<=(const mapsquare_tile &mt) const
Compare the location on the landsubmap of two mapsquare_tiles.
#define s_int8
8 bits long signed integer
mapsquare_tile()
Default constructor.
Objects that can be placed on a landmap.
Area of mapsquares, for use with landmap.