Peoplemon  0.1.0
Peoplemon 3 game source documentation
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | Friends | List of all members
editor::component::EditMap Class Reference

Wrapper over the core::Map class that is directly usable in a bl::gui::GUI. More...

#include <EditMap.hpp>

+ Inheritance diagram for editor::component::EditMap:

Classes

class  AddCatchRegionAction
 
class  AddEventAction
 
class  AddNpcSpawnAction
 
class  AddOrEditItemAction
 
class  AddSpawnAction
 
class  AddTownAction
 
class  AppendLayerAction
 
class  AppendLevelAction
 
class  EditCatchRegionAction
 
class  EditEventAction
 
class  EditNpcSpawnAction
 
class  EditTownAction
 
class  FillCatchAction
 
class  FillCollisionAction
 
class  FillTileAction
 
class  FillTownTileAction
 
class  RemoveCatchRegionAction
 
class  RemoveEventAction
 
class  RemoveItemAction
 
class  RemoveLayerAction
 
class  RemoveLightAction
 
class  RemoveNpcSpawnAction
 
class  RemoveSpawnAction
 
class  RemoveTownAction
 
class  RotateSpawnAction
 
class  SetAmbientLightAction
 
class  SetCatchAction
 
class  SetCatchAreaAction
 
class  SetCollisionAction
 
class  SetCollisionAreaAction
 
class  SetLevelTileAction
 
class  SetLevelTileAreaAction
 
class  SetLightAction
 
class  SetNameAction
 
class  SetPlaylistAction
 
class  SetScriptAction
 
class  SetTileAction
 
class  SetTileAreaAction
 
class  SetTownTileAction
 
class  SetTownTileAreaAction
 
class  SetWeatherAction
 
class  ShiftLayerAction
 
class  ShiftLevelAction
 

Public Types

enum class  RenderOverlay {
  None , Collisions , CatchTiles , Towns ,
  Events , Spawns , LevelTransitions
}
 Optional render overlays depending on editor state. More...
 
typedef std::shared_ptr< EditMapPtr
 Pointer to an EditMap. More...
 
using PositionCb = std::function< void(const sf::Vector2f &pixels, const sf::Vector2i &tiles)>
 Called when the map is clicked. More...
 
using ActionCb = std::function< void()>
 Called on various event types. More...
 

Public Member Functions

virtual ~EditMap ()
 Destroy the Edit Map object. More...
 
bool unsavedChanges () const
 Returns whether or not the map has been updated since last being saved. More...
 
const std::string & currentFile () const
 Returns the current file the map is saving to. More...
 
void newMap (const std::string &filename, const std::string &name, const std::string &tileset, unsigned int width, unsigned int height)
 Clears the current map and creates a new map with the given parameters. More...
 
bool editorLoad (const std::string &filename)
 Loads the map contents from the given file. More...
 
bool editorSave ()
 Saves the map to the file it was loaded from or created with. More...
 
const char * undoDescription () const
 Returns the description of what action will be undone if undo is called. More...
 
void undo ()
 Undoes the previous action in the edit history. More...
 
const char * redoDescription () const
 Returns the description of what action will be redone if redo is called. More...
 
void redo ()
 Reapplies the next action in the edit history. More...
 
void setControlsEnabled (bool enabled)
 Enables or disables the map camera and click controls. More...
 
void setLevelVisible (unsigned int level, bool visible)
 Shows or hides the given level. More...
 
void setLayerVisible (unsigned int level, unsigned int layer, bool visible)
 Shows or hides the given layer. More...
 
void setRenderOverlay (RenderOverlay overlay, unsigned int level)
 Sets which overlay gets rendered on top of the map. More...
 
void showGrid (bool show)
 Set whether or not to render a grid between tiles. More...
 
void showSelection (const sf::IntRect &selection)
 Sets the tile selection to render. Set width or height to 0 to hide. Set width or height to negative values to show a single tile in blue (partial selection) More...
 
void removeAllTiles (core::map::Tile::IdType id, bool isAnim)
 Removes all tiles that reference the given id in the tileset. This should be called before removing a tile from the tileset. More...
 
void resize (unsigned int width, unsigned int height, bool modLeft, bool modTop)
 
void setName (const std::string &name)
 Set the name of the map. More...
 
void setPlaylist (const std::string &playlist)
 Sets the playlist of the map. More...
 
void setWeather (core::map::Weather::Type weather)
 Set the weather in the map. More...
 
void setOnEnterScript (const std::string &script)
 Set the OnEnter script. More...
 
const std::string & getOnEnterScript () const
 Get the OnEnter script. More...
 
void setOnExitScript (const std::string &script)
 Set the OnExit script. More...
 
const std::string & getOnExitScript () const
 Get the OnExit script. More...
 
void setAmbientLight (std::uint8_t lower, std::uint8_t upper, bool sunlight)
 Set the maps default ambient light settings. More...
 
void appendLevel ()
 Creates a new level. More...
 
void shiftLevel (unsigned int level, bool up)
 Shifts the given level up or down. More...
 
void removeLevel (unsigned int level)
 Removes the given level. More...
 
void appendBottomLayer (unsigned int level)
 Creates a new (empty) bottom layer. More...
 
void appendYsortLayer (unsigned int level)
 Creates a new (empty) y-sort layer. More...
 
void appendTopLayer (unsigned int level)
 Creates a new (empty) top layer. More...
 
void shiftLayer (unsigned int level, unsigned int layer, bool up)
 Shifts a layer up or down in the render order. This will also move layers between bottom, y-sort, and top buckets. More...
 
void removeLayer (unsigned int level, unsigned int layer)
 Deletes the given layer. More...
 
void setTile (unsigned int level, unsigned int layer, const sf::Vector2i &position, core::map::Tile::IdType id, bool isAnim)
 Sets a single tile. More...
 
void setTileArea (unsigned int level, unsigned int layer, const sf::IntRect &area, core::map::Tile::IdType id, bool isAnim)
 Sets a range of tiles to a given value. Tries to avoid overcrowding for large tiles. More...
 
void fillTile (unsigned int level, unsigned int layer, const sf::Vector2i &position, core::map::Tile::IdType id, bool isAnim)
 Performs a bucket fill of tiles starting from the given position. More...
 
void setCollision (unsigned int level, const sf::Vector2i &position, core::map::Collision id)
 Sets a single collision tile. More...
 
void setCollisionArea (unsigned int level, const sf::IntRect &area, core::map::Collision id)
 Sets a range of collision tiles to a single value. More...
 
void fillCollision (unsigned int level, const sf::Vector2i &position, core::map::Collision id)
 Performs a bucket fill of collisions from the given starting position. More...
 
