Mario: teleport to hardcoded level
This commit is contained in:
@@ -152,6 +152,7 @@ void loadMapV01(std::shared_ptr<SDLPP::Scene> &scene,
|
||||
bool removeCollisions = false;
|
||||
int coinCount = 0;
|
||||
bool mushroom = false;
|
||||
std::string teleport_level = "";
|
||||
if (!editor && block.getModifierId() == DESTRUCTIBLE_MODIFIER_ID) {
|
||||
destructible = true;
|
||||
}
|
||||
@@ -165,6 +166,9 @@ void loadMapV01(std::shared_ptr<SDLPP::Scene> &scene,
|
||||
if (!editor && block.getModifierId() == MUSHROOM_MODIFIER_ID) {
|
||||
mushroom = true;
|
||||
}
|
||||
if (!editor && block.getModifierId() == TELEPORT_MODIFIER_ID) {
|
||||
teleport_level = "test.marmap";
|
||||
}
|
||||
// TODO add modifiers to createTerrainBlock
|
||||
if (block.getTerrainId() != 0) {
|
||||
auto obj = createTerrainBlock(block.getTerrainId(),
|
||||
@@ -175,6 +179,9 @@ void loadMapV01(std::shared_ptr<SDLPP::Scene> &scene,
|
||||
if (mushroom) {
|
||||
obj->addMushroom();
|
||||
}
|
||||
if (!teleport_level.empty()) {
|
||||
obj->setTeleportLevel(teleport_level);
|
||||
}
|
||||
if (removeCollisions) {
|
||||
obj->removeCollisions();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user