|
|
| WorldMap (const std::string &filename, Savegame &savegame, const std::string &force_spawnpoint="") |
| |
|
void | finish_construction () |
| |
|
void | setup () |
| |
|
void | leave () |
| |
|
void | draw (DrawingContext &context) |
| |
|
void | update (float dt_sec) |
| |
|
void | process_input (const Controller &controller) |
| |
|
Vector | get_next_tile (const Vector &pos, const Direction &direction) const |
| |
| int | available_directions_at (const Vector &pos) const |
| | gets a bitfield of Tile::WORLDMAP_NORTH | Tile::WORLDMAP_WEST | ... More...
|
| |
|
int | tile_data_at (const Vector &pos) const |
| | returns a bitfield representing the union of all Tile::WORLDMAP_XXX values of all solid tiles at the given position
|
| |
|
size_t | level_count () const |
| |
|
size_t | solved_level_count () const |
| |
|
void | finished_level (Level *level) |
| | gets called from the GameSession when a level has been successfully finished
|
| |
|
Savegame & | get_savegame () const |
| |
| SpawnPoint * | get_spawnpoint_by_name (const std::string &spawnpoint_name) const |
| | Get a spawnpoint by its name. More...
|
| |
|
LevelTile * | at_level () const |
| |
|
SpecialTile * | at_special_tile () const |
| |
|
SpriteChange * | at_sprite_change (const Vector &pos) const |
| |
|
Teleporter * | at_teleporter (const Vector &pos) const |
| |
|
bool | path_ok (const Direction &direction, const Vector &pos, Vector *new_pos) const |
| | Check if it is possible to walk from pos into direction, if possible, write the new position to new_pos.
|
| |
|
void | save_state () |
| | Save worldmap state to squirrel state table.
|
| |
|
void | load_state () |
| | Load worldmap state from squirrel state table.
|
| |
|
const std::string & | get_title () const |
| |
| void | change (const std::string &filename, const std::string &force_spawnpoint="") |
| | switch to another worldmap. More...
|
| |
| void | move_to_spawnpoint (const std::string &spawnpoint, bool pan=false, bool main_as_default=true) |
| | Moves Tux to the given spawnpoint. More...
|
| |
|
void | set_levels_solved (bool solved, bool perfect) |
| | Mark all levels as solved or unsolved.
|
| |
| void | set_initial_fade_tilemap (const std::string &tilemap_name, int direction) |
| | Sets the name of the tilemap that should fade when worldmap is set up. More...
|
| |
|
void | set_initial_spawnpoint (const std::string &spawnpoint_name) |
| | Sets the initial spawnpoint on worldmap setup.
|
| |
|
void | run_script (const std::string &script, const std::string &sourcename) |
| |
|
void | set_passive_message (const std::string &message, float time) |
| |
|
Camera & | get_camera () const |
| |
|
GameObject & | add_object (std::unique_ptr< GameObject > object) |
| | Queue an object up to be added to the object list.
|
| |
|
void | clear_objects () |
| |
|
template<typename T , typename... Args> |
| T & | add (Args &&... args) |
| |
|
void | update (float dt_sec) |
| |
|
void | draw (DrawingContext &context) |
| |
|
const std::vector< std::unique_ptr< GameObject > > & | get_objects () const |
| |
|
void | flush_game_objects () |
| | Commit the queued up additions and deletions to the object list.
|
| |
|
float | get_width () const |
| |
|
float | get_height () const |
| |
|
float | get_tiles_width () const |
| | returns the width (in tiles) of a worldmap
|
| |
|
float | get_tiles_height () const |
| | returns the height (in tiles) of a worldmap
|
| |
|
template<class T > |
| GameObjectRange< T > | get_objects_by_type () const |
| |
|
const std::vector< GameObject * > & | get_objects_by_type_index (std::type_index type_idx) const |
| |
|
template<class T > |
| T & | get_singleton_by_type () const |
| |
|
template<class T > |
| T * | get_object_by_uid (const UID &uid) const |
| |
| void | request_name_resolve (const std::string &name, std::function< void(UID)> callback) |
| | Register a callback to be called once the given name can be resolsed to a UID. More...
|
| |
|
template<class T > |
| T * | get_object_by_name (const std::string &name) const |
| |
|
template<class T > |
| int | get_object_count (std::function< bool(const T &)> predicate=nullptr) const |
| | Get total number of GameObjects of given type.
|
| |
|
const std::vector< TileMap * > & | get_solid_tilemaps () const |
| |