Update RingRayLib - raylib.c - Add Function : bool CheckCollisionPointCircle(Vector2 point, Vector2 center, float radius)
@@ -2481,6 +2481,24 @@ RING_FUNC(ring_CheckCollisionPointRec)
ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(2,"Rectangle"));
}
+
+RING_FUNC(ring_CheckCollisionPointCircle)
+{
+ if ( RING_API_PARACOUNT != 3 ) {
+ RING_API_ERROR(RING_API_MISS3PARA);
+ return ;
+ }
+ if ( ! RING_API_ISNUMBER(3) ) {
+ RING_API_ERROR(RING_API_BADPARATYPE);
+ return ;
+ }
+ RING_API_RETNUMBER(CheckCollisionPointCircle(* (Vector2 *) RING_API_GETCPOINTER(1,"Vector2"),* (Vector2 *) RING_API_GETCPOINTER(2,"Vector2"), (float ) RING_API_GETNUMBER(3)));
+ if (RING_API_ISCPOINTERNOTASSIGNED(1))
+ ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(1,"Vector2"));
+ if (RING_API_ISCPOINTERNOTASSIGNED(2))
+ ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(2,"Vector2"));
+}
+
RING_API void ringlib_init(RingState *pRingState)
{
ring_vm_funcregister("initwindow",ring_InitWindow);
@@ -2642,4 +2660,5 @@ RING_API void ringlib_init(RingState *pRingState)
ring_vm_funcregister("checkcollisioncirclerec",ring_CheckCollisionCircleRec);
ring_vm_funcregister("getcollisionrec",ring_GetCollisionRec);
ring_vm_funcregister("checkcollisionpointrec",ring_CheckCollisionPointRec);
+ ring_vm_funcregister("checkcollisionpointcircle",ring_CheckCollisionPointCircle);
}
