|
| World (const fs::path &path, std::unique_ptr< tson::IJson > jsonParser=std::make_unique< tson::Json11 >()) |
|
| World (std::unique_ptr< tson::IJson > jsonParser=std::make_unique< tson::Json11 >()) |
|
bool | contains (std::string_view filename) |
|
const WorldMapData * | get (std::string_view filename) const |
|
const fs::path & | getFolder () const |
|
const std::vector< WorldMapData > & | getMapData () const |
|
const std::vector< std::unique_ptr< tson::Map > > & | getMaps () const |
|
const fs::path & | getPath () const |
|
const std::string & | getType () const |
|
std::size_t | loadMaps (tson::Tileson *parser) |
|
bool | onlyShowAdjacentMaps () const |
|
bool | parse (const fs::path &path) |
|
|
void | parseJson (IJson &json) |
|
|
fs::path | m_folder |
|
std::unique_ptr< IJson > | m_json = nullptr |
|
std::vector< WorldMapData > | m_mapData |
|
std::vector< std::unique_ptr< tson::Map > > | m_maps |
|
bool | m_onlyShowAdjacentMaps |
|
fs::path | m_path |
|
std::string | m_type |
|
◆ contains()
bool tson::World::contains |
( |
std::string_view |
filename | ) |
|
|
inline |
Check if there is WorldMapData in the world that contains the current filename. Filename = <file>.<extension>
- Parameters
-
- Returns
◆ get()
const WorldMapData * tson::World::get |
( |
std::string_view |
filename | ) |
const |
|
inline |
Get a map by its filename
- Parameters
-
filename | Filename (including extension) - (example: file.json) |
- Returns
- pointer to WorldMapData or nullptr if not exists
◆ getMaps()
const std::vector< std::unique_ptr< tson::Map > > & tson::World::getMaps |
( |
| ) |
const |
|
inline |
Get all maps that have been loaded by loadMaps(). NOTE: This is untested, and was a last second addition to Tileson 1.2.0, as I had forgot about the loadMaps() functionality (also untested) If you find anything malfunctioning - please report.
- Returns
- All maps loaded by loadMaps()
◆ loadMaps()
Loads the actual maps based on the world data.
- Parameters
-
parser | A Tileson object used for parsing the maps of the world. |
- Returns
- How many maps who were parsed. Remember to call getStatus() for the actual map to find out if everything went okay.
The documentation for this class was generated from the following file: