summaryrefslogtreecommitdiff
path: root/src/map.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-07-23 12:59:18 +0300
committerAndrei Karas <akaras@inbox.ru>2013-07-23 12:59:18 +0300
commit66f7df70fb03d487ae0c667adec3d5ad6e11721e (patch)
treeb01a7653aa911dcaf37b836e60275204c3cb028d /src/map.cpp
parente2a97fe7991d05a721be8070f70cbfbd7c169698 (diff)
downloadmanaplus-66f7df70fb03d487ae0c667adec3d5ad6e11721e.tar.gz
manaplus-66f7df70fb03d487ae0c667adec3d5ad6e11721e.tar.bz2
manaplus-66f7df70fb03d487ae0c667adec3d5ad6e11721e.tar.xz
manaplus-66f7df70fb03d487ae0c667adec3d5ad6e11721e.zip
Add new sprite actions for water and sky.
New actions: fly, swim, standsky, standwater, sitsky, sitwater, attacksky, attackwater, spawnsky, spawnwater, deadsky, deadwater For now attacksky and attackwater unused.
Diffstat (limited to 'src/map.cpp')
-rw-r--r--src/map.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/map.cpp b/src/map.cpp
index aa28a8160..d69375cf4 100644
--- a/src/map.cpp
+++ b/src/map.cpp
@@ -701,6 +701,16 @@ bool Map::getWalk(const int x, const int y, const unsigned char walkmask) const
return !(mMetaTiles[x + y * mWidth].blockmask & walkmask);
}
+unsigned char Map::getBlockMask(const int x, const int y)
+{
+ // You can't walk outside of the map
+ if (x < 0 || y < 0 || x >= mWidth || y >= mHeight)
+ return 0;
+
+ // Check if the tile is walkable
+ return mMetaTiles[x + y * mWidth].blockmask;
+}
+
void Map::setWalk(const int x, const int y, const bool walkable A_UNUSED)
{
blockTile(x, y, Map::BLOCKTYPE_GROUNDTOP);