Update RingRayLib - raylib.c - Add Function : void DrawLine(int startPosX, int startPosY, int endPosX, int endPosY, Color color)
@@ -1722,6 +1722,34 @@ RING_FUNC(ring_DrawPixelV)
ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(2,"Color"));
}
+
+RING_FUNC(ring_DrawLine)
+{
+ if ( RING_API_PARACOUNT != 5 ) {
+ RING_API_ERROR(RING_API_BADPARACOUNT);
+ return ;
+ }
+ if ( ! RING_API_ISNUMBER(1) ) {
+ RING_API_ERROR(RING_API_BADPARATYPE);
+ return ;
+ }
+ if ( ! RING_API_ISNUMBER(2) ) {
+ RING_API_ERROR(RING_API_BADPARATYPE);
+ return ;
+ }
+ if ( ! RING_API_ISNUMBER(3) ) {
+ RING_API_ERROR(RING_API_BADPARATYPE);
+ return ;
+ }
+ if ( ! RING_API_ISNUMBER(4) ) {
+ RING_API_ERROR(RING_API_BADPARATYPE);
+ return ;
+ }
+ DrawLine( (int ) RING_API_GETNUMBER(1), (int ) RING_API_GETNUMBER(2), (int ) RING_API_GETNUMBER(3), (int ) RING_API_GETNUMBER(4),* (Color *) RING_API_GETCPOINTER(5,"Color"));
+ if (RING_API_ISCPOINTERNOTASSIGNED(5))
+ ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(5,"Color"));
+}
+
RING_API void ringlib_init(RingState *pRingState)
{
ring_vm_funcregister("initwindow",ring_InitWindow);
@@ -1849,4 +1877,5 @@ RING_API void ringlib_init(RingState *pRingState)
ring_vm_funcregister("setcameramovecontrols",ring_SetCameraMoveControls);
ring_vm_funcregister("drawpixel",ring_DrawPixel);
ring_vm_funcregister("drawpixelv",ring_DrawPixelV);
+ ring_vm_funcregister("drawline",ring_DrawLine);
}
