* * rct2: 0x006A7B84 */
| 783 | * rct2: 0x006A7B84 |
| 784 | */ |
| 785 | int32_t MapHeightFromSlope(const CoordsXY& coords, int32_t slopeDirection, bool isSloped) |
| 786 | { |
| 787 | if (!isSloped) |
| 788 | return 0; |
| 789 | |
| 790 | switch (slopeDirection % kNumOrthogonalDirections) |
| 791 | { |
| 792 | case TILE_ELEMENT_DIRECTION_WEST: |
| 793 | return (31 - (coords.x & 31)) / 2; |
| 794 | case TILE_ELEMENT_DIRECTION_NORTH: |
| 795 | return (coords.y & 31) / 2; |
| 796 | case TILE_ELEMENT_DIRECTION_EAST: |
| 797 | return (coords.x & 31) / 2; |
| 798 | case TILE_ELEMENT_DIRECTION_SOUTH: |
| 799 | return (31 - (coords.y & 31)) / 2; |
| 800 | } |
| 801 | return 0; |
| 802 | } |
| 803 | |
| 804 | bool MapIsLocationValid(const CoordsXY& coords) |
| 805 | { |
no outgoing calls
no test coverage detected