- int status;
-
- if ((attributes & SOLID) == 0)
- return (false);
-
- if ((attributes & UNISOLID) == 0)
- return (true);
-
- /* Check if the tile is solid given the current movement. This works
- * for south-slopes (which are solid when moving "down") and
- * north-slopes (which are solid when moving "up". "up" and "down" is
- * in quotation marks because because the slope's gradient is taken.
- * Also, this uses the movement relative to the tilemaps own movement
- * (if any). --octo */
- status = check_movement_unisolid (movement);
- /* If zero is returned, the unisolid tile is non-solid. */
- if (status == 0)
- return (false);
-
- /* Check whether the object is already *in* the tile. If so, the tile
- * is non-solid. Otherwise, if the object is "above" (south slopes)
- * or "below" (north slopes), the tile will be solid. */
- status = check_position_unisolid (position, tile_bbox);
- if (status == 0)
- return (false);
-
- return (true);
+ if (!(attributes & SOLID))
+ return false;
+
+ if (!(attributes & UNISOLID))
+ return true;
+
+ return check_movement_unisolid (movement) &&
+ check_position_unisolid (position, tile_bbox);