2D Run-and-gun shooter inspired by One Man's Doomsday, Counter-Strike, and Metal Slug.
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 
 
 
 

28 строки
398 B

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