Update RingRayLib - raylib.c - Add Function : bool CheckCollisionSpheres(Vector3 centerA, float radiusA, Vector3 centerB, float radiusB)
@@ -5613,6 +5613,28 @@ RING_FUNC(ring_DrawBillboardRec)
ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(6,"Color"));
}
+
+RING_FUNC(ring_CheckCollisionSpheres)
+{
+ 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(CheckCollisionSpheres(* (Vector3 *) RING_API_GETCPOINTER(1,"Vector3"), (float ) RING_API_GETNUMBER(2),* (Vector3 *) RING_API_GETCPOINTER(3,"Vector3"), (float ) RING_API_GETNUMBER(4)));
+ if (RING_API_ISCPOINTERNOTASSIGNED(1))
+ ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(1,"Vector3"));
+ if (RING_API_ISCPOINTERNOTASSIGNED(3))
+ ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(3,"Vector3"));
+}
+
RING_API void ringlib_init(RingState *pRingState)
{
ring_vm_funcregister("initwindow",ring_InitWindow);
@@ -5926,4 +5948,5 @@ RING_API void ringlib_init(RingState *pRingState)
ring_vm_funcregister("drawboundingbox",ring_DrawBoundingBox);
ring_vm_funcregister("drawbillboard",ring_DrawBillboard);
ring_vm_funcregister("drawbillboardrec",ring_DrawBillboardRec);
+ ring_vm_funcregister("checkcollisionspheres",ring_CheckCollisionSpheres);
}
