supertux
Public Member Functions | Static Public Attributes | Friends | List of all members
worldmap::WorldMap Class Referencefinal
Inheritance diagram for worldmap::WorldMap:
Inheritance graph
[legend]
Collaboration diagram for worldmap::WorldMap:
Collaboration graph
[legend]

Public Member Functions

 WorldMap (const std::string &filename, Savegame &savegame, const std::string &force_sector="", const std::string &force_spawnpoint="")
 
void setup ()
 
void leave ()
 
void draw (DrawingContext &context)
 
void update (float dt_sec)
 
void process_input (const Controller &controller)
 
size_t level_count () const
 
size_t solved_level_count () const
 
void load_state ()
 Load worldmap state from squirrel state table.
 
void save_state ()
 Save worldmap state to squirrel state table.
 
void change (const std::string &filename, const std::string &force_sector="", const std::string &force_spawnpoint="")
 switch to another worldmap. More...
 
void set_levels_solved (bool solved, bool perfect)
 Mark all levels as solved or unsolved.
 
void set_passive_message (const std::string &message, float time)
 Sets the passive message with specific time.
 
void set_initial_spawnpoint (const std::string &spawnpoint)
 Sets the initial spawnpoint to be forced on next setup.
 
const std::string & get_title () const
 
Savegameget_savegame () const
 
const std::string & get_levels_path () const
 
WorldMapSectorget_sector (const std::string &name) const
 
WorldMapSectorget_sector (int index) const
 
void add_sector (std::unique_ptr< WorldMapSector > sector)
 
WorldMapSectorget_sector () const
 
void set_sector (const std::string &name, const std::string &spawnpoint="", bool perform_full_setup=true)
 
const std::string & get_filename () const
 

Static Public Attributes

static Color s_level_title_color
 
static Color s_message_color
 
static Color s_teleporter_message_color
 

Friends

class WorldMapSector
 
class WorldMapState
 

Additional Inherited Members

- Static Public Member Functions inherited from Currenton< WorldMap >
static WorldMap * current ()
 

Constructor & Destructor Documentation

◆ WorldMap()

worldmap::WorldMap::WorldMap ( const std::string &  filename,
Savegame savegame,
const std::string &  force_sector = "",
const std::string &  force_spawnpoint = "" 
)

Parse worldmap

Force the initial sector, if provided

Member Function Documentation

◆ change()

void worldmap::WorldMap::change ( const std::string &  filename,
const std::string &  force_sector = "",
const std::string &  force_spawnpoint = "" 
)

switch to another worldmap.

filename is relative to data root path

◆ setup()

void worldmap::WorldMap::setup ( )

Force the initial spawnpoint, if provided


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