Skip to content

Commit 1f3d5f1

Browse files
committed
Update to latest dependency changes
1 parent dbd6703 commit 1f3d5f1

File tree

10 files changed

+166
-30
lines changed

10 files changed

+166
-30
lines changed

nuklear/Nuklear

raylib/README.md

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
*Raylib* 4.2
1+
*Raylib* 4.5-dev
22
=======
33
raylib is a simple and easy-to-use library to enjoy videogames programming.
44

55
https://www.raylib.com/
66

7-
Implemented APIs (558)
7+
Implemented APIs (566)
88
----------------
99

1010
| Name | Description |
@@ -24,6 +24,7 @@ Implemented APIs (558)
2424
| func CheckCollisionLines(startPos1, endPos1, startPos2, endPos2, collisionPoint) | Check the collision between two lines defined by two points each, returns collision point by reference |
2525
| func CheckCollisionPointCircle(point, center, radius) | Check if point is inside circle |
2626
| func CheckCollisionPointLine(point, p1, p2, threshold) | Check if point belongs to line created between two points [p1] and [p2] with defined margin in pixels [threshold] |
27+
| func CheckCollisionPointPoly(point, points, pointCount) | Check if point is within a polygon described by array of vertices |
2728
| func CheckCollisionPointRec(point, rec) | Check if point is inside rectangle |
2829
| func CheckCollisionPointTriangle(point, p1, p2, p3) | Check if point is inside a triangle |
2930
| func CheckCollisionRecs(rec1, rec2) | Check collision between two rectangles |
@@ -33,7 +34,7 @@ Implemented APIs (558)
3334
| sub CloseAudioDevice() | Close the audio device and context |
3435
| func closePhysics() | n/a |
3536
| sub CloseWindow() | Close window and unload OpenGL context |
36-
| func CodepointToUTF8(codepoint, byteSize) | Encode one codepoint into UTF-8 byte array (array length returned as parameter) |
37+
| func CodepointToUTF8(codepoint, utf8Size) | Encode one codepoint into UTF-8 byte array (array length returned as parameter) |
3738
| func ColorAlpha(color, alpha) | Get color with alpha applied, alpha goes from 0.0f to 1.0f |
3839
| func ColorAlphaBlend(dst, src, tint) | Get src alpha-blended into dst color with tint |
3940
| func ColorFromHSV(hue, saturation, value) | Get a Color from HSV values, hue [0..360], saturation/value [0..1] |
@@ -158,6 +159,8 @@ Implemented APIs (558)
158159
| func GenImageGradientH(width, height, left, right) | Generate image: horizontal gradient |
159160
| func GenImageGradientRadial(width, height, density, inner, outer) | Generate image: radial gradient |
160161
| func GenImageGradientV(width, height, top, bottom) | Generate image: vertical gradient |
162+
| func GenImagePerlinNoise(width, height, offsetX, offsetY, scale) | Generate image: perlin noise |
163+
| func GenImageText(width, height, text) | Generate image: grayscale image from text data |
161164
| func GenImageWhiteNoise(width, height, factor) | Generate image: white noise |
162165
| func GenMeshCone(radius, height, slices) | Generate cone/pyramid mesh |
163166
| func GenMeshCube(width, height, length) | Generate cuboid mesh |
@@ -177,8 +180,10 @@ Implemented APIs (558)
177180
| func GetCameraMatrix2D(camera) | Get camera 2d transform matrix |
178181
| func GetCharPressed() | Get char pressed (unicode), call it multiple times for chars queued, returns 0 when the queue is empty |
179182
| func GetClipboardText() | Get clipboard text content |
180-
| func GetCodepoint(text, bytesProcessed) | Get next codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure |
183+
| func GetCodepoint(text, codepointSize) | Get next codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure |
181184
| func GetCodepointCount(text) | Get total number of codepoints in a UTF-8 encoded string |
185+
| func GetCodepointNext(text, codepointSize) | Get next codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure |
186+
| func GetCodepointPrevious(text, codepointSize) | Get previous codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure |
182187
| func GetCollisionRec(rec1, rec2) | Get collision rectangle for two rectangles collision |
183188
| func GetColor(hexValue) | Get Color structure from hexadecimal value |
184189
| func GetCurrentMonitor() | Get current connected monitor |
@@ -315,8 +320,10 @@ Implemented APIs (558)
315320
| sub ImageCrop(image, crop) | Crop an image to a defined rectangle |
316321
| sub ImageDither(image, rBpp, gBpp, bBpp, aBpp) | Dither image data to 16bpp or lower (Floyd-Steinberg dithering) |
317322
| sub ImageDraw(dst, src, srcRec, dstRec, tint) | Draw a source image within a destination image (tint applied to source) |
318-
| sub ImageDrawCircle(dst, centerX, centerY, radius, color) | Draw circle within an image |
319-
| sub ImageDrawCircleV(dst, center, radius, color) | Draw circle within an image (Vector version) |
323+
| sub ImageDrawCircle(dst, centerX, centerY, radius, color) | Draw a filled circle within an image |
324+
| sub ImageDrawCircleLines(dst, centerX, centerY, radius, color) | Draw circle outline within an image |
325+
| sub ImageDrawCircleLinesV(dst, center, radius, color) | Draw circle outline within an image (Vector version) |
326+
| sub ImageDrawCircleV(dst, center, radius, color) | Draw a filled circle within an image (Vector version) |
320327
| sub ImageDrawLine(dst, startPosX, startPosY, endPosX, endPosY, color) | Draw line within an image |
321328
| sub ImageDrawLineV(dst, start, end, color) | Draw line within an image (Vector version) |
322329
| sub ImageDrawPixel(dst, posX, posY, color) | Draw pixel within an image |
@@ -408,6 +415,7 @@ Implemented APIs (558)
408415
| func LoadTexture(fileName) | Load texture from file into GPU memory (VRAM) |
409416
| func LoadTextureCubemap(image, layout) | Load cubemap from image, multiple image cubemap layouts supported |
410417
| func LoadTextureFromImage(image) | Load texture from image data |
418+
| func LoadUTF8(codepoints, length) | Load UTF-8 text encoded from codepoints array |
411419
| func LoadWave(fileName) | Load wave data from file |
412420
| func LoadWaveFromMemory(fileType, fileData, dataSize) | Load wave from memory buffer, fileType refers to extension: i.e. '.wav' |
413421
| func LoadWaveSamples(wave) | Load samples data from wave as a 32bit float data array |
@@ -515,7 +523,6 @@ Implemented APIs (558)
515523
| sub SwapScreenBuffer() | Swap back buffer with front buffer (screen drawing) |
516524
| sub TakeScreenshot(fileName) | Takes a screenshot of current screen (filename extension defines format) |
517525
| sub TextAppend(text, append, position) | Append text at specific position and move cursor! |
518-
| func TextCodepointsToUTF8(codepoints, length) | Encode text as codepoints array into UTF-8 text string (WARNING: memory must be freed!) |
519526
| func TextCopy(dst, src) | Copy one string to another, returns bytes copied |
520527
| func TextFindIndex(text, find) | Find first text occurrence within a string |
521528
| func TextFormat(text, args) | Text formatting with variables (sprintf() style) |
@@ -549,6 +556,7 @@ Implemented APIs (558)
549556
| sub UnloadShader(shader) | Unload shader from GPU memory (VRAM) |
550557
| sub UnloadSound(sound) | Unload sound |
551558
| sub UnloadTexture(texture) | Unload texture from GPU memory (VRAM) |
559+
| sub UnloadUTF8(text) | Unload UTF-8 text encoded from codepoints array |
552560
| sub UnloadWave(wave) | Unload wave data |
553561
| sub UnloadWaveSamples(samples) | Unload samples data loaded with LoadWaveSamples() |
554562
| sub UpdateAudioStream(stream, data, frameCount) | Update audio stream buffers with data |

