You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
812 B
33 lines
812 B
|
1 year ago
|
#pragma once
|
||
|
|
|
||
|
|
#include "engine/point.hpp"
|
||
|
|
|
||
|
|
namespace devilution {
|
||
|
|
|
||
|
|
[[nodiscard]] bool IsTileNotSolid(Point position);
|
||
|
|
[[nodiscard]] bool IsTileSolid(Point position);
|
||
|
|
|
||
|
|
/**
|
||
|
|
* @brief Checks the position is solid or blocked by an object
|
||
|
|
*/
|
||
|
|
[[nodiscard]] bool IsTileWalkable(Point position, bool ignoreDoors = false);
|
||
|
|
|
||
|
|
/**
|
||
|
|
* @brief Checks if the position contains an object, player, monster, or solid dungeon piece
|
||
|
|
*/
|
||
|
|
[[nodiscard]] bool IsTileOccupied(Point position);
|
||
|
|
|
||
|
|
/**
|
||
|
|
* @brief check if stepping from a given position to a neighbouring tile cuts a corner.
|
||
|
|
*
|
||
|
|
* If you step from A to B, both Xs need to be clear:
|
||
|
|
*
|
||
|
|
* AX
|
||
|
|
* XB
|
||
|
|
*
|
||
|
|
* @return true if step is allowed
|
||
|
|
*/
|
||
|
|
[[nodiscard]] bool CanStep(Point startPosition, Point destinationPosition);
|
||
|
|
|
||
|
|
} // namespace devilution
|