struct.h 477 B

123456789101112131415161718192021222324252627282930313233343536
  1. #ifndef STRUCT_H
  2. #define STRUCT_H
  3. #define PI 3.14159265
  4. #define SIN_60 0.866025404
  5. #define COS_60 0.5
  6. #define abs(x) x>0 ? x : -x
  7. #define true 1
  8. #define false 0
  9. #define bool unsigned char
  10. typedef struct Camera Camera;
  11. typedef struct Wall Wall;
  12. typedef struct Line Line;
  13. struct Camera{
  14. int cX;
  15. int cY;
  16. int angle;
  17. };
  18. struct Wall{
  19. int d;
  20. int h;
  21. int id;
  22. int line;
  23. Wall *nxt;
  24. };
  25. struct Line{
  26. int id;
  27. Wall *list;
  28. int angle;
  29. };
  30. #endif