Update RingRayLib - raylib.c - Add Function : Image GenImagePerlinNoise(int width, int height, int offsetX, int offsetY, float scale)
@@ -3647,6 +3647,41 @@ RING_FUNC(ring_GenImageWhiteNoise)
}
}
+
+RING_FUNC(ring_GenImagePerlinNoise)
+{
+ 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 ;
+ }
+ if ( ! RING_API_ISNUMBER(5) ) {
+ RING_API_ERROR(RING_API_BADPARATYPE);
+ return ;
+ }
+ {
+ Image *pValue ;
+ pValue = (Image *) ring_state_malloc(((VM *) pPointer)->pRingState,sizeof(Image)) ;
+ *pValue = GenImagePerlinNoise( (int ) RING_API_GETNUMBER(1), (int ) RING_API_GETNUMBER(2), (int ) RING_API_GETNUMBER(3), (int ) RING_API_GETNUMBER(4), (float ) RING_API_GETNUMBER(5));
+ RING_API_RETMANAGEDCPOINTER(pValue,"Image",ring_state_free);
+ }
+}
+
RING_API void ringlib_init(RingState *pRingState)
{
ring_vm_funcregister("initwindow",ring_InitWindow);
@@ -3866,4 +3901,5 @@ RING_API void ringlib_init(RingState *pRingState)
ring_vm_funcregister("genimagegradientradial",ring_GenImageGradientRadial);
ring_vm_funcregister("genimagechecked",ring_GenImageChecked);
ring_vm_funcregister("genimagewhitenoise",ring_GenImageWhiteNoise);
+ ring_vm_funcregister("genimageperlinnoise",ring_GenImagePerlinNoise);
}
