diff options
author | Stefan Dombrowski <stefan@uni-bonn.de> | 2011-05-01 01:30:04 +0200 |
---|---|---|
committer | Stefan Dombrowski <stefan@uni-bonn.de> | 2011-05-01 01:30:30 +0200 |
commit | 92fd074aa85e2357bfe1ab642209dd5a0d87e4d5 (patch) | |
tree | d4f43886bdaf1ad7710470e13a525edc1816c77a /src/map.cpp | |
parent | b7a04b08bb5b8283fadefb7fc57695720a7ddd9e (diff) | |
download | mana-92fd074aa85e2357bfe1ab642209dd5a0d87e4d5.tar.gz mana-92fd074aa85e2357bfe1ab642209dd5a0d87e4d5.tar.bz2 mana-92fd074aa85e2357bfe1ab642209dd5a0d87e4d5.tar.xz mana-92fd074aa85e2357bfe1ab642209dd5a0d87e4d5.zip |
Checking being positions send by the server
Reviewed-by: Bertram
Diffstat (limited to 'src/map.cpp')
-rw-r--r-- | src/map.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/map.cpp b/src/map.cpp index da962253..f1d27e4f 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -618,6 +618,11 @@ bool Map::contains(int x, int y) const return x >= 0 && y >= 0 && x < mWidth && y < mHeight; } +bool Map::containsPixel(int x, int y) const +{ + return contains(x ? x / mTileWidth : 0, y ? y / mTileHeight : 0); +} + MetaTile *Map::getMetaTile(int x, int y) const { return &mMetaTiles[x + y * mWidth]; |