diff --git a/src/openrct2/world/Location.hpp b/src/openrct2/world/Location.hpp index 99cfbce164..2e78283227 100644 --- a/src/openrct2/world/Location.hpp +++ b/src/openrct2/world/Location.hpp @@ -269,6 +269,11 @@ typedef uint8_t Direction; const Direction INVALID_DIRECTION = 0xFF; +/** + * Array of all valid cardinal directions, to make it easy to write range-based for loops like: for (Direction d : ALL_DIRECTIONS) + */ +constexpr Direction ALL_DIRECTIONS[] = { 0, 1, 2, 3 }; + /** * Given a direction, return the direction that points the other way, * on the same axis.