raylib/func-def.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
{5, 5, "CHECKCOLLISIONLINES", cmd_checkcollisionlines},
77
{3, 3, "CHECKCOLLISIONPOINTCIRCLE", cmd_checkcollisionpointcircle},
88
{4, 4, "CHECKCOLLISIONPOINTLINE", cmd_checkcollisionpointline},
9+
{3, 3, "CHECKCOLLISIONPOINTPOLY", cmd_checkcollisionpointpoly},
910
{2, 2, "CHECKCOLLISIONPOINTREC", cmd_checkcollisionpointrec},
1011
{4, 4, "CHECKCOLLISIONPOINTTRIANGLE", cmd_checkcollisionpointtriangle},
1112
{2, 2, "CHECKCOLLISIONRECS", cmd_checkcollisionrecs},
@@ -38,6 +39,8 @@
3839
{4, 4, "GENIMAGEGRADIENTH", cmd_genimagegradienth},
3940
{5, 5, "GENIMAGEGRADIENTRADIAL", cmd_genimagegradientradial},
4041
{4, 4, "GENIMAGEGRADIENTV", cmd_genimagegradientv},
42+
{5, 5, "GENIMAGEPERLINNOISE", cmd_genimageperlinnoise},
43+
{3, 3, "GENIMAGETEXT", cmd_genimagetext},
4144
{3, 3, "GENIMAGEWHITENOISE", cmd_genimagewhitenoise},
4245
{3, 3, "GENMESHCONE", cmd_genmeshcone},
4346
{3, 3, "GENMESHCUBE", cmd_genmeshcube},
@@ -57,6 +60,8 @@
5760
{0, 0, "GETCLIPBOARDTEXT", cmd_getclipboardtext},
5861
{1, 1, "GETCODEPOINT", cmd_getcodepoint},
5962
{1, 1, "GETCODEPOINTCOUNT", cmd_getcodepointcount},
63+
{1, 1, "GETCODEPOINTNEXT", cmd_getcodepointnext},
64+
{1, 1, "GETCODEPOINTPREVIOUS", cmd_getcodepointprevious},
6065
{2, 2, "GETCOLLISIONREC", cmd_getcollisionrec},
6166
{1, 1, "GETCOLOR", cmd_getcolor},
6267
{0, 0, "GETCURRENTMONITOR", cmd_getcurrentmonitor},
@@ -198,6 +203,7 @@
198203
{1, 1, "LOADTEXTURE", cmd_loadtexture},
199204
{2, 2, "LOADTEXTURECUBEMAP", cmd_loadtexturecubemap},
200205
{1, 1, "LOADTEXTUREFROMIMAGE", cmd_loadtexturefromimage},
206+
{2, 2, "LOADUTF8", cmd_loadutf8},
201207
{1, 1, "LOADWAVE", cmd_loadwave},
202208
{3, 3, "LOADWAVEFROMMEMORY", cmd_loadwavefrommemory},
203209
{1, 1, "LOADWAVESAMPLES", cmd_loadwavesamples},
@@ -208,7 +214,6 @@
208214
{3, 3, "SAVEFILEDATA", cmd_savefiledata},
209215
{2, 2, "SAVEFILETEXT", cmd_savefiletext},
210216
{1, 1, "SETGAMEPADMAPPINGS", cmd_setgamepadmappings},
211-
{2, 2, "TEXTCODEPOINTSTOUTF8", cmd_textcodepointstoutf8},
212217
{2, 2, "TEXTCOPY", cmd_textcopy},
213218
{2, 2, "TEXTFINDINDEX", cmd_textfindindex},
214219
{3, 3, "TEXTINSERT", cmd_textinsert},

