Mario Editor: add land type switching

This commit is contained in:
2021-05-31 14:03:11 +02:00
parent af94cc0e03
commit cd0a301e52
6 changed files with 145 additions and 31 deletions
+14
View File
@@ -80,6 +80,13 @@ void MarioBlock::custom_move(int ticks) {
}
}
void MarioBlock::setType(LandType::Value type) {
_type = type;
}
LandType::Value MarioBlock::getType() const {
return _type;
}
const std::vector< uint64_t > possibleBlocks = {
FLOOR_ID,
STEP_ID,
@@ -149,6 +156,13 @@ const std::vector< uint64_t > possibleCharacters = {
MARIO_ID,
};
const std::vector< LandType::Value > possibleLands = {
LandType::OVERWORLD,
LandType::UNDERWORLD,
LandType::WATER,
LandType::BOWSER
};
const std::unordered_map< uint64_t, const SDL_Rect * > block_mapping = {
{ FLOOR_ID, &FLOOR_SRC },
{ HILL_INCLINE_ID, &HILL_INCLINE_SRC },