Update RingRayLib - raylib.c - Add Function : Image ImageCopy(Image image)
@@ -2871,6 +2871,23 @@ RING_FUNC(ring_UpdateTexture)
ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(1,"Texture2D"));
}
+
+RING_FUNC(ring_ImageCopy)
+{
+ if ( RING_API_PARACOUNT != 1 ) {
+ RING_API_ERROR(RING_API_MISS1PARA);
+ return ;
+ }
+ {
+ Image *pValue ;
+ pValue = (Image *) ring_state_malloc(((VM *) pPointer)->pRingState,sizeof(Image)) ;
+ *pValue = ImageCopy(* (Image *) RING_API_GETCPOINTER(1,"Image"));
+ if (RING_API_ISCPOINTERNOTASSIGNED(1))
+ ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(1,"Image"));
+ RING_API_RETMANAGEDCPOINTER(pValue,"Image",ring_state_free);
+ }
+}
+
RING_API void ringlib_init(RingState *pRingState)
{
ring_vm_funcregister("initwindow",ring_InitWindow);
@@ -3053,4 +3070,5 @@ RING_API void ringlib_init(RingState *pRingState)
ring_vm_funcregister("gettexturedata",ring_GetTextureData);
ring_vm_funcregister("getscreendata",ring_GetScreenData);
ring_vm_funcregister("updatetexture",ring_UpdateTexture);
+ ring_vm_funcregister("imagecopy",ring_ImageCopy);
}