void setCatch (unsigned int level, const sf::Vector2i &position, std::uint8_t id)
 Sets a single catch tile. More...
 
void setCatchArea (unsigned int level, const sf::IntRect &area, std::uint8_t id)
 Sets a range of catch tiles to a single value. More...
 
void fillCatch (unsigned int level, const sf::Vector2i &position, std::uint8_t id)
 Performs a bucket fill of catch tiles from the given position. More...
 
bool spawnIdUnused (unsigned int id) const
 Tells whether or not the given id is in use. More...
 
void addSpawn (unsigned int level, const sf::Vector2i &tile, unsigned int id, bl::tmap::Direction dir)
 Adds a new player spawn to the map. More...
 
void rotateSpawn (unsigned int level, const sf::Vector2i &tile)
 Rotates a player spawn. More...
 
void removeSpawn (unsigned int level, const sf::Vector2i &position)
 Removes the spawn at the given position. More...
 
void addNpcSpawn (const core::map::CharacterSpawn &spawn)
 Adds a character spawn to the map. More...
 
const core::map::CharacterSpawngetNpcSpawn (unsigned int level, const sf::Vector2i &position) const
 Get the Npc Spawn at the given position, if any. More...
 
void editNpcSpawn (const core::map::CharacterSpawn *orig, const core::map::CharacterSpawn &spawn)
 Edits an existing character spawn. More...
 
void removeNpcSpawn (const core::map::CharacterSpawn *spawn)
 Removes a character spawn. More...
 
std::pair< core::item::Id, bool > getItem (unsigned int level, const sf::Vector2i &position)
 Returns spawn info the item at the given position, if any. More...
 
void addOrEditItem (unsigned int level, const sf::Vector2i &position, core::item::Id item, bool visible)
 Spawns or modifies an item at the given position and level. More...
 
void removeItem (unsigned int level, const sf::Vector2i &position)
 Removes the item from the given position if one is present. More...
 
void setLight (const sf::Vector2i &positionPixels, unsigned int radius)
 Spawn or modify the light near the given position to the new size. More...
 
void removeLight (const sf::Vector2i &positionPixels)
 Removes the light near the given position if one is there. More...
 
void createEvent (const core::map::Event &event)
 Creates a new map event. More...
 
const core::map::EventgetEvent (const sf::Vector2i &position)
 Returns a pointer to an event that overlaps the given position. More...
 
void editEvent (const core::map::Event *orig, const core::map::Event &event)
 Alters the value of the given event. More...
 
void removeEvent (const core::map::Event *event)
 Deletes the given event. More...
 
void addCatchRegion ()
 Adds a new catch region to the map. More...
 
const std::vector< core::map::CatchRegion > & catchRegions () const
 Returns a reference to all catch regions. More...
 
void editCatchRegion (std::uint8_t index, const core::map::CatchRegion &zone)
 Modifies the catch region at the given index. More...
 
void removeCatchRegion (std::uint8_t index)
 Removes the catch region at the given index. More...
 
void addTown ()
 Adds a town. More...
 
void editTown (std::uint8_t i, const core::map::Town &town)
 Modifies an existing town. More...
 
void removeTown (std::uint8_t i)
 Removes a town. More...
 
void setTownTile (const sf::Vector2i &position, std::uint8_t id)
 Sets the town tile at the given position. More...
 
void setTownTileArea (const sf::IntRect &area, std::uint8_t id)
 Sets a region of town tiles to the given town. More...
 
void fillTownTiles (const sf::Vector2i &position, std::uint8_t id)
 Performs a bucket fill of town tiles from the given position. More...
 
void setLevelTile (const sf::Vector2i &position, core::map::LevelTransition lt)
 Sets the given level tile. More...
 
void setLevelTileArea (const sf::IntRect &area, core::map::LevelTransition lt)
 Sets a selection of level tiles. More...
 
void staticRender (const RenderMapWindow &params)
 Renders the map contents. More...
 
bool loadDev (std::istream &input)
 Loads the map from the given file. Will try to determine if the extension or path need to be added in order to support how map names used to be entered. Loads the json format. More...
 
bool loadProd (bl::serial::binary::InputStream &input)
 Loads the map from the given file. Will try to determine if the extension or path need to be added in order to support how map names used to be entered. Loads the binary format. More...
 
bool save (const std::string &file)
 Saves the map to the given file. The path should be relative to the maps directory and include the .map extension. More...
 
bool saveBundle (bl::serial::binary::OutputStream &output, bl::resource::bundle::FileHandlerContext &ctx) const
 Saves the data from this object to the given bundle and registers dependency files. More...
 
bool enter (system::Systems &systems, std::uint16_t spawnId, const std::string &prevMap, const bl::tmap::Position &prevPlayerPos)
 Initializes runtime data structures and spawns entities into the game. Also runs the on-load script. More...
 
void exit (system::Systems &systems, const std::string &newMap)
 Removes spawned entities and runs the on-unload script. More...
 
void setupCamera (system::Systems &systems)
 Configures the game camera for the player in the map. More...
 
const std::string & name () const
 Returns the name of the map. More...
 
Weather & weatherSystem ()
 Returns a reference to the weather system in this map. More...
 
LightingSystem & lightingSystem ()
 Returns a reference to the lighting system in this map. More...
 
const sf::Vector2i & sizeTiles () const
 Returns the size of the map in tiles. More...
 
sf::Vector2f sizePixels () const
 Returns the size of the map in pixels. More...
 
std::uint8_t levelCount () const
 Returns the number of levels in the map. More...
 
bool contains (const bl::tmap::Position &position) const
 Returns whether or not the map contains the given position. More...
 
bl::tmap::Position adjacentTile (const bl::tmap::Position &pos, bl::tmap::Direction dir) const
 Returns the adjacent position to the given position when moving in the given direction. Does not take into account collisions. More...
 
bool movePossible (const bl::tmap::Position &position, bl::tmap::Direction dir) const
 Returns whether or not a particular movement is possible. Does not take into account entities blocking the way. More...
 
bool isLedgeHop (const bl::tmap::Position &position, bl::tmap::Direction dir) const
 Test whether the given movement will be a ledge hop or not. More...
 
virtual void observe (const event::EntityMoved &moveEvent) override
 Event listener for moving entities. Used to trigger map events. More...
 
bool interact (bl::ecs::Entity interactor, const bl::tmap::Position &interactPos)
 Lets entities interact with the map itself. This is called by the Interaction system. More...
 
const CatchRegion * getCatchRegion (const bl::tmap::Position &position) const
 Returns the catch region at the given position if the position is on a catch tile. More...
 
bool canFlyFromHere () const
 Returns whether or not the player can fly from this map. More...
 
