Area.h 541 B

1234567891011121314151617181920212223242526272829303132
  1. #pragma once
  2. #include <Vec3.h>
  3. struct Area
  4. {
  5. int startX;
  6. int startY;
  7. int endX;
  8. int endY;
  9. int dimensionId;
  10. };
  11. enum Direction
  12. {
  13. NO_DIRECTION = 0,
  14. NORTH = 1,
  15. EAST = 2,
  16. SOUTH = 4,
  17. WEST = 8,
  18. TOP = 16,
  19. BOTTOM = 32,
  20. INSIDE = 64
  21. };
  22. typedef int Directions;
  23. #define ANY_DIRECTION NORTH | EAST | SOUTH | WEST | TOP | BOTTOM
  24. Framework::Vec3<int> getDirection(Directions dir);
  25. int getDirectionIndex(Direction dir);
  26. Direction getOppositeDirection(Direction dir);
  27. Direction getDirectionFromIndex(int index);