Update RingRayLib - raylib.c - Add Function : Image GenImageFontAtlas(CharInfo *chars, int charsCount, int fontSize, int padding, int packMethod)
@@ -4023,6 +4023,41 @@ RING_FUNC(ring_LoadFontData)
RING_API_ACCEPTINTVALUE(3) ;
}
+
+RING_FUNC(ring_GenImageFontAtlas)
+{
+ if ( RING_API_PARACOUNT != 5 ) {
+ RING_API_ERROR(RING_API_BADPARACOUNT);
+ return ;
+ }
+ if ( ! RING_API_ISPOINTER(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 = GenImageFontAtlas((CharInfo *) RING_API_GETCPOINTER(1,"CharInfo"), (int ) RING_API_GETNUMBER(2), (int ) RING_API_GETNUMBER(3), (int ) RING_API_GETNUMBER(4), (int ) 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);
@@ -4259,4 +4294,5 @@ RING_API void ringlib_init(RingState *pRingState)
ring_vm_funcregister("loadfontex",ring_LoadFontEx);
ring_vm_funcregister("loadfontfromimage",ring_LoadFontFromImage);
ring_vm_funcregister("loadfontdata",ring_LoadFontData);
+ ring_vm_funcregister("genimagefontatlas",ring_GenImageFontAtlas);
}
