Update RingRayLib - raylib.c - Add Function : void DrawGrid(int slices, float spacing)
@@ -4880,6 +4880,24 @@ RING_FUNC(ring_DrawRay)
ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(2,"Color"));
}
+
+RING_FUNC(ring_DrawGrid)
+{
+ if ( RING_API_PARACOUNT != 2 ) {
+ RING_API_ERROR(RING_API_MISS2PARA);
+ 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 ;
+ }
+ DrawGrid( (int ) RING_API_GETNUMBER(1), (float ) RING_API_GETNUMBER(2));
+}
+
RING_API void ringlib_init(RingState *pRingState)
{
ring_vm_funcregister("initwindow",ring_InitWindow);
@@ -5156,4 +5174,5 @@ RING_API void ringlib_init(RingState *pRingState)
ring_vm_funcregister("drawcylinderwires",ring_DrawCylinderWires);
ring_vm_funcregister("drawplane",ring_DrawPlane);
ring_vm_funcregister("drawray",ring_DrawRay);
+ ring_vm_funcregister("drawgrid",ring_DrawGrid);
}