const bl::tmap::Position * getSpawnPosition (unsigned int spawnId) const
 Returns the position of the given player spawn, or nullptr if not found. More...
 
const std::string & getLocationName (const bl::tmap::Position &pos) const
 Returns the name of the town or route at the given position. More...
 
float getDepthForPosition (unsigned int level, unsigned int y, int layer=-1) const
 Computes the depth to use at the given y position, taking into account the map size, layer count, and layer types. More...
 
float getMinDepth () const
 Returns the maximum depth possible for this map. Maximum is always 0.f. Minimum is negative, so 'higher' positions will have lower depths than deeper positions. More...
 
bl::rc::SceneRef getScene ()
 Returns the scene for this map. More...
 
bl::rc::lgt::Scene2DLighting & getSceneLighting ()
 Returns the scene lighting for this map. Only valid after enter() is called. More...
 
void setupEntityPosition (bl::ecs::Entity entity)
 Performs the final setup of the position components for the given entity. Must already have a bl::tmap::Position and bl::com::Transform2D component. More...
 

Static Public Member Functions

static Ptr create (const PositionCb &clickCb, const PositionCb &moveCb, const ActionCb &actionCb, const ActionCb &syncCb, core::system::Systems &systems)
 Creates a new EditMap. More...
 
static std::string getMapFile (const std::string &partialFile)
 Returns the full path to the map file from the given partial file. Accounts for missing extension. More...
 
static const std::vector< Town > & FlyMapTowns ()
 Returns the set of towns that can be flown to. More...
 

Protected Member Functions

void clear ()
 
void finishLoad ()
 
void triggerAnimation (const bl::tmap::Position &position)
 
Town * getTown (const glm::i32vec2 &pos)
 
void enterTown (Town *town)
 
void prepareRender ()
 
void cleanupRender ()
 
void setupLevel (unsigned int level)
 
void setupLayer (unsigned int level, unsigned int layer)
 
void setupTile (unsigned int level, unsigned int layer, const sf::Vector2u &pos)
 

Static Protected Member Functions

static void loadFlymapTowns ()
 

Protected Attributes

std::string nameField
 
std::string loadScriptField
 
std::string unloadScriptField
 
std::string playlistField
 
Weather::Type weatherField
 
std::vector< LayerSet > levels
 
std::string tilesetField
 
std::unordered_map< std::uint16_t, Spawn > spawns
 
std::vector< CharacterSpawn > characterField
 
std::vector< Item > itemsField
 
std::vector< Event > eventsField
 
LightingSystem lighting
 
std::vector< CatchRegion > catchRegionsField
 
bl::ctr::Vector2D< LevelTransition > transitionField
 
std::vector< Town > towns
 
bl::ctr::Vector2D< std::uint8_t > townTiles
 
system::Systems * systems
 
Town defaultTown
 
Town * currentTown
 
sf::Vector2i size
 
bl::resource::Ref< Tileset > tileset
 
Weather weather
 
std::unique_ptr< bl::script::Script > onEnterScript
 
std::unique_ptr< bl::script::Script > onExitScript
 
bl::ctr::Grid< const Event * > eventRegions
 
bool isWorldMap
 
bl::audio::AudioSystem::Handle playlistHandle
 
bool activated
 
bl::rc::SceneRef scene
 
std::list< RenderLevel > renderLevels
 

Static Protected Attributes

static std::vector< Town > flymapTowns
 

Friends

class page::Map
 
class page::Towns
 
class rdr::EditMapComponent
 

Detailed Description

Wrapper over the core::Map class that is directly usable in a bl::gui::GUI.

Definition at line 26 of file EditMap.hpp.

Member Typedef Documentation

◆ ActionCb

using editor::component::EditMap::ActionCb = std::function<void()>

Called on various event types.

Definition at line 37 of file EditMap.hpp.

◆ PositionCb

using editor::component::EditMap::PositionCb = std::function<void(const sf::Vector2f& pixels, const sf::Vector2i& tiles)>

Called when the map is clicked.

Definition at line 34 of file EditMap.hpp.

◆ Ptr

typedef std::shared_ptr<EditMap> editor::component::EditMap::Ptr

Pointer to an EditMap.

Definition at line 31 of file EditMap.hpp.

Member Enumeration Documentation

◆ RenderOverlay

Optional render overlays depending on editor state.

Enumerator
None 

No extra overlay.

Collisions 

Renders collisions for the current level.

CatchTiles 

Renders catch tiles for the current level.

Towns 

Renders colored tiles to indicate towns/routes.

Events 

Renders events in the map.

Spawns 

Renders spawns in the map.

LevelTransitions 

Renders level transitions.

Definition at line 42 of file EditMap.hpp.

Constructor & Destructor Documentation

◆ ~EditMap()

editor::component::EditMap::~EditMap ( )
virtual

Destroy the Edit Map object.

Definition at line 119 of file EditMap.cpp.

Member Function Documentation

◆ addCatchRegion()

void editor::component::EditMap::addCatchRegion ( )

Adds a new catch region to the map.

Definition at line 849 of file EditMap.cpp.

◆ addNpcSpawn()

void editor::component::EditMap::addNpcSpawn ( const core::map::CharacterSpawn spawn)

Adds a character spawn to the map.

Parameters
spawnThe spawn to add

Definition at line 665 of file EditMap.cpp.

◆ addOrEditItem()

void editor::component::EditMap::addOrEditItem ( unsigned int  level,
const sf::Vector2i &  position,
core::item::Id  item,
bool  visible 
)

Spawns or modifies an item at the given position and level.

Parameters
levelThe level for the item to be on
positionThe position to spawn at
itemThe item to spawn
visibleTrue if the item should be visible, false for hidden

Definition at line 798 of file EditMap.cpp.

◆ addSpawn()

void editor::component::EditMap::addSpawn ( unsigned int  level,
const sf::Vector2i &  tile,
unsigned int  id,
bl::tmap::Direction  dir 
)

Adds a new player spawn to the map.

Parameters
levelThe level to place the spawn on
tileThe position the spawn is at
idThe id of the spawn
dirThe direction of the spawn

Definition at line 638 of file EditMap.cpp.

◆ addTown()

void editor::component::EditMap::addTown ( )

Adds a town.

Definition at line 867 of file EditMap.cpp.

◆ adjacentTile()

bl::tmap::Position core::map::Map::adjacentTile ( const bl::tmap::Position &  pos,
bl::tmap::Direction  dir 
) const
inherited

Returns the adjacent position to the given position when moving in the given direction. Does not take into account collisions.

Parameters
posThe position that is being moved from
dirThe direction that the movement is going
Returns
bl::tmap::Position The adjacent tile with level transition if any

Definition at line 276 of file Map.cpp.

