#include <World.hpp>
◆ World() [1/2]
tson::World::World |
( |
std::unique_ptr< tson::IJson > |
jsonParser | ) |
|
|
inlineexplicit |
◆ World() [2/2]
tson::World::World |
( |
const fs::path & |
path, |
|
|
std::unique_ptr< tson::IJson > |
jsonParser |
|
) |
| |
|
inlineexplicit |
◆ 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
◆ getFolder()
const fs::path & tson::World::getFolder |
( |
| ) |
const |
|
inline |
◆ getMapData()
const std::vector< WorldMapData > & tson::World::getMapData |
( |
| ) |
const |
|
inline |
◆ 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()
◆ getPath()
const fs::path & tson::World::getPath |
( |
| ) |
const |
|
inline |
◆ getType()
const std::string & tson::World::getType |
( |
| ) |
const |
|
inline |
◆ 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.
◆ onlyShowAdjacentMaps()
bool tson::World::onlyShowAdjacentMaps |
( |
| ) |
const |
|
inline |
◆ parse()
bool tson::World::parse |
( |
const fs::path & |
path | ) |
|
|
inline |
The documentation for this class was generated from the following files: