diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-10-15 22:08:56 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-10-15 22:18:35 +0300 |
commit | 6d44c69cb0cc9c2ac8a94c56c07ed45f63ab9726 (patch) | |
tree | 4a9202e4528dc3ae5d111a40d6217ee0871fa06b | |
parent | 7e35fd53d5fdc658facfce281577421296f8e3c1 (diff) | |
download | mv-6d44c69cb0cc9c2ac8a94c56c07ed45f63ab9726.tar.gz mv-6d44c69cb0cc9c2ac8a94c56c07ed45f63ab9726.tar.bz2 mv-6d44c69cb0cc9c2ac8a94c56c07ed45f63ab9726.tar.xz mv-6d44c69cb0cc9c2ac8a94c56c07ed45f63ab9726.zip |
Rename blockTile to AddBlockMask in map.
-rw-r--r-- | src/resources/map/map.cpp | 4 | ||||
-rw-r--r-- | src/resources/map/map.h | 4 | ||||
-rw-r--r-- | src/resources/mapreader.cpp | 12 |
3 files changed, 10 insertions, 10 deletions
diff --git a/src/resources/map/map.cpp b/src/resources/map/map.cpp index bcc84417c..097a7a11d 100644 --- a/src/resources/map/map.cpp +++ b/src/resources/map/map.cpp @@ -679,7 +679,7 @@ const Tileset *Map::getTilesetWithGid(const int gid) const return nullptr; } -void Map::blockTile(const int x, const int y, +void Map::addBlockMask(const int x, const int y, const BlockTypeT type) { if (type == BlockType::NONE || !contains(x, y)) @@ -735,7 +735,7 @@ unsigned char Map::getBlockMask(const int x, const int y) const void Map::setWalk(const int x, const int y) { - blockTile(x, y, BlockType::GROUNDTOP); + addBlockMask(x, y, BlockType::GROUNDTOP); } bool Map::contains(const int x, const int y) const diff --git a/src/resources/map/map.h b/src/resources/map/map.h index c1b84ae83..9c74875d8 100644 --- a/src/resources/map/map.h +++ b/src/resources/map/map.h @@ -145,8 +145,8 @@ class Map final : public Properties, public ConfigListener /** * Marks a tile as occupied. */ - void blockTile(const int x, const int y, - const BlockTypeT type); + void addBlockMask(const int x, const int y, + const BlockTypeT type); /** * Gets walkability for a tile with a blocking bitmask. When called diff --git a/src/resources/mapreader.cpp b/src/resources/mapreader.cpp index 8283a4268..9b87d821c 100644 --- a/src/resources/mapreader.cpp +++ b/src/resources/mapreader.cpp @@ -526,19 +526,19 @@ inline static void setTile(Map *const map, switch (gid - set->getFirstGid()) { case Map::COLLISION_EMPTY: - map->blockTile(x, y, BlockType::GROUND); + map->addBlockMask(x, y, BlockType::GROUND); break; case Map::COLLISION_WALL: - map->blockTile(x, y, BlockType::WALL); + map->addBlockMask(x, y, BlockType::WALL); break; case Map::COLLISION_AIR: - map->blockTile(x, y, BlockType::AIR); + map->addBlockMask(x, y, BlockType::AIR); break; case Map::COLLISION_WATER: - map->blockTile(x, y, BlockType::WATER); + map->addBlockMask(x, y, BlockType::WATER); break; case Map::COLLISION_GROUNDTOP: - map->blockTile(x, y, BlockType::GROUNDTOP); + map->addBlockMask(x, y, BlockType::GROUNDTOP); break; default: break; @@ -547,7 +547,7 @@ inline static void setTile(Map *const map, else { if (gid - set->getFirstGid() != 0) - map->blockTile(x, y, BlockType::WALL); + map->addBlockMask(x, y, BlockType::WALL); } } break; |