◆ appendBottomLayer()

void editor::component::EditMap::appendBottomLayer ( unsigned int  level)

Creates a new (empty) bottom layer.

Parameters
levelThe level to create the layer on

Definition at line 598 of file EditMap.cpp.

◆ appendLevel()

void editor::component::EditMap::appendLevel ( )

Creates a new level.

Definition at line 622 of file EditMap.cpp.

◆ appendTopLayer()

void editor::component::EditMap::appendTopLayer ( unsigned int  level)

Creates a new (empty) top layer.

Parameters
levelThe level to create the layer on

Definition at line 606 of file EditMap.cpp.

◆ appendYsortLayer()

void editor::component::EditMap::appendYsortLayer ( unsigned int  level)

Creates a new (empty) y-sort layer.

Parameters
levelThe level to create the layer on

Definition at line 602 of file EditMap.cpp.

◆ canFlyFromHere()

bool core::map::Map::canFlyFromHere ( ) const
inherited

Returns whether or not the player can fly from this map.

Definition at line 603 of file Map.cpp.

◆ catchRegions()

const std::vector< core::map::CatchRegion > & editor::component::EditMap::catchRegions ( ) const

Returns a reference to all catch regions.

Definition at line 851 of file EditMap.cpp.

◆ cleanupRender()

void core::map::Map::cleanupRender ( )
protectedinherited

Definition at line 779 of file Map.cpp.

◆ clear()

void core::map::Map::clear ( )
protectedinherited

Definition at line 523 of file Map.cpp.

◆ contains()

bool core::map::Map::contains ( const bl::tmap::Position &  position) const
inherited

Returns whether or not the map contains the given position.

Parameters
positionThe position to check for
Returns
True if the position is within the map, false if not

Definition at line 271 of file Map.cpp.

◆ create()

EditMap::Ptr editor::component::EditMap::create ( const PositionCb clickCb,
const PositionCb moveCb,
const ActionCb actionCb,
const ActionCb syncCb,
core::system::Systems systems 
)
static

Creates a new EditMap.

Parameters
clickCbCalled when the map is clicked
moveCbCalled when the mouse is moved over a tile
actionCbCalled when editor actions are performed
syncCbCalled when map data has changed and the GUI should update
systemsThe primary systems object
Returns
Ptr The new EditMap

Definition at line 55 of file EditMap.cpp.

◆ createEvent()

void editor::component::EditMap::createEvent ( const core::map::Event event)

Creates a new map event.

Parameters
eventThe event to create

Definition at line 774 of file EditMap.cpp.

◆ currentFile()

const std::string & editor::component::EditMap::currentFile ( ) const

Returns the current file the map is saving to.

Definition at line 143 of file EditMap.cpp.

◆ editCatchRegion()

void editor::component::EditMap::editCatchRegion ( std::uint8_t  index,
const core::map::CatchRegion zone 
)

Modifies the catch region at the given index.

Parameters
indexThe index to modify
zoneThe new value

Definition at line 855 of file EditMap.cpp.

◆ editEvent()

void editor::component::EditMap::editEvent ( const core::map::Event orig,
const core::map::Event event 
)

Alters the value of the given event.

Parameters
origPointer to the event to update
eventNew value to set

Definition at line 786 of file EditMap.cpp.

◆ editNpcSpawn()

void editor::component::EditMap::editNpcSpawn ( const core::map::CharacterSpawn orig,
const core::map::CharacterSpawn spawn 
)

Edits an existing character spawn.

Parameters
origThe address of the existing spawn
spawnThe new spawn value

Definition at line 680 of file EditMap.cpp.

◆ editorLoad()

bool editor::component::EditMap::editorLoad ( const std::string &  filename)

Loads the map contents from the given file.

Parameters
filenameThe map file to load from
Returns
True if loaded without error, false on error

Definition at line 126 of file EditMap.cpp.

◆ editorSave()

bool editor::component::EditMap::editorSave ( )

Saves the map to the file it was loaded from or created with.

Returns
True on success, false on error

Definition at line 135 of file EditMap.cpp.

◆ editTown()

void editor::component::EditMap::editTown ( std::uint8_t  i,
const core::map::Town town 
)

Modifies an existing town.

Parameters
iIndex of the town to modify
townThe new town value

Definition at line 869 of file EditMap.cpp.

◆ enter()

bool core::map::Map::enter ( system::Systems systems,
std::uint16_t  spawnId,
const std::string &  prevMap,
const bl::tmap::Position &  prevPlayerPos 
)
inherited

Initializes runtime data structures and spawns entities into the game. Also runs the on-load script.

Parameters
systemsThe primary game systems
spawnIdThe spawn to place the player at
prevMapThe name of the map coming from
prevPlayerPosUsed to spawn the player when coming back from a map or loading save
Returns
True on success, false on error

Definition at line 32 of file Map.cpp.

◆ enterTown()

void core::map::Map::enterTown ( Town town)
protectedinherited

Definition at line 549 of file Map.cpp.

◆ exit()

void core::map::Map::exit ( system::Systems systems,
const std::string &  newMap 
)
inherited

Removes spawned entities and runs the on-unload script.

Parameters
systemsThe primary game systems
newMapThe name of the map going to

Definition at line 136 of file Map.cpp.

◆ fillCatch()

void editor::component::EditMap::fillCatch ( unsigned int  level,
const sf::Vector2i &  position,
std::uint8_t  id 
)

Performs a bucket fill of catch tiles from the given position.

Parameters
levelThe level to fill
positionThe position to fill from
idThe id to fill with

Definition at line 594 of file EditMap.cpp.

◆ fillCollision()

void editor::component::EditMap::fillCollision ( unsigned int  level,
const sf::Vector2i &  position,
core::map::Collision  id 
)

Performs a bucket fill of collisions from the given starting position.

Parameters
levelThe level to fill on
positionThe position to fill from
idThe collision to fill with

Definition at line 582 of file EditMap.cpp.

◆ fillTile()

void editor::component::EditMap::fillTile ( unsigned int  level,
unsigned int  layer,
const sf::Vector2i &  position,
core::map::Tile::IdType  id,
bool  isAnim 
)

Performs a bucket fill of tiles starting from the given position.

Parameters
levelThe level to fill on
layerThe layer to fill on
positionThe position to fill from
idThe tile to fill with
isAnimTrue to fill with animations, false with sprites

Definition at line 568 of file EditMap.cpp.

◆ fillTownTiles()

void editor::component::EditMap::fillTownTiles ( const sf::Vector2i &  position,
std::uint8_t  id 
)

Performs a bucket fill of town tiles from the given position.

Parameters
positionThe position to fill from
idThe town to fill with

