Update RingRayLib - raylib.c - Add Function : void DrawTriangleFan(Vector2 *points, int numPoints, Color color)
@@ -2334,6 +2334,26 @@ RING_FUNC(ring_DrawTriangleLines)
ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(4,"Color"));
}
+
+RING_FUNC(ring_DrawTriangleFan)
+{
+ if ( RING_API_PARACOUNT != 3 ) {
+ RING_API_ERROR(RING_API_MISS3PARA);
+ return ;
+ }
+ if ( ! RING_API_ISPOINTER(1) ) {
+ RING_API_ERROR(RING_API_BADPARATYPE);
+ return ;
+ }
+ if ( ! RING_API_ISNUMBER(2) ) {
+ RING_API_ERROR(RING_API_BADPARATYPE);
+ return ;
+ }
+ DrawTriangleFan((Vector2 *) RING_API_GETCPOINTER(1,"Vector2"), (int ) RING_API_GETNUMBER(2),* (Color *) RING_API_GETCPOINTER(3,"Color"));
+ if (RING_API_ISCPOINTERNOTASSIGNED(3))
+ ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(3,"Color"));
+}
+
RING_API void ringlib_init(RingState *pRingState)
{
ring_vm_funcregister("initwindow",ring_InitWindow);
@@ -2487,4 +2507,5 @@ RING_API void ringlib_init(RingState *pRingState)
ring_vm_funcregister("drawrectangleroundedlines",ring_DrawRectangleRoundedLines);
ring_vm_funcregister("drawtriangle",ring_DrawTriangle);
ring_vm_funcregister("drawtrianglelines",ring_DrawTriangleLines);
+ ring_vm_funcregister("drawtrianglefan",ring_DrawTriangleFan);
}
