removed pointless pointers in rectange, reset background clear color, fixed entity, and added some state functions

This commit is contained in:
herbglitch 2025-03-17 02:31:23 -06:00
parent dd1f3ca3e0
commit bd7e3212da
12 changed files with 161 additions and 86 deletions

View file

@ -4,6 +4,7 @@
#include <stdint.h>
#include "point.h"
#include "vector2.h"
#include "arc/std/bool.h"
#ifdef __cplusplus
extern "C" {
@ -53,7 +54,7 @@ void ARC_FRect_CenterOn(ARC_FRect *rect, ARC_FRect *bounds);
*
* @return ARC_FRect
*/
ARC_FRect ARC_Rect_CastToFRect(ARC_Rect *rect);
ARC_FRect ARC_Rect_CastToFRect(ARC_Rect rect);
/**
* @brief casts FRect to Rect
@ -62,7 +63,7 @@ ARC_FRect ARC_Rect_CastToFRect(ARC_Rect *rect);
*
* @return ARC_Rect
*/
ARC_Rect ARC_FRect_CastToRect(ARC_FRect *rect);
ARC_Rect ARC_FRect_CastToRect(ARC_FRect rect);
/**
* @brief checks if two ARC_Rects intersect
@ -70,9 +71,9 @@ ARC_Rect ARC_FRect_CastToRect(ARC_FRect *rect);
* @param rect1 ARC_Rect that will be checked against rect2
* @param rect2 ARC_Rect that will be checked against rect1
*
* @return 1 if they intersect, 0 if they don't intersect
* @return ARC_True if they intersect, ARC_False if they don't intersect
*/
int32_t ARC_Rect_Intersects(ARC_Rect *rect1, ARC_Rect *rect2);
ARC_Bool ARC_Rect_Intersects(ARC_Rect rect1, ARC_Rect rect2);
/**
* @brief checks if two ARC_FRects intersect
@ -80,9 +81,9 @@ int32_t ARC_Rect_Intersects(ARC_Rect *rect1, ARC_Rect *rect2);
* @param rect1 ARC_FRect that will be checked against rect2
* @param rect2 ARC_FRect that will be checked against rect1
*
* @return 1 if they intersect, 0 if they don't intersect
* @return ARC_True if they intersect, ARC_False if they don't intersect
*/
int32_t ARC_FRect_Intersects(ARC_FRect *rect1, ARC_FRect *rect2);
ARC_Bool ARC_FRect_Intersects(ARC_FRect rect1, ARC_FRect rect2);
/**
* @brief checks if ARC_Rect intersects with point
@ -90,9 +91,9 @@ int32_t ARC_FRect_Intersects(ARC_FRect *rect1, ARC_FRect *rect2);
* @param rect ARC_Rect that will be checked against point
* @param point ARC_Point that will be checked against rect
*
* @return 1 if they intersect, 0 if they don't intersect
* @return ARC_True if they intersect, ARC_False if they don't intersect
*/
int32_t ARC_Rect_IntersectsPoint(ARC_Rect *rect, ARC_Point *point);
ARC_Bool ARC_Rect_IntersectsPoint(ARC_Rect rect, ARC_Point point);
/**
* @brief checks if ARC_FRect intersects with point
@ -100,9 +101,9 @@ int32_t ARC_Rect_IntersectsPoint(ARC_Rect *rect, ARC_Point *point);
* @param rect ARC_FRect that will be checked against point
* @param point ARC_Point that will be checked against rect
*
* @return 1 if they intersect, 0 if they don't intersect
* @return ARC_True if they intersect, ARC_False if they don't intersect
*/
int32_t ARC_FRect_IntersectsPoint(ARC_FRect *rect, ARC_Point *point);
ARC_Bool ARC_FRect_IntersectsPoint(ARC_FRect rect, ARC_Point point);
/**
* @brief checks if ARC_Rect intersects a line