Mario: add MapObject and use that instead of tuples

This commit is contained in:
2021-06-07 23:48:28 +02:00
parent 76f55fd98c
commit a54d079fd2
9 changed files with 329 additions and 169 deletions
+3 -3
View File
@@ -154,7 +154,7 @@ const std::vector< uint64_t > possibleBlocks = {
};
const std::vector< uint64_t > possibleMods = {
DESTRUCTIBLE_ID,
DESTRUCTIBLE_MODIFIER_ID,
};
const std::vector< uint64_t > possibleCharacters = {
@@ -228,7 +228,7 @@ const std::unordered_map< uint64_t, const SDL_Rect * > block_mapping = {
{ CANNON_PEDESTAL_ID, &CANNON_PEDESTAL_SRC },
{ CANNON_ID, &CANNON_SRC },
{ MARIO_ID, &MARIO_STANDING_SRC },
{ DESTRUCTIBLE_ID, &DESTRUCTIBLE_SRC },
{ DESTRUCTIBLE_MODIFIER_ID, &DESTRUCTIBLE_SRC },
};
const std::unordered_map< uint64_t, uint64_t > block_flags = {
@@ -291,7 +291,7 @@ const std::unordered_map< uint64_t, uint64_t > block_flags = {
{ CANNON_PEDESTAL_ID, HAS_COLLISION },
{ CANNON_ID, HAS_COLLISION },
{ MARIO_ID, 0 },
{ DESTRUCTIBLE_ID, 0 },
{ DESTRUCTIBLE_MODIFIER_ID, 0 },
};
bool blockCanBeDestroyed(uint64_t id) {