Go to the documentation of this file.
37 #define MAPS_DIR "maps/"
100 return submap.size ();
109 return mapchar.size ();
354 string srcfile =
"");
385 vector <mapcharacter *> mapchar;
386 vector <mapobject *> mobj;
387 vector <string> mobjsrc;
388 vector <mapsquare_area *> submap;
Declares the mapcharacter class.
s_int8 delete_mapobject(u_int16 pos)
Delete a mapobject from a landmap.
Class to read data from a Gzip compressed file.
mapobject * get_mapobject(u_int16 pos)
Returns a pointer to a mapobject belonging to this landmap.
s_int8 put_state(ogzstream &file) const
Saves the landmap's state into an opened file.
Map where the world takes place.
u_int16 nbr_of_submaps() const
Get the number of landsubmaps that the map owns.
Base class for objects that want to register events.
s_int8 get(igzstream &file)
Load a map from an opened file.
s_int8 put(ogzstream &file) const
Put a map into an opened file.
Class to write data from a Gzip compressed file.
string filename() const
Get the filename of the map, i.e the file from which it has been loaded (if any).
s_int8 get_state(igzstream &file)
Restore the landmap's state from an opened file.
s_int8 insert_submap(u_int16 pos)
Inserts an empty landsubmap into the landmap.
landmap()
Default constructor.
s_int8 load(string fname)
Load a map from a filename.
s_int8 insert_mapobject(mapobject *an, u_int16 pos, string srcfile="")
Adds a mapobject to a landmap.
#define s_int8
8 bits long signed integer
Area of mapsquares, for use with landmap.
u_int16 nbr_of_mapobjects() const
Get the number of mapobjects that the map owns.
void update()
Update the entire map (mapcharacters, mapobjects, etc...
u_int16 nbr_of_mapcharacters() const
Get the number of mapcharacters that are on this map.
Representation of characters on a landmap.
#define u_int16
16 bits long unsigned integer
mapsquare_area * get_submap(u_int16 pos)
Returns a pointer to a submap belonging to this landmap.
Objects that can be placed on a landmap.
void clear()
Cleanup the map.
Declares the mapobject class.
s_int8 delete_submap(u_int16 pos)
Remove a landsubmap from the landmap.
void remove_mapobject(u_int16 smap, u_int16 px, u_int16 py, u_int16 mobjnbr)
Remove a mapobject from the map.
s_int8 put_mapobject(u_int16 smap, u_int16 px, u_int16 py, u_int16 mobjnbr)
Put a mapobject on the map.
Allows you to display a landmap on a specified area of a surface.
s_int8 save(string fname)
Save a map into a file.
mapcharacter * get_mapcharacter(u_int16 pos)
Returns a pointer to a mapcharacter on this landmap.