Definition at line 883 of file EditMap.cpp.

◆ finishLoad()

void core::map::Map::finishLoad ( )
protectedinherited

Definition at line 215 of file Map.cpp.

◆ FlyMapTowns()

const std::vector< Town > & core::map::Map::FlyMapTowns ( )
staticinherited

Returns the set of towns that can be flown to.

Definition at line 587 of file Map.cpp.

◆ getCatchRegion()

const CatchRegion * core::map::Map::getCatchRegion ( const bl::tmap::Position &  position) const
inherited

Returns the catch region at the given position if the position is on a catch tile.

Parameters
positionThe position to search
Returns
CatchRegion* The catch region if on a catch tile and a region is there, or nullptr

Definition at line 567 of file Map.cpp.

◆ getDepthForPosition()

float core::map::Map::getDepthForPosition ( unsigned int  level,
unsigned int  y,
int  layer = -1 
) const
inherited

Computes the depth to use at the given y position, taking into account the map size, layer count, and layer types.

Parameters
levelThe level of the position to compute the depth for
yThe y coordinate of the position to compute the depth for
layerThe index of the layer to compute the depth for. -1 is for entities
Returns
The depth to use for the given position, both for tiles and entities

Definition at line 741 of file Map.cpp.

◆ getEvent()

const core::map::Event * editor::component::EditMap::getEvent ( const sf::Vector2i &  position)

Returns a pointer to an event that overlaps the given position.

Parameters
positionThe position to search
Returns
const core::map::Event* Pointer to event or nullptr if none overlap

Definition at line 778 of file EditMap.cpp.

◆ getItem()

std::pair< core::item::Id, bool > editor::component::EditMap::getItem ( unsigned int  level,
const sf::Vector2i &  position 
)

Returns spawn info the item at the given position, if any.

Parameters
levelThe level to search
positionThe position to check
Returns
std::pair<core::item::Id, bool> The item id and hidden state. Unknown if none

Definition at line 815 of file EditMap.cpp.

◆ getLocationName()

const std::string & core::map::Map::getLocationName ( const bl::tmap::Position &  pos) const
inherited

Returns the name of the town or route at the given position.

Parameters
posThe position to check for
Returns
const std::string& The name of the town, route, or map of the position

Definition at line 610 of file Map.cpp.

◆ getMapFile()

std::string core::map::Map::getMapFile ( const std::string &  partialFile)
staticinherited

Returns the full path to the map file from the given partial file. Accounts for missing extension.

Parameters
partialFile
Returns
std::string

Definition at line 191 of file Map.cpp.

◆ getMinDepth()

float core::map::Map::getMinDepth ( ) const
inherited

Returns the maximum depth possible for this map. Maximum is always 0.f. Minimum is negative, so 'higher' positions will have lower depths than deeper positions.

Definition at line 775 of file Map.cpp.

◆ getNpcSpawn()

const core::map::CharacterSpawn * editor::component::EditMap::getNpcSpawn ( unsigned int  level,
const sf::Vector2i &  position 
) const

Get the Npc Spawn at the given position, if any.

Parameters
Thelevel the spawn is on
positionThe position to get the spawn at
Returns
const core::map::CharacterSpawn* The spawn or nullptr if none

Definition at line 669 of file EditMap.cpp.

◆ getOnEnterScript()

const std::string & editor::component::EditMap::getOnEnterScript ( ) const

Get the OnEnter script.

Definition at line 628 of file EditMap.cpp.

◆ getOnExitScript()

const std::string & editor::component::EditMap::getOnExitScript ( ) const

Get the OnExit script.

Definition at line 634 of file EditMap.cpp.

◆ getScene()

bl::rc::SceneRef core::map::Map::getScene ( )
inlineinherited

Returns the scene for this map.

Definition at line 280 of file Map.hpp.

◆ getSceneLighting()

bl::rc::lgt::Scene2DLighting& core::map::Map::getSceneLighting ( )
inlineinherited

Returns the scene lighting for this map. Only valid after enter() is called.

Definition at line 285 of file Map.hpp.

◆ getSpawnPosition()

const bl::tmap::Position * core::map::Map::getSpawnPosition ( unsigned int  spawnId) const
inherited

Returns the position of the given player spawn, or nullptr if not found.

Parameters
spawnIdId of the spawn to get the position for
Returns
const bl::tmap::Position* Pointer to the position to spawn at. May be nullptr

Definition at line 605 of file Map.cpp.

◆ getTown()

Town * core::map::Map::getTown ( const glm::i32vec2 &  pos)
protectedinherited

Definition at line 541 of file Map.cpp.

◆ interact()

bool core::map::Map::interact ( bl::ecs::Entity  interactor,
const bl::tmap::Position &  interactPos 
)
inherited

Lets entities interact with the map itself. This is called by the Interaction system.

Parameters
interactorThe entity doing the interact
interactPosThe position being interacted with

Definition at line 454 of file Map.cpp.

◆ isLedgeHop()

bool core::map::Map::isLedgeHop ( const bl::tmap::Position &  position,
bl::tmap::Direction  dir 
) const
inherited

Test whether the given movement will be a ledge hop or not.

Parameters
positionThe current position being moved away from
dirThe direction being moved in
Returns
True if the move is a ledge hop, false otherwise

Definition at line 378 of file Map.cpp.

◆ levelCount()

std::uint8_t core::map::Map::levelCount ( ) const
inherited

Returns the number of levels in the map.

Definition at line 180 of file Map.cpp.

◆ lightingSystem()

LightingSystem & core::map::Map::lightingSystem ( )
inherited

Returns a reference to the lighting system in this map.

Definition at line 184 of file Map.cpp.

◆ loadDev()

bool core::map::Map::loadDev ( std::istream &  input)
inherited

Loads the map from the given file. Will try to determine if the extension or path need to be added in order to support how map names used to be entered. Loads the json format.

Parameters
inputStream to load the map from
Returns
True if the map was able to be loaded, false on error

Definition at line 203 of file Map.cpp.

◆ loadFlymapTowns()

void core::map::Map::loadFlymapTowns ( )
staticprotectedinherited

Definition at line 592 of file Map.cpp.

◆ loadProd()

bool core::map::Map::loadProd ( bl::serial::binary::InputStream &  input)
inherited

Loads the map from the given file. Will try to determine if the extension or path need to be added in order to support how map names used to be entered. Loads the binary format.

Parameters
inputStream to load the map from
Returns
True if the map was able to be loaded, false on error

Definition at line 209 of file Map.cpp.

◆ movePossible()

bool core::map::Map::movePossible ( const bl::tmap::Position &  position,
bl::tmap::Direction  dir 
) const
inherited

Returns whether or not a particular movement is possible. Does not take into account entities blocking the way.

