143 return currentsubmap_;
209 return (tpx < m_map->submap[currentsubmap_]->area_length () *
MAPSQUARE_SIZE);
221 return (posx_ || offx_);
233 return (posy_ || offy_);
246 return (tpy < m_map->submap[currentsubmap_]->area_height () *
MAPSQUARE_SIZE);
323 void set_schedule (
string file, PyObject * args = NULL);
333 return schedule_file_;
353 list<mapsquare_tile>::iterator it)
const;
356 surface * target, list<mapsquare_char>::iterator itc)
const;
358 surface * target, list<mapcharacter *>::iterator itc)
const;
374 PyObject * schedule_args;
376 string schedule_file_;
Class to write data from a Gzip compressed file.
u_int16 offy() const
Returns the Y offset of the mapview.
#define s_int32
32 bits long signed integer
u_int16 height() const
Returns the height of the drawable.
Class to read data from a Gzip compressed file.
s_int8 get_state(igzstream &file)
State saving/loading.
bool can_scroll_down()
Returns whether it is possible to scroll to down.
bool can_scroll_up()
Returns whether it is possible to scroll to up.
bool update()
Updates the mapview's state and launchs his schedule.
#define u_int16
16 bits long unsigned integer
void draw(s_int16 x, s_int16 y, const drawing_area *da_opt=NULL, surface *target=NULL) const
Draw the object on the screen.
u_int16 length() const
Returns the length of the drawable.
Class where drawables can actually be drawn to.
string schedule_file()
Returns the name of the mapview's current schedule.
void detach_map()
Stops displaying a map.
void scroll_left()
Scrolls 1 pixel to left, if possible.
void scroll_down()
Scrolls 1 pixel to down, if possible.
Declares the landmap class.
void scroll_up()
Scrolls 1 pixel to up, if possible.
bool can_scroll_right()
Basic movment.
u_int16 posx() const
Returns the X position of the mapview.
Allows you to display a landmap on a specified area of a surface.
Implements "drawing zones" for drawing operations.
void scroll_right()
Scrolls 1 pixel to right, if possible.
u_int16 offx() const
Returns the X offset of the mapview.
#define s_int16
16 bits long signed integer
Defines the python class. This file is named this way so it doesn't conflicts with Python...
Map where the world takes place.
u_int16 currentsubmap()
Position information.
void set_schedule(string file, PyObject *args=NULL)
Assign a schedule to the mapview.
const u_int16 MAPSQUARE_SIZE
Size of a mapsquare (in pixels).
bool can_scroll_left()
Returns whether it is possible to scroll to left.
void resize(u_int16 l, u_int16 h)
Resize the mapview.
s_int8 set_pos(u_int16 sm, u_int16 x, u_int16 y, s_int16 ox=0, s_int16 oy=0)
Position settings.
Abstract class for drawable objects manipulation.
u_int16 posy() const
Returns the Y position of the mapview.
void attach_map(landmap *m)
Attach/Detach a map.
mapview()
Default constructor.
s_int8 center_on(u_int16 sm, u_int16 x, u_int16 y, s_int16 ox=0, s_int16 oy=0)
Sets the position of the center of the mapview on the map.
#define s_int8
8 bits long signed integer
s_int8 put_state(ogzstream &file)
Saves the mapview's state into an opened file.