Update RingRayLib - raylib.c - Add Function : void DrawTriangleLines(Vector2 v1, Vector2 v2, Vector2 v3, Color color)
@@ -2316,6 +2316,24 @@ RING_FUNC(ring_DrawTriangle)
ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(4,"Color"));
}
+
+RING_FUNC(ring_DrawTriangleLines)
+{
+ if ( RING_API_PARACOUNT != 4 ) {
+ RING_API_ERROR(RING_API_MISS4PARA);
+ return ;
+ }
+ DrawTriangleLines(* (Vector2 *) RING_API_GETCPOINTER(1,"Vector2"),* (Vector2 *) RING_API_GETCPOINTER(2,"Vector2"),* (Vector2 *) RING_API_GETCPOINTER(3,"Vector2"),* (Color *) RING_API_GETCPOINTER(4,"Color"));
+ 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"));
+ if (RING_API_ISCPOINTERNOTASSIGNED(3))
+ ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(3,"Vector2"));
+ if (RING_API_ISCPOINTERNOTASSIGNED(4))
+ ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(4,"Color"));
+}
+
RING_API void ringlib_init(RingState *pRingState)
{
ring_vm_funcregister("initwindow",ring_InitWindow);
@@ -2468,4 +2486,5 @@ RING_API void ringlib_init(RingState *pRingState)
ring_vm_funcregister("drawrectanglerounded",ring_DrawRectangleRounded);
ring_vm_funcregister("drawrectangleroundedlines",ring_DrawRectangleRoundedLines);
ring_vm_funcregister("drawtriangle",ring_DrawTriangle);
+ ring_vm_funcregister("drawtrianglelines",ring_DrawTriangleLines);
}