Parameters
positionThe position being moved from
dirThe direction to move in
Returns
True if the move is allowed, false if it is not

Definition at line 329 of file Map.cpp.

◆ name()

const std::string & core::map::Map::name ( ) const
inherited

Returns the name of the map.

Definition at line 171 of file Map.cpp.

◆ newMap()

void editor::component::EditMap::newMap ( const std::string &  filename,
const std::string &  name,
const std::string &  tileset,
unsigned int  width,
unsigned int  height 
)

Clears the current map and creates a new map with the given parameters.

Parameters
filenameThe file to save the map into
nameThe name of the map
tilesetThe tileset to use
widthThe width of the map in tiles
heightThe height of the map in tiles

Definition at line 145 of file EditMap.cpp.

◆ observe()

void core::map::Map::observe ( const event::EntityMoved moveEvent)
overridevirtualinherited

Event listener for moving entities. Used to trigger map events.

Parameters
moveEventThe move event

Definition at line 385 of file Map.cpp.

◆ prepareRender()

void core::map::Map::prepareRender ( )
protectedinherited

Definition at line 614 of file Map.cpp.

◆ redo()

void editor::component::EditMap::redo ( )

Reapplies the next action in the edit history.

Definition at line 524 of file EditMap.cpp.

◆ redoDescription()

const char * editor::component::EditMap::redoDescription ( ) const

Returns the description of what action will be redone if redo is called.

Definition at line 532 of file EditMap.cpp.

◆ removeAllTiles()

void editor::component::EditMap::removeAllTiles ( core::map::Tile::IdType  id,
bool  isAnim 
)

Removes all tiles that reference the given id in the tileset. This should be called before removing a tile from the tileset.

Parameters
idThe id of the tile in the tileset
isAnimTrue for an animation, false for a regular tile

Definition at line 392 of file EditMap.cpp.

◆ removeCatchRegion()

void editor::component::EditMap::removeCatchRegion ( std::uint8_t  index)

Removes the catch region at the given index.

Parameters
indexThe catch region to remove

Definition at line 859 of file EditMap.cpp.

◆ removeEvent()

void editor::component::EditMap::removeEvent ( const core::map::Event event)

Deletes the given event.

Parameters
eventPointer to the event to delete

Definition at line 792 of file EditMap.cpp.

◆ removeItem()

void editor::component::EditMap::removeItem ( unsigned int  level,
const sf::Vector2i &  position 
)

Removes the item from the given position if one is present.

Parameters
levelThe level to search
positionThe position to clear

Definition at line 824 of file EditMap.cpp.

◆ removeLayer()

void editor::component::EditMap::removeLayer ( unsigned int  level,
unsigned int  layer 
)

Deletes the given layer.

Parameters
levelThe level the layer is on
layerIndex of the layer to remove

Definition at line 610 of file EditMap.cpp.

◆ removeLevel()

void editor::component::EditMap::removeLevel ( unsigned int  level)

Removes the given level.

Parameters
levelThe level to remove

◆ removeLight()

void editor::component::EditMap::removeLight ( const sf::Vector2i &  positionPixels)

Removes the light near the given position if one is there.

Parameters
positionPixelsThe position of the light to remove, in pixels

Definition at line 842 of file EditMap.cpp.

◆ removeNpcSpawn()

void editor::component::EditMap::removeNpcSpawn ( const core::map::CharacterSpawn spawn)

Removes a character spawn.

Parameters
spawnThe address of the spawn to remove

Definition at line 692 of file EditMap.cpp.

◆ removeSpawn()

void editor::component::EditMap::removeSpawn ( unsigned int  level,
const sf::Vector2i &  position 
)

Removes the spawn at the given position.

Parameters
levelThe level the spawn is on
positionThe position the spawn is at

Definition at line 654 of file EditMap.cpp.

◆ removeTown()

void editor::component::EditMap::removeTown ( std::uint8_t  i)

Removes a town.

Parameters
iIndex of the town to remove

Definition at line 873 of file EditMap.cpp.

◆ resize()

void editor::component::EditMap::resize ( unsigned int  width,
unsigned int  height,
bool  modLeft,
bool  modTop 
)

◆ rotateSpawn()

void editor::component::EditMap::rotateSpawn ( unsigned int  level,
const sf::Vector2i &  tile 
)

Rotates a player spawn.

Parameters
levelThe level the spawn is on
tileThe position the spawn is at

Definition at line 643 of file EditMap.cpp.

◆ save()

bool core::map::Map::save ( const std::string &  file)
inherited

Saves the map to the given file. The path should be relative to the maps directory and include the .map extension.

Parameters
fileThe file to save to
Returns
True if saved successfully, false on error

Definition at line 229 of file Map.cpp.

◆ saveBundle()

bool core::map::Map::saveBundle ( bl::serial::binary::OutputStream &  output,
bl::resource::bundle::FileHandlerContext &  ctx 
) const
inherited

Saves the data from this object to the given bundle and registers dependency files.

Parameters
outputStream to output to
ctxContext to register dependencies with
Returns
True if serialization succeeded, false otherwise

Definition at line 246 of file Map.cpp.

◆ setAmbientLight()

void editor::component::EditMap::setAmbientLight ( std::uint8_t  lower,
std::uint8_t  upper,
bool  sunlight 
)

Set the maps default ambient light settings.

Parameters
lowerThe lower light level at night
upperThe upper light level during the day (or always if no sunlight)
sunlightTrue to adjust between lower and upper for time of day, false for upper only

Definition at line 863 of file EditMap.cpp.

◆ setCatch()

void editor::component::EditMap::setCatch ( unsigned int  level,
const sf::Vector2i &  position,
std::uint8_t  id 
)

Sets a single catch tile.

Parameters
levelThe level to modify
positionThe position of the catch to set
idThe new catch value

Definition at line 586 of file EditMap.cpp.

◆ setCatchArea()

void editor::component::EditMap::setCatchArea ( unsigned int  level,
const sf::IntRect &  area,
std::uint8_t  id 
)

Sets a range of catch tiles to a single value.

Parameters
levelThe level to modify
areaThe region to set
idThe value to set all tiles to

Definition at line 590 of file EditMap.cpp.

◆ setCollision()

void editor::component::EditMap::setCollision ( unsigned int  level,
const sf::Vector2i &  position,
core::map::Collision  id 
)

Sets a single collision tile.

Parameters
levelThe level to modify
positionThe position of the collision to set
idThe new collision value

Definition at line 573 of file EditMap.cpp.

◆ setCollisionArea()

void editor::component::EditMap::setCollisionArea ( unsigned int  level,
const sf::IntRect &  area,
core::map::Collision  id 
)