raylib/func.h

Lines changed: 76 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,18 @@ static int cmd_checkcollisionpointline(int argc, slib_par_t *params, var_t *retv
9595
return 1;
9696
}
9797

98+
//
99+
// Check if point is within a polygon described by array of vertices
100+
//
101+
static int cmd_checkcollisionpointpoly(int argc, slib_par_t *params, var_t *retval) {
102+
auto point = get_param_vec2(argc, params, 0);
103+
auto points = (Vector2 *)get_param_vec2_array(argc, params, 1);
104+
auto pointCount = get_param_int(argc, params, 2, 0);
105+
auto fnResult = CheckCollisionPointPoly(point, points, pointCount);
106+
v_setint(retval, fnResult);
107+
return 1;
108+
}
109+
98110
//
99111
// Check if point is inside rectangle
100112
//
@@ -148,9 +160,9 @@ static int cmd_checkcollisionspheres(int argc, slib_par_t *params, var_t *retval
148160
//
149161
static int cmd_codepointtoutf8(int argc, slib_par_t *params, var_t *retval) {
150162
auto codepoint = get_param_int(argc, params, 0, 0);
151-
auto byteSize = 0;
152-
auto fnResult = (const char *)CodepointToUTF8(codepoint, &byteSize);
153-
v_setstrn(retval, fnResult, byteSize);
163+
auto utf8Size = 0;
164+
auto fnResult = (const char *)CodepointToUTF8(codepoint, &utf8Size);
165+
v_setstrn(retval, fnResult, utf8Size);
154166
MemFree((void *)fnResult);
155167
return 1;
156168
}
@@ -505,6 +517,32 @@ static int cmd_genimagegradientv(int argc, slib_par_t *params, var_t *retval) {
505517
return 1;
506518
}
507519

520+
//
521+
// Generate image: perlin noise
522+
//
523+
static int cmd_genimageperlinnoise(int argc, slib_par_t *params, var_t *retval) {
524+
auto width = get_param_int(argc, params, 0, 0);
525+
auto height = get_param_int(argc, params, 1, 0);
526+
auto offsetX = get_param_int(argc, params, 2, 0);
527+
auto offsetY = get_param_int(argc, params, 3, 0);
528+
auto scale = get_param_num(argc, params, 4, 0);
529+
auto fnResult = GenImagePerlinNoise(width, height, offsetX, offsetY, scale);
530+
v_setimage(retval, fnResult);
531+
return 1;
532+
}
533+
534+
//
535+
// Generate image: grayscale image from text data
536+
//
537+
static int cmd_genimagetext(int argc, slib_par_t *params, var_t *retval) {
538+
auto width = get_param_int(argc, params, 0, 0);
539+
auto height = get_param_int(argc, params, 1, 0);
540+
auto text = get_param_str(argc, params, 2, 0);
541+
auto fnResult = GenImageText(width, height, text);
542+
v_setimage(retval, fnResult);
543+
return 1;
544+
}
545+
508546
//
509547
// Generate image: white noise
510548
//
@@ -713,8 +751,8 @@ static int cmd_getclipboardtext(int argc, slib_par_t *params, var_t *retval) {
713751
//
714752
static int cmd_getcodepoint(int argc, slib_par_t *params, var_t *retval) {
715753
auto text = get_param_str(argc, params, 0, 0);
716-
auto bytesProcessed = (int *)0;
717-
auto fnResult = GetCodepoint(text, bytesProcessed);
754+
auto codepointSize = (int *)0;
755+
auto fnResult = GetCodepoint(text, codepointSize);
718756
v_setint(retval, fnResult);
719757
return 1;
720758
}
@@ -729,6 +767,28 @@ static int cmd_getcodepointcount(int argc, slib_par_t *params, var_t *retval) {
729767
return 1;
730768
}
731769

770+
//
771+
// Get next codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure
772+
//
773+
static int cmd_getcodepointnext(int argc, slib_par_t *params, var_t *retval) {
774+
auto text = get_param_str(argc, params, 0, 0);
775+
auto codepointSize = (int *)0;
776+
auto fnResult = GetCodepointNext(text, codepointSize);
777+
v_setint(retval, fnResult);
778+
return 1;
779+
}
780+
781+
//
782+
// Get previous codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure
783+
//
784+
static int cmd_getcodepointprevious(int argc, slib_par_t *params, var_t *retval) {
785+
auto text = get_param_str(argc, params, 0, 0);
786+
auto codepointSize = (int *)0;
787+
auto fnResult = GetCodepointPrevious(text, codepointSize);
788+
v_setint(retval, fnResult);
789+
return 1;
790+
}
791+
732792
//
733793
// Get collision rectangle for two rectangles collision
734794
//
@@ -2312,6 +2372,17 @@ static int cmd_loadtexturefromimage(int argc, slib_par_t *params, var_t *retval)
23122372
return result;
23132373
}
23142374

2375+
//
2376+
// Load UTF-8 text encoded from codepoints array
2377+
//
2378+
static int cmd_loadutf8(int argc, slib_par_t *params, var_t *retval) {
2379+
auto codepoints = (const int *)get_param_int_t(argc, params, 0, 0);
2380+
auto length = get_param_int(argc, params, 1, 0);
2381+
auto fnResult = (const char *)LoadUTF8(codepoints, length);
2382+
v_setstr(retval, fnResult);
2383+
return 1;
2384+
}
2385+
23152386
//
23162387
// Load wave data from file
23172388
//
@@ -2434,17 +2505,6 @@ static int cmd_setgamepadmappings(int argc, slib_par_t *params, var_t *retval) {
24342505
return 1;
24352506
}
24362507

2437-
//
2438-
// Encode text as codepoints array into UTF-8 text string (WARNING: memory must be freed!)
2439-
//
2440-
static int cmd_textcodepointstoutf8(int argc, slib_par_t *params, var_t *retval) {
2441-
auto codepoints = (const int *)get_param_int_t(argc, params, 0, 0);
2442-
auto length = get_param_int(argc, params, 1, 0);
2443-
auto fnResult = (const char *)TextCodepointsToUTF8(codepoints, length);
2444-
v_setstr(retval, fnResult);
2445-
return 1;
2446-
}
2447-
24482508
//
24492509
// Copy one string to another, returns bytes copied
24502510
//

raylib/proc-def.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,8 @@
120120
{5, 5, "IMAGEDITHER", cmd_imagedither},
121121
{5, 5, "IMAGEDRAW", cmd_imagedraw},
122122
{5, 5, "IMAGEDRAWCIRCLE", cmd_imagedrawcircle},
123+
{5, 5, "IMAGEDRAWCIRCLELINES", cmd_imagedrawcirclelines},
124+
{4, 4, "IMAGEDRAWCIRCLELINESV", cmd_imagedrawcirclelinesv},
123125
{4, 4, "IMAGEDRAWCIRCLEV", cmd_imagedrawcirclev},
124126
{6, 6, "IMAGEDRAWLINE", cmd_imagedrawline},
125127
{4, 4, "IMAGEDRAWLINEV", cmd_imagedrawlinev},
@@ -232,6 +234,7 @@
232234
{1, 1, "UNLOADSHADER", cmd_unloadshader},
233235
{1, 1, "UNLOADSOUND", cmd_unloadsound},
234236
{1, 1, "UNLOADTEXTURE", cmd_unloadtexture},
237+
{1, 1, "UNLOADUTF8", cmd_unloadutf8},
235238
{1, 1, "UNLOADWAVE", cmd_unloadwave},
236239
{1, 1, "UNLOADWAVESAMPLES", cmd_unloadwavesamples},
237240
{3, 3, "UPDATEAUDIOSTREAM", cmd_updateaudiostream},

raylib/proc.h

Lines changed: 48 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1611,7 +1611,7 @@ static int cmd_imagedraw(int argc, slib_par_t *params, var_t *retval) {
16111611
}
16121612

16131613
//
1614-
// Draw circle within an image
1614+
// Draw a filled circle within an image
16151615
//
16161616
static int cmd_imagedrawcircle(int argc, slib_par_t *params, var_t *retval) {
16171617
int result;
@@ -1630,7 +1630,44 @@ static int cmd_imagedrawcircle(int argc, slib_par_t *params, var_t *retval) {
16301630
}
16311631

16321632
//
1633-
// Draw circle within an image (Vector version)
1633+
// Draw circle outline within an image
1634+
//
1635+
static int cmd_imagedrawcirclelines(int argc, slib_par_t *params, var_t *retval) {
1636+
int result;
1637+
int dst_id = get_image_id(argc, params, 0, retval);
1638+
if (dst_id != -1) {
1639+
auto centerX = get_param_int(argc, params, 1, 0);
1640+
auto centerY = get_param_int(argc, params, 2, 0);
1641+
auto radius = get_param_int(argc, params, 3, 0);
1642+
auto color = get_param_color(argc, params, 4);
1643+
ImageDrawCircleLines(&_imageMap.at(dst_id), centerX, centerY, radius, color);
1644+
result = 1;
1645+
} else {
1646+
result = 0;
1647+
}
1648+
return result;
1649+
}
1650+
1651+
//
1652+
// Draw circle outline within an image (Vector version)
1653+
//
1654+
static int cmd_imagedrawcirclelinesv(int argc, slib_par_t *params, var_t *retval) {
1655+
int result;
1656+
int dst_id = get_image_id(argc, params, 0, retval);
1657+
if (dst_id != -1) {
1658+
auto center = get_param_vec2(argc, params, 1);
1659+
auto radius = get_param_int(argc, params, 2, 0);
1660+
auto color = get_param_color(argc, params, 3);
1661+
ImageDrawCircleLinesV(&_imageMap.at(dst_id), center, radius, color);
1662+
result = 1;
1663+
} else {
1664+
result = 0;
1665+
}
1666+
return result;
1667+
}
1668+
1669+
//
1670+
// Draw a filled circle within an image (Vector version)
16341671
//
16351672
static int cmd_imagedrawcirclev(int argc, slib_par_t *params, var_t *retval) {
16361673
int result;
@@ -3087,6 +3124,15 @@ static int cmd_unloadtexture(int argc, slib_par_t *params, var_t *retval) {
30873124
return result;
30883125
}
30893126

3127+
//
3128+
// Unload UTF-8 text encoded from codepoints array
3129+
//
3130+
static int cmd_unloadutf8(int argc, slib_par_t *params, var_t *retval) {
3131+
auto text = (char *)get_param_str(argc, params, 0, 0);
3132+
UnloadUTF8(text);
3133+
return 1;
3134+
}
3135+
30903136
//
30913137
// Unload wave data
30923138
//

raylib/raylib

Submodule raylib updated 61 files

robin-hood-hashing

units/font_test.bas

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import font1
2+
import font2
3+
4+
for i = 50 to 200 step 40
5+
font1.drawtext(10, 100+i, i, "This is some text!")
6+
next i
7+
8+
font2.drawtext(10, 20, 70, true, "()ABCDEFGHIJKLMNOPQRSTUVWXYZ *+,-./<>1234567890;")
9+
font2.drawtext(10, 40, 100, true, "()ABCDEFGHIJKLMNOPQRSTUVWXYZ *+,-./<>1234567890;")
10+
font2.drawtext(10, 60, 70, false, "()ABCDEFGHIJKLMNOPQRSTUVWXYZ *+,-./<>1234567890;")
11+
font2.drawtext(10, 80, 100, false, "()ABCDEFGHIJKLMNOPQRSTUVWXYZ *+,-./<>1234567890;")
12+
13+
showpage
14+
pause

0 commit comments

Comments
 (0)