Go to the documentation of this file.
72 static MapBlock createMap(
int width,
int height,
bool isHeight =
false,
bool isNotClassic =
false);
79 static void loadMap(
int width,
int height,
MapBlock map,
const std::shared_ptr<WAL::Scene> &scene);
87 using MapElem = std::function<void(
Vector3f coords, std::shared_ptr<WAL::Scene> scene)>;
110 static void generateWall(
int width,
int height, std::shared_ptr<WAL::Scene> scene);
148 std::shared_ptr<WAL::Scene> scene);
@ BUMPER
Definition: Map.hpp:41
@ SPAWNER
Definition: Map.hpp:42
static const std::string secondFloorHolePath
Definition: Map.hpp:205
static MapBlock createMap(int width, int height, bool isHeight=false, bool isNotClassic=false)
Generate map of block to be loaded.
Definition: Map.cpp:435
static void wallCollision(WAL::Entity &entity, const WAL::Entity &wall, CollisionComponent::CollidedAxis collidedAxis)
Definition: Map.cpp:84
@ INVISIBLE
Definition: Map.hpp:44
BlockType
Enum of the block available.
Definition: Map.hpp:35
static void createBumper(Vector3f coords, std::shared_ptr< WAL::Scene > scene)
Create bumper of the map.
Definition: Map.cpp:316
static void createHole(Vector3f coords, std::shared_ptr< WAL::Scene > scene)
Create hole of the map.
Definition: Map.cpp:294
static void wallCollided(WAL::Entity &entity, const WAL::Entity &wall, CollisionComponent::CollidedAxis collidedAxis)
Definition: Map.cpp:100
static void createBreakable(Vector3f coords, std::shared_ptr< WAL::Scene > scene)
Create breakable of the map.
Definition: Map.cpp:251
@ UNBREAKABLE
Definition: Map.hpp:43
static const std::string imageExtension
Definition: Map.hpp:185
BonusType
Definition: Bonus.hpp:34
static void generateFloor(MapBlock map, int width, int height, std::shared_ptr< WAL::Scene > scene)
Generate the floor of the map.
Definition: Map.cpp:219
std::map< std::tuple< int, int, int >, BlockType > MapBlock
Definition: Map.hpp:47
static const std::string objExtension
Definition: Map.hpp:187
Definition: AnimationsComponent.cpp:9
static const std::string holePath
Definition: Map.hpp:203
The main WAL class, it is used to setup and run the ECS.
Definition: Wal.hpp:27
static const std::string bumperPath
Definition: Map.hpp:199
An entity of the WAL's ECS.
Definition: Entity.hpp:20
CollidedAxis
Used to tell the collided axis.
Definition: CollisionComponent.hpp:19
static MapBlock createSpawner(MapBlock map, int width, int height)
Generate map of block to be loaded.
Definition: Map.cpp:383
static void createUpperFloor(Vector3f coords, std::shared_ptr< WAL::Scene > scene)
Create upper floor of the map.
Definition: Map.cpp:267
static BlockType getRandomBlockType(bool=false)
Generate random block type.
Definition: Map.cpp:339
@ NOTHING
Definition: Map.hpp:37
static MapBlock createHeight(MapBlock map, int width, int height)
Generate height for the map.
Definition: Map.cpp:350
static MapBlock createClassicUnbreakable(MapBlock map, int width, int height)
Generate unbreakable block on the map.
Definition: Map.cpp:405
static const std::string assetsPath
Definition: Map.hpp:181
@ HOLE
Definition: Map.hpp:39
static const std::string wallAssetsPath
Definition: Map.hpp:183
static void createUnbreakable(Vector3f coords, std::shared_ptr< WAL::Scene > scene)
Create unbreakable of the map.
Definition: Map.cpp:278
static void wallDestroyed(WAL::Entity &entity, WAL::Wal &wal)
Definition: Map.cpp:111
static const std::string secondFloorPath
Definition: Map.hpp:201
static void createBonus(WAL::Entity &entity, Vector3f position, Bonus::BonusType bonusType)
Definition: Map.cpp:22
static MapBlock createLongClassicUnbreakable(MapBlock map, int width, int height)
Generate unbreakable block on map.
Definition: Map.cpp:416
std::function< void(Vector3f coords, std::shared_ptr< WAL::Scene > scene)> MapElem
Definition: Map.hpp:87
static const std::string floorPath
Definition: Map.hpp:195
static bool isCloseToBlockType(std::map< std::tuple< int, int, int >, BlockType > map, int x, int y, int z, BlockType blockType)
Definition: Map.cpp:330
static void bumperCollide(WAL::Entity &entity, const WAL::Entity &wall, CollisionComponent::CollidedAxis collidedAxis)
Definition: Map.cpp:50
static MapBlock cleanBreakable(MapBlock map, int width, int height)
Clean breakable on stairs, bumpers, etc..
Definition: Map.cpp:393
static void generateUnbreakableBlock(int width, int height, std::shared_ptr< WAL::Scene > scene)
Generate the unbreakable block of the map.
Definition: Map.cpp:144
static const std::string outerWallPath
Definition: Map.hpp:191
static void generateWall(int width, int height, std::shared_ptr< WAL::Scene > scene)
Generate the wall of the map.
Definition: Map.cpp:166
static void holeCollide(WAL::Entity &entity, const WAL::Entity &wall, CollisionComponent::CollidedAxis collidedAxis)
Definition: Map.cpp:65
@ BREAKABLE
Definition: Map.hpp:38
static void loadMap(int width, int height, MapBlock map, const std::shared_ptr< WAL::Scene > &scene)
Generate the map.
Definition: Map.cpp:514
static const std::string breakableWallPath
Definition: Map.hpp:193
static const std::string stairsPath
Definition: Map.hpp:197
static const std::string unbreakableWallPath
Definition: Map.hpp:189
static void createElement(Vector3f coords, std::shared_ptr< WAL::Scene > scene, BlockType blockType)
Create element of the map.
Definition: Map.cpp:235
@ UPPERFLOOR
Definition: Map.hpp:40
static void generateHeightCollision(MapBlock map, int width, int height, std::shared_ptr< WAL::Scene > scene)
Generate the height hitbox of the map.
Definition: Map.cpp:472