Update RingRayLib - raylib.c - Add Function : bool CheckCollisionRaySphereEx(Ray ray, Vector3 spherePosition, float sphereRadius, Vector3 *collisionPoint)
@@ -5685,6 +5685,28 @@ RING_FUNC(ring_CheckCollisionRaySphere)
ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(2,"Vector3"));
}
+
+RING_FUNC(ring_CheckCollisionRaySphereEx)
+{
+ if ( RING_API_PARACOUNT != 4 ) {
+ RING_API_ERROR(RING_API_MISS4PARA);
+ return ;
+ }
+ if ( ! RING_API_ISNUMBER(3) ) {
+ RING_API_ERROR(RING_API_BADPARATYPE);
+ return ;
+ }
+ if ( ! RING_API_ISPOINTER(4) ) {
+ RING_API_ERROR(RING_API_BADPARATYPE);
+ return ;
+ }
+ RING_API_RETNUMBER(CheckCollisionRaySphereEx(* (Ray *) RING_API_GETCPOINTER(1,"Ray"),* (Vector3 *) RING_API_GETCPOINTER(2,"Vector3"), (float ) RING_API_GETNUMBER(3),(Vector3 *) RING_API_GETCPOINTER(4,"Vector3")));
+ if (RING_API_ISCPOINTERNOTASSIGNED(1))
+ ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(1,"Ray"));
+ if (RING_API_ISCPOINTERNOTASSIGNED(2))
+ ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(2,"Vector3"));
+}
+
RING_API void ringlib_init(RingState *pRingState)
{
ring_vm_funcregister("initwindow",ring_InitWindow);
@@ -6002,4 +6024,5 @@ RING_API void ringlib_init(RingState *pRingState)
ring_vm_funcregister("checkcollisionboxes",ring_CheckCollisionBoxes);
ring_vm_funcregister("checkcollisionboxsphere",ring_CheckCollisionBoxSphere);
ring_vm_funcregister("checkcollisionraysphere",ring_CheckCollisionRaySphere);
+ ring_vm_funcregister("checkcollisionraysphereex",ring_CheckCollisionRaySphereEx);
}
