return tile && tile->solid;
}
+bool isunisolid(float x, float y)
+{
+ Tile* tile = gettile(x,y);
+ return tile && tile->unisolid;
+}
+
+
bool isbrick(float x, float y)
{
Tile* tile = gettile(x,y);
// Some little helper function to check for tile properties
bool issolid(float x, float y);
+bool isunisolid(float x, float y);
bool isbrick(float x, float y);
bool isice(float x, float y);
bool isspike(float x, float y);
{
return ( issolid(base.x + base.width / 2, base.y + base.height) ||
issolid(base.x + 1, base.y + base.height) ||
- issolid(base.x + base.width - 1, base.y + base.height) );
+ issolid(base.x + base.width - 1, base.y + base.height) ||
+ isunisolid(base.x + base.width / 2, base.y + base.height) ||
+ isunisolid(base.x + 1, base.y + base.height) ||
+ isunisolid(base.x + base.width - 1, base.y + base.height) );
}
bool
Tile* tile = new Tile;
tile->id = -1;
tile->solid = false;
+ tile->unisolid = false;
tile->brick = false;
tile->ice = false;
tile->water = false;
LispReader reader(lisp_cdr(element));
assert(reader.read_int("id", &tile->id));
reader.read_bool("solid", &tile->solid);
+ reader.read_bool("unisolid", &tile->unisolid);
reader.read_bool("brick", &tile->brick);
reader.read_bool("ice", &tile->ice);
reader.read_bool("water", &tile->water);
/** solid tile that is indestructable by Tux */
bool solid;
+ /** uni-directional solid tile */
+ bool unisolid;
+
/** a brick that can be destroyed by jumping under it */
bool brick;