Sets a range of collision tiles to a single value.

Parameters
levelThe level to modify
areaThe region to set
idThe value to set all tiles to

Definition at line 577 of file EditMap.cpp.

◆ setControlsEnabled()

void editor::component::EditMap::setControlsEnabled ( bool  enabled)

Enables or disables the map camera and click controls.

Definition at line 292 of file EditMap.cpp.

◆ setLayerVisible()

void editor::component::EditMap::setLayerVisible ( unsigned int  level,
unsigned int  layer,
bool  visible 
)

Shows or hides the given layer.

Parameters
levelThe level the layer is on
layerThe index of the layer to show or hide
visibleTrue to render, false to hide

Definition at line 313 of file EditMap.cpp.

◆ setLevelTile()

void editor::component::EditMap::setLevelTile ( const sf::Vector2i &  position,
core::map::LevelTransition  lt 
)

Sets the given level tile.

Parameters
positionThe position to set
ltThe level transition to occur on that tile

Definition at line 887 of file EditMap.cpp.

◆ setLevelTileArea()

void editor::component::EditMap::setLevelTileArea ( const sf::IntRect &  area,
core::map::LevelTransition  lt 
)

Sets a selection of level tiles.

Parameters
areaThe region to update
ltThe level transition to populate the region with

Definition at line 891 of file EditMap.cpp.

◆ setLevelVisible()

void editor::component::EditMap::setLevelVisible ( unsigned int  level,
bool  visible 
)

Shows or hides the given level.

Parameters
levelThe level to show or hide
visibleTrue to render, false to hide

Definition at line 297 of file EditMap.cpp.

◆ setLight()

void editor::component::EditMap::setLight ( const sf::Vector2i &  positionPixels,
unsigned int  radius 
)

Spawn or modify the light near the given position to the new size.

Parameters
positionPixelsThe light radius in pixels
radiusThe position of the light in pixels

Definition at line 835 of file EditMap.cpp.

◆ setName()

void editor::component::EditMap::setName ( const std::string &  name)

Set the name of the map.

Parameters
nameThe new name of the map

Definition at line 548 of file EditMap.cpp.

◆ setOnEnterScript()

void editor::component::EditMap::setOnEnterScript ( const std::string &  script)

Set the OnEnter script.

Parameters
scriptThe script to run when the map is entered

Definition at line 624 of file EditMap.cpp.

◆ setOnExitScript()

void editor::component::EditMap::setOnExitScript ( const std::string &  script)

Set the OnExit script.

Parameters
scriptThe script to run when the map is left

Definition at line 630 of file EditMap.cpp.

◆ setPlaylist()

void editor::component::EditMap::setPlaylist ( const std::string &  playlist)

Sets the playlist of the map.

Parameters
playlistPath to the playlist to set

Definition at line 550 of file EditMap.cpp.

◆ setRenderOverlay()

void editor::component::EditMap::setRenderOverlay ( RenderOverlay  overlay,
unsigned int  level 
)

Sets which overlay gets rendered on top of the map.

Parameters
overlayThe overlay to render
levelWhich level to source the overlay from

Definition at line 337 of file EditMap.cpp.

◆ setTile()

void editor::component::EditMap::setTile ( unsigned int  level,
unsigned int  layer,
const sf::Vector2i &  position,
core::map::Tile::IdType  id,
bool  isAnim 
)

Sets a single tile.

Parameters
levelThe level to modify
layerThe layer to modify
positionThe position of the tile to modify
idThe new tile id
isAnimTrue for animation, false for texture

Definition at line 558 of file EditMap.cpp.

◆ setTileArea()

void editor::component::EditMap::setTileArea ( unsigned int  level,
unsigned int  layer,
const sf::IntRect &  area,
core::map::Tile::IdType  id,
bool  isAnim 
)

Sets a range of tiles to a given value. Tries to avoid overcrowding for large tiles.

Parameters
levelThe level to modify
layerThe layer to modify
areaRegion of tiles to set
idNew tile id
isAnimTrue for animation, false for texture

Definition at line 563 of file EditMap.cpp.

◆ setTownTile()

void editor::component::EditMap::setTownTile ( const sf::Vector2i &  position,
std::uint8_t  id 
)

Sets the town tile at the given position.

Parameters
positionThe position of the tile to set
idThe id of the town to set to

Definition at line 875 of file EditMap.cpp.

◆ setTownTileArea()

void editor::component::EditMap::setTownTileArea ( const sf::IntRect &  area,
std::uint8_t  id 
)

Sets a region of town tiles to the given town.

Parameters
areaThe region to fill
idThe town to fill with

Definition at line 879 of file EditMap.cpp.

◆ setupCamera()

void core::map::Map::setupCamera ( system::Systems systems)
inherited

Configures the game camera for the player in the map.

Parameters
systemsThe main game systems

Definition at line 160 of file Map.cpp.

◆ setupEntityPosition()

void core::map::Map::setupEntityPosition ( bl::ecs::Entity  entity)
inherited

Performs the final setup of the position components for the given entity. Must already have a bl::tmap::Position and bl::com::Transform2D component.

Parameters
entityThe entity to initialize

Definition at line 792 of file Map.cpp.

◆ setupLayer()

void core::map::Map::setupLayer ( unsigned int  level,
unsigned int  layer 
)
protectedinherited

Definition at line 635 of file Map.cpp.

◆ setupLevel()

void core::map::Map::setupLevel ( unsigned int  level)
protectedinherited

Definition at line 624 of file Map.cpp.

◆ setupTile()

void core::map::Map::setupTile ( unsigned int  level,
unsigned int  layer,
const sf::Vector2u &  pos 
)
protectedinherited

Definition at line 641 of file Map.cpp.

◆ setWeather()

void editor::component::EditMap::setWeather ( core::map::Weather::Type  weather)

Set the weather in the map.

Parameters
weatherThe weather to do

Definition at line 554 of file EditMap.cpp.

◆ shiftLayer()

void editor::component::EditMap::shiftLayer ( unsigned int  level,
unsigned int  layer,
bool  up 
)

Shifts a layer up or down in the render order. This will also move layers between bottom, y-sort, and top buckets.

Parameters
levelThe level the layer is on
layerThe layer to shift
upTrue to move up (render earlier), false to move down (render later)

Definition at line 614 of file EditMap.cpp.

◆ shiftLevel()

void editor::component::EditMap::shiftLevel ( unsigned int  level,
bool  up 
)

Shifts the given level up or down.

Parameters
levelThe level to move
upTrue for up, false for down

Definition at line 618 of file EditMap.cpp.

◆ showGrid()

void editor::component::EditMap::showGrid ( bool  show)

Set whether or not to render a grid between tiles.

