Update RingRayLib - raylib.c - Add Function : void DrawTextureRec(Texture2D texture, Rectangle sourceRec, Vector2 position, Color tint)
@@ -3817,6 +3817,24 @@ RING_FUNC(ring_DrawTextureEx)
ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(5,"Color"));
}
+
+RING_FUNC(ring_DrawTextureRec)
+{
+ if ( RING_API_PARACOUNT != 4 ) {
+ RING_API_ERROR(RING_API_MISS4PARA);
+ return ;
+ }
+ DrawTextureRec(* (Texture2D *) RING_API_GETCPOINTER(1,"Texture2D"),* (Rectangle *) RING_API_GETCPOINTER(2,"Rectangle"),* (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,"Texture2D"));
+ if (RING_API_ISCPOINTERNOTASSIGNED(2))
+ ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(2,"Rectangle"));
+ 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);
@@ -4044,4 +4062,5 @@ RING_API void ringlib_init(RingState *pRingState)
ring_vm_funcregister("drawtexture",ring_DrawTexture);
ring_vm_funcregister("drawtexturev",ring_DrawTextureV);
ring_vm_funcregister("drawtextureex",ring_DrawTextureEx);
+ ring_vm_funcregister("drawtexturerec",ring_DrawTextureRec);
}
