From: florianf Date: Thu, 11 Mar 2010 08:47:06 +0000 (+0000) Subject: supertux/tile.hpp: Implement Tile::is_unisolid(). X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=2850662864efc5c88c190b5a3aa80e707f7530eb;p=supertux.git supertux/tile.hpp: Implement Tile::is_unisolid(). git-svn-id: http://supertux.lethargik.org/svn/supertux/trunk/supertux@6594 837edb03-e0f3-0310-88ca-d4d4e8b29345 --- diff --git a/src/supertux/sector.cpp b/src/supertux/sector.cpp index fbf0f368b..b60a70ea9 100644 --- a/src/supertux/sector.cpp +++ b/src/supertux/sector.cpp @@ -1273,7 +1273,7 @@ Sector::collision_tilemap(collision::Constraints* constraints, // only handle unisolid when the player is falling down and when he was // above the tile before - if(tile->getAttributes() & Tile::UNISOLID) { + if(tile->is_unisolid ()) { int status; Vector relative_movement = movement - solids->get_movement(/* actual = */ true); @@ -1681,7 +1681,7 @@ Sector::is_free_of_tiles(const Rectf& rect, const bool ignoreUnisolid) const if(!tile) continue; if(!(tile->getAttributes() & Tile::SOLID)) continue; - if((tile->getAttributes() & Tile::UNISOLID) && ignoreUnisolid) + if(tile->is_unisolid () && ignoreUnisolid) continue; if(tile->is_slope ()) { AATriangle triangle; diff --git a/src/supertux/tile.hpp b/src/supertux/tile.hpp index 4351f115f..465c55995 100644 --- a/src/supertux/tile.hpp +++ b/src/supertux/tile.hpp @@ -128,6 +128,11 @@ public: return ((attributes & SLOPE) != 0); } + bool is_unisolid (void) const + { + return ((attributes & UNISOLID) != 0); + } + void print_debug(int id) const; private: