Update RingRayLib - raylib.c - Add Function : bool CheckCollisionCircles(Vector2 center1, float radius1, Vector2 center2, float radius2)
@@ -2408,6 +2408,28 @@ RING_FUNC(ring_CheckCollisionRecs)
ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(2,"Rectangle"));
}
+
+RING_FUNC(ring_CheckCollisionCircles)
+{
+ if ( RING_API_PARACOUNT != 4 ) {
+ RING_API_ERROR(RING_API_MISS4PARA);
+ return ;
+ }
+ if ( ! RING_API_ISNUMBER(2) ) {
+ RING_API_ERROR(RING_API_BADPARATYPE);
+ return ;
+ }
+ if ( ! RING_API_ISNUMBER(4) ) {
+ RING_API_ERROR(RING_API_BADPARATYPE);
+ return ;
+ }
+ RING_API_RETNUMBER(CheckCollisionCircles(* (Vector2 *) RING_API_GETCPOINTER(1,"Vector2"), (float ) RING_API_GETNUMBER(2),* (Vector2 *) RING_API_GETCPOINTER(3,"Vector2"), (float ) RING_API_GETNUMBER(4)));
+ if (RING_API_ISCPOINTERNOTASSIGNED(1))
+ ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(1,"Vector2"));
+ if (RING_API_ISCPOINTERNOTASSIGNED(3))
+ ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(3,"Vector2"));
+}
+
RING_API void ringlib_init(RingState *pRingState)
{
ring_vm_funcregister("initwindow",ring_InitWindow);
@@ -2565,4 +2587,5 @@ RING_API void ringlib_init(RingState *pRingState)
ring_vm_funcregister("drawpoly",ring_DrawPoly);
ring_vm_funcregister("setshapestexture",ring_SetShapesTexture);
ring_vm_funcregister("checkcollisionrecs",ring_CheckCollisionRecs);
+ ring_vm_funcregister("checkcollisioncircles",ring_CheckCollisionCircles);
}