Definition at line 374 of file EditMap.cpp.

◆ showSelection()

void editor::component::EditMap::showSelection ( const sf::IntRect &  selection)

Sets the tile selection to render. Set width or height to 0 to hide. Set width or height to negative values to show a single tile in blue (partial selection)

Parameters
selectionThe selection to render, in tiles

Definition at line 376 of file EditMap.cpp.

◆ sizePixels()

sf::Vector2f core::map::Map::sizePixels ( ) const
inherited

Returns the size of the map in pixels.

Definition at line 175 of file Map.cpp.

◆ sizeTiles()

const sf::Vector2i & core::map::Map::sizeTiles ( ) const
inherited

Returns the size of the map in tiles.

Definition at line 173 of file Map.cpp.

◆ spawnIdUnused()

bool editor::component::EditMap::spawnIdUnused ( unsigned int  id) const

Tells whether or not the given id is in use.

Parameters
idThe id to check
Returns
True if unused, false if used

Definition at line 636 of file EditMap.cpp.

◆ staticRender()

void editor::component::EditMap::staticRender ( const RenderMapWindow params)

Renders the map contents.

Parameters
paramsParameters for the rendering

Definition at line 705 of file EditMap.cpp.

◆ triggerAnimation()

void core::map::Map::triggerAnimation ( const bl::tmap::Position &  position)
protectedinherited

Definition at line 439 of file Map.cpp.

◆ undo()

void editor::component::EditMap::undo ( )

Undoes the previous action in the edit history.

Definition at line 511 of file EditMap.cpp.

◆ undoDescription()

const char * editor::component::EditMap::undoDescription ( ) const

Returns the description of what action will be undone if undo is called.

Definition at line 519 of file EditMap.cpp.

◆ unsavedChanges()

bool editor::component::EditMap::unsavedChanges ( ) const

Returns whether or not the map has been updated since last being saved.

Definition at line 221 of file EditMap.cpp.

◆ weatherSystem()

Weather & core::map::Map::weatherSystem ( )
inherited

Returns a reference to the weather system in this map.

Definition at line 182 of file Map.cpp.

Friends And Related Function Documentation

◆ page::Map

friend class page::Map
friend

Definition at line 765 of file EditMap.hpp.

◆ page::Towns

friend class page::Towns
friend

Definition at line 766 of file EditMap.hpp.

◆ rdr::EditMapComponent

friend class rdr::EditMapComponent
friend

Definition at line 767 of file EditMap.hpp.

Member Data Documentation

◆ activated

bool core::map::Map::activated
protectedinherited

Definition at line 326 of file Map.hpp.

◆ catchRegionsField

std::vector<CatchRegion> core::map::Map::catchRegionsField
protectedinherited

Definition at line 310 of file Map.hpp.

◆ characterField

std::vector<CharacterSpawn> core::map::Map::characterField
protectedinherited

Definition at line 306 of file Map.hpp.

◆ currentTown

Town* core::map::Map::currentTown
protectedinherited

Definition at line 317 of file Map.hpp.

◆ defaultTown

Town core::map::Map::defaultTown
protectedinherited

Definition at line 316 of file Map.hpp.

◆ eventRegions

bl::ctr::Grid<const Event*> core::map::Map::eventRegions
protectedinherited

Definition at line 323 of file Map.hpp.

◆ eventsField

std::vector<Event> core::map::Map::eventsField
protectedinherited

Definition at line 308 of file Map.hpp.

◆ flymapTowns

std::vector< Town > core::map::Map::flymapTowns
staticprotectedinherited

Definition at line 343 of file Map.hpp.

◆ isWorldMap

bool core::map::Map::isWorldMap
protectedinherited

Definition at line 324 of file Map.hpp.

◆ itemsField

std::vector<Item> core::map::Map::itemsField
protectedinherited

Definition at line 307 of file Map.hpp.

◆ levels

std::vector<LayerSet> core::map::Map::levels
protectedinherited

Definition at line 303 of file Map.hpp.

◆ lighting

LightingSystem core::map::Map::lighting
protectedinherited

Definition at line 309 of file Map.hpp.

◆ loadScriptField

std::string core::map::Map::loadScriptField
protectedinherited

Definition at line 299 of file Map.hpp.

◆ nameField

std::string core::map::Map::nameField
protectedinherited

Definition at line 298 of file Map.hpp.

◆ onEnterScript

std::unique_ptr<bl::script::Script> core::map::Map::onEnterScript
protectedinherited

Definition at line 321 of file Map.hpp.

◆ onExitScript

std::unique_ptr<bl::script::Script> core::map::Map::onExitScript
protectedinherited

Definition at line 322 of file Map.hpp.

◆ playlistField

std::string core::map::Map::playlistField
protectedinherited

Definition at line 301 of file Map.hpp.

◆ playlistHandle

bl::audio::AudioSystem::Handle core::map::Map::playlistHandle
protectedinherited

Definition at line 325 of file Map.hpp.

◆ renderLevels

std::list<RenderLevel> core::map::Map::renderLevels
protectedinherited

Definition at line 329 of file Map.hpp.

◆ scene

bl::rc::SceneRef core::map::Map::scene
protectedinherited

Definition at line 328 of file Map.hpp.

◆ size

sf::Vector2i core::map::Map::size
protectedinherited

Definition at line 318 of file Map.hpp.

◆ spawns

std::unordered_map<std::uint16_t, Spawn> core::map::Map::spawns
protectedinherited

Definition at line 305 of file Map.hpp.

◆ systems

system::Systems* core::map::Map::systems
protectedinherited

Definition at line 315 of file Map.hpp.

◆ tileset

bl::resource::Ref<Tileset> core::map::Map::tileset
protectedinherited

Definition at line 319 of file Map.hpp.

◆ tilesetField

std::string core::map::Map::tilesetField
protectedinherited

Definition at line 304 of file Map.hpp.

◆ towns

std::vector<Town> core::map::Map::towns
protectedinherited

Definition at line 312 of file Map.hpp.

◆ townTiles

bl::ctr::Vector2D<std::uint8_t> core::map::Map::townTiles
protectedinherited

Definition at line 313 of file Map.hpp.

◆ transitionField

bl::ctr::Vector2D<LevelTransition> core::map::Map::transitionField
protectedinherited

Definition at line 311 of file Map.hpp.

◆ unloadScriptField

std::string core::map::Map::unloadScriptField
protectedinherited

Definition at line 300 of file Map.hpp.

◆ weather

Weather core::map::Map::weather
protectedinherited

Definition at line 320 of file Map.hpp.

◆ weatherField

Weather::Type core::map::Map::weatherField
protectedinherited

Definition at line 302 of file Map.hpp.


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