Starter project for SDL2.
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.

28 righe
447 B

  1. #ifndef IZ_RECT_H
  2. #define IZ_RECT_H
  3. #include <stdbool.h>
  4. #include "IZ_point2d.h"
  5. typedef struct {
  6. IZ_Coordinate left;
  7. IZ_Coordinate top;
  8. IZ_Coordinate right;
  9. IZ_Coordinate bottom;
  10. } IZ_Bounds;
  11. typedef struct {
  12. // top left
  13. IZ_Point2D pos;
  14. IZ_Coordinate width;
  15. IZ_Coordinate height;
  16. } IZ_Rect;
  17. IZ_Bounds IZ_RectGetBounds(IZ_Rect);
  18. bool IZ_BoundsContainPoint(IZ_Bounds, IZ_Point2D);
  19. bool IZ_BoundsCollide(IZ_Bounds, IZ_Bounds);
  20. #endif