Skip to content

Commit 44281e7

Browse files
author
Chris Warren-Smith
committed
RAYLIB: allow make to depend on sbasic as part of flatpak processing
1 parent 9d9d017 commit 44281e7

File tree

9 files changed

+237
-55
lines changed

9 files changed

+237
-55
lines changed

raylib/Makefile.am

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@
88
generated = func-def.h proc-def.h proc.h func.h
99
sbasic=sbasic
1010

11+
CLEANFILES = $(generated)
12+
1113
raylib/tools/rlparser/output/raylib_api.json: raylib/src/raylib.h raylib/tools/rlparser/rlparser.c
12-
(cd raylib/tools/rlparser && make && ./rlparser --format JSON --input ../../src/raylib.h --output raylib_api.json)
14+
(cd raylib/tools/rlparser && make && ./rlparser --format JSON --input ../../src/raylib.h --output output/raylib_api.json)
1315

1416
UNSUPPORTED.md: $(generated)
1517
$(sbasic) mkraylib.bas unsupported > $@
@@ -21,7 +23,11 @@ $(generated): raylib/parser/raylib_api.json mkraylib.bas
2123
$(sbasic) mkraylib.bas $@ > $@
2224
@touch main.cpp
2325

24-
gen: $(generated) README.md
26+
gen: $(generated)
27+
28+
gen: $(generated)
29+
30+
all-am: $(generated) README.md
2531

2632
AM_CXXFLAGS=-fno-rtti -std=c++14 -fpermissive
2733
AM_CPPFLAGS = -Iraylib/src -Iraylib/src/external/glfw/include -Iraylib/src/external/glfw/deps/mingw \
@@ -40,7 +46,6 @@ libraylib_la_SOURCES = \
4046
raylib/src/rshapes.c \
4147
raylib/src/rtextures.c \
4248
raylib/src/rtext.c \
43-
raylib/src/utils.c \
4449
../include/param.cpp \
4550
../include/hashmap.cpp \
4651
physac.cpp \

raylib/README.md

Lines changed: 33 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ raylib is a simple and easy-to-use library to enjoy videogames programming.
44

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

7-
Implemented APIs (633)
7+
Implemented APIs (646)
88
----------------
99

1010
| Name | Description |
@@ -16,7 +16,7 @@ Implemented APIs (633)
1616
| sub BeginScissorMode(x, y, width, height) | Begin scissor mode (define screen area for following drawing) |
1717
| sub BeginShaderMode(shader) | Begin custom shader drawing |
1818
| sub BeginTextureMode(target) | Begin drawing to render texture |
19-
| func ChangeDirectory(dir) | Change working directory, return true on success |
19+
| func ChangeDirectory(dirPath) | Change working directory, return true on success |
2020
| func CheckCollisionBoxes(box1, box2) | Check collision between two bounding boxes |
2121
| func CheckCollisionBoxSphere(box, center, radius) | Check collision between box and sphere |
2222
| func CheckCollisionCircleLine(center, radius, p1, p2) | Check if circle collides with a line created betweeen two points [p1] and [p2] |
@@ -52,10 +52,11 @@ Implemented APIs (633)
5252
| func ComputeCRC32(data, dataSize) | Compute CRC32 hash code |
5353
| func ComputeMD5(data, dataSize) | Compute MD5 hash code, returns static int[4] (16 bytes) |
5454
| func ComputeSHA1(data, dataSize) | Compute SHA1 hash code, returns static int[5] (20 bytes) |
55+
| func ComputeSHA256(data, dataSize) | Compute SHA256 hash code, returns static int[8] (32 bytes) |
5556
| func createPhysicsbodycircle() | n/a |
5657
| func createPhysicsbodypolygon() | n/a |
5758
| func createPhysicsbodyrectangle() | n/a |
58-
| func DecodeDataBase64(data, outputSize) | Decode Base64 string data, memory must be MemFree() |
59+
| func DecodeDataBase64(text, outputSize) | Decode Base64 string (expected NULL terminated), memory must be MemFree() |
5960
| func DecompressData(compData, compDataSize, dataSize) | Decompress data (DEFLATE algorithm), memory must be MemFree() |
6061
| func destroyPhysicsbody() | n/a |
6162
| func DirectoryExists(dirPath) | Check if a directory path exists |
@@ -85,11 +86,14 @@ Implemented APIs (633)
8586
| sub DrawCylinderWiresEx(startPos, endPos, startRadius, endRadius, sides, color) | Draw a cylinder wires with base at startPos and top at endPos |
8687
| sub DrawEllipse(centerX, centerY, radiusH, radiusV, color) | Draw ellipse |
8788
| sub DrawEllipseLines(centerX, centerY, radiusH, radiusV, color) | Draw ellipse outline |
89+
| sub DrawEllipseLinesV(center, radiusH, radiusV, color) | Draw ellipse outline (Vector version) |
90+
| sub DrawEllipseV(center, radiusH, radiusV, color) | Draw ellipse (Vector version) |
8891
| sub DrawFPS(posX, posY) | Draw current FPS |
8992
| sub DrawGrid(slices, spacing) | Draw a grid (centered at (0, 0, 0)) |
9093
| sub DrawLine(startPosX, startPosY, endPosX, endPosY, color) | Draw a line |
9194
| sub DrawLine3D(startPos, endPos, color) | Draw a line in 3D world space |
9295
| sub DrawLineBezier(startPos, endPos, thick, color) | Draw line segment cubic-bezier in-out interpolation |
96+
| sub DrawLineDashed(startPos, endPos, dashSize, spaceSize, color) | Draw a dashed line |
9397
| sub DrawLineEx(startPos, endPos, thick, color) | Draw a line (using triangles/quads) |
9498
| sub DrawLineStrip(points, pointCount, color) | Draw lines sequence (using gl lines) |
9599
| sub DrawLineV(startPos, endPos, color) | Draw a line (using gl lines) |
@@ -108,7 +112,7 @@ Implemented APIs (633)
108112
| sub DrawPolyLinesEx(center, sides, radius, rotation, lineThick, color) | Draw a polygon outline of n sides with extended parameters |
109113
| sub DrawRay(ray, color) | Draw a ray line |
110114
| sub DrawRectangle(posX, posY, width, height, color) | Draw a color-filled rectangle |
111-
| sub DrawRectangleGradientEx(rec, topLeft, bottomLeft, topRight, bottomRight) | Draw a gradient-filled rectangle with custom vertex colors |
115+
| sub DrawRectangleGradientEx(rec, topLeft, bottomLeft, bottomRight, topRight) | Draw a gradient-filled rectangle with custom vertex colors |
112116
| sub DrawRectangleGradientH(posX, posY, width, height, left, right) | Draw a horizontal-gradient-filled rectangle |
113117
| sub DrawRectangleGradientV(posX, posY, width, height, top, bottom) | Draw a vertical-gradient-filled rectangle |
114118
| sub DrawRectangleLines(posX, posY, width, height, color) | Draw rectangle outline |
@@ -153,7 +157,7 @@ Implemented APIs (633)
153157
| sub DrawTriangleStrip3D(points, pointCount, color) | Draw a triangle strip defined by points |
154158
| sub EnableCursor() | Enables cursor (unlock cursor) |
155159
| sub EnableEventWaiting() | Enable waiting for events on EndDrawing(), no automatic event polling |
156-
| func EncodeDataBase64(data, dataSize, outputSize) | Encode data to Base64 string, memory must be MemFree() |
160+
| func EncodeDataBase64(data, dataSize, outputSize) | Encode data to Base64 string (includes NULL terminator), memory must be MemFree() |
157161
| sub EndBlendMode() | End blending mode (reset to default: alpha blending) |
158162
| sub EndDrawing() | End canvas drawing and swap buffers (double buffering) |
159163
| sub EndMode2D() | Ends 2D mode with custom camera |
@@ -173,7 +177,13 @@ Implemented APIs (633)
173177
| func ExportWave(wave, fileName) | Export wave data to file, returns true on success |
174178
| func ExportWaveAsCode(wave, fileName) | Export wave sample data to code (.h), returns true on success |
175179
| func Fade(color, alpha) | Get color with alpha applied, alpha goes from 0.0f to 1.0f |
180+
| func FileCopy(srcPath, dstPath) | Copy file from one path to another, dstPath created if it doesn't exist |
176181
| func FileExists(fileName) | Check if file exists |
182+
| func FileMove(srcPath, dstPath) | Move file from one directory to another, dstPath created if it doesn't exist |
183+
| func FileRemove(fileName) | Remove file (if exists) |
184+
| func FileRename(fileName, fileRename) | Rename file (if exists) |
185+
| func FileTextFindIndex(fileName, search) | Find text in existing file |
186+
| func FileTextReplace(fileName, search, replacement) | Replace text in an existing file |
177187
| func GenImageCellular(width, height, tileSize) | Generate image: cellular algorithm, bigger tileSize means bigger cells |
178188
| func GenImageChecked(width, height, checksX, checksY, col1, col2) | Generate image: checked |
179189
| func GenImageColor(width, height, color) | Generate image: plain color |
@@ -218,8 +228,8 @@ Implemented APIs (633)
218228
| func GetFontDefault() | Get the default Font |
219229
| func GetFPS() | Get current FPS |
220230
| func GetFrameTime() | Get time in seconds for last frame drawn (delta time) |
221-
| func GetGamepadAxisCount(gamepad) | Get gamepad axis count for a gamepad |
222-
| func GetGamepadAxisMovement(gamepad, axis) | Get axis movement value for a gamepad axis |
231+
| func GetGamepadAxisCount(gamepad) | Get axis count for a gamepad |
232+
| func GetGamepadAxisMovement(gamepad, axis) | Get movement value for a gamepad axis |
223233
| func GetGamepadButtonPressed() | Get the last gamepad button pressed |
224234
| func GetGamepadName(gamepad) | Get gamepad internal name id |
225235
| func GetGestureDetected() | Get latest detected gesture |
@@ -282,6 +292,7 @@ Implemented APIs (633)
282292
| func GetSplinePointBezierQuad(p1, c2, p3, t) | Get (evaluate) spline point: Quadratic Bezier |
283293
| func GetSplinePointCatmullRom(p1, p2, p3, p4, t) | Get (evaluate) spline point: Catmull-Rom |
284294
| func GetSplinePointLinear(startPos, endPos, t) | Get (evaluate) spline point: Linear |
295+
| func GetTextBetween(text, begin, end) | Get text between two strings |
285296
| func GetTime() | Get elapsed time in seconds since InitWindow() |
286297
| func GetTouchPointCount() | Get number of touch points |
287298
| func GetTouchPointId(index) | Get touch point identifier for given index |
@@ -396,7 +407,7 @@ Implemented APIs (633)
396407
| func IsCursorHidden() | Check if cursor is not visible |
397408
| func IsCursorOnScreen() | Check if cursor is on the screen |
398409
| func IsFileDropped() | Check if a file has been dropped into window |
399-
| func IsFileExtension(fileName, ext) | Check file extension (including point: .png, .wav) |
410+
| func IsFileExtension(fileName, ext) | Check file extension (recommended include point: .png, .wav) |
400411
| func IsFileNameValid(fileName) | Check if fileName is valid for the platform/OS |
401412
| func IsFontValid(font) | Check if a font is valid (font data loaded, WARNING: GPU texture not checked) |
402413
| func IsGamepadAvailable(gamepad) | Check if a gamepad is available |
@@ -498,7 +509,7 @@ Implemented APIs (633)
498509
| func pollevents() | n/a |
499510
| sub PollInputEvents() | Register all input events |
500511
| func resetPhysics() | n/a |
501-
| sub RestoreWindow() | Set window state: not minimized/maximized |
512+
| sub RestoreWindow() | Restore window from being minimized/maximized |
502513
| sub ResumeAudioStream(stream) | Resume audio stream |
503514
| sub ResumeMusicStream(music) | Resume playing paused music |
504515
| sub ResumeSound(sound) | Resume a paused sound |
@@ -525,7 +536,7 @@ Implemented APIs (633)
525536
| sub SetMouseOffset(offsetX, offsetY) | Set mouse offset |
526537
| sub SetMousePosition(x, y) | Set mouse position XY |
527538
| sub SetMouseScale(scaleX, scaleY) | Set mouse scaling |
528-
| sub SetMusicPan(music, pan) | Set pan for a music (0.5 is center) |
539+
| sub SetMusicPan(music, pan) | Set pan for a music (-1.0 left, 0.0 center, 1.0 right) |
529540
| sub SetMusicPitch(music, pitch) | Set pitch for a music (1.0 is base level) |
530541
| sub SetMusicVolume(music, volume) | Set volume for music (1.0 is max level) |
531542
| func setPhysicsbodyangularvelocity() | n/a |
@@ -555,7 +566,7 @@ Implemented APIs (633)
555566
| sub SetShaderValueTexture(shader, locIndex, texture) | Set shader uniform value and bind the texture (sampler2d) |
556567
| sub SetShaderValueV(shader, locIndex, value, uniformType, count) | Set shader uniform value vector |
557568
| sub SetShapesTexture(texture, source) | Set texture and rectangle to be used on shapes drawing |
558-
| sub SetSoundPan(sound, pan) | Set pan for a sound (0.5 is center) |
569+
| sub SetSoundPan(sound, pan) | Set pan for a sound (-1.0 left, 0.0 center, 1.0 right) |
559570
| sub SetSoundPitch(sound, pitch) | Set pitch for a sound (1.0 is base level) |
560571
| sub SetSoundVolume(sound, volume) | Set volume for a sound (1.0 is max level) |
561572
| sub SetTargetFPS(fps) | Set target FPS (maximum) |
@@ -582,14 +593,16 @@ Implemented APIs (633)
582593
| sub StopSound(sound) | Stop playing a sound |
583594
| sub SwapScreenBuffer() | Swap back buffer with front buffer (screen drawing) |
584595
| sub TakeScreenshot(fileName) | Takes a screenshot of current screen (filename extension defines format) |
585-
| sub TextAppend(text, append, position) | Append text at specific position and move cursor! |
596+
| sub TextAppend(text, append, position) | Append text at specific position and move cursor |
586597
| func TextCopy(dst, src) | Copy one string to another, returns bytes copied |
587-
| func TextFindIndex(text, find) | Find first text occurrence within a string |
598+
| func TextFindIndex(text, search) | Find first text occurrence within a string, -1 if not found |
588599
| func TextFormat(text, args) | Text formatting with variables (sprintf() style) |
589600
| func TextInsert(text, insert, position) | Insert text in a position (WARNING: memory must be freed!) |
590601
| func TextIsEqual(text1, text2) | Check if two text string are equal |
591602
| func TextLength(text) | Get text length, checks for '\\0' ending |
592-
| func TextReplace(text, replace, by) | Replace text string (WARNING: memory must be freed!) |
603+
| func TextRemoveSpaces(text) | Remove text spaces, concat words |
604+
| func TextReplace(text, search, replacement) | Replace text string (WARNING: memory must be freed!) |
605+
| func TextReplaceBetween(text, begin, end, replacement) | Replace text between two specific strings (WARNING: memory must be freed!) |
593606
| func TextSubtext(text, position, length) | Get a piece of a text string |
594607
| func TextToCamel(text) | Get Camel case notation version of provided string |
595608
| func TextToFloat(text) | Get float value from text |
@@ -632,9 +645,9 @@ Implemented APIs (633)
632645
| sub UpdateModelAnimationBones(model, anim, frame) | Update model animation mesh bone matrices (GPU skinning) |
633646
| sub UpdateMusicStream(music) | Updates buffers for music streaming |
634647
| func updatePhysics() | n/a |
635-
| sub UpdateSound(sound, data, sampleCount) | Update sound buffer with new data |
636-
| sub UpdateTexture(texture, pixels) | Update GPU texture with new data |
637-
| sub UpdateTextureRec(texture, rec, pixels) | Update GPU texture rectangle with new data |
648+
| sub UpdateSound(sound, data, sampleCount) | Update sound buffer with new data (default data format: 32 bit float, stereo) |
649+
| sub UpdateTexture(texture, pixels) | Update GPU texture with new data (pixels should be able to fill texture) |
650+
| sub UpdateTextureRec(texture, rec, pixels) | Update GPU texture rectangle with new data (pixels and rec should fit in texture) |
638651
| sub UploadMesh(mesh, dynamic) | Upload mesh vertex data in GPU and provide VAO/VBO ids |
639652
| func waitevents() | n/a |
640653
| sub WaitTime(seconds) | Wait for some time (halt program execution) |
@@ -661,6 +674,7 @@ Unimplemented APIs
661674
| LoadFontData | Load font data for further use |
662675
| LoadMaterialDefault | Load default material (Supports: DIFFUSE, SPECULAR, NORMAL maps) |
663676
| LoadMaterials | Load materials from model file |
677+
| LoadTextLines | Load text as separate lines ('\\n') |
664678
| LoadVrStereoConfig | Load VR stereo config for VR simulator device parameters |
665679
| SetAudioStreamCallback | Audio thread callback to request new data |
666680
| SetLoadFileDataCallback | Set custom file binary data loader |
@@ -670,8 +684,9 @@ Unimplemented APIs
670684
| SetSaveFileTextCallback | Set custom file text data saver |
671685
| SetTraceLogCallback | Set custom trace log |
672686
| TextJoin | Join text strings with delimiter |
673-
| TextSplit | Split text into multiple strings |
687+
| TextSplit | Split text into multiple strings, using MAX_TEXTSPLIT_COUNT static strings |
674688
| UnloadFontData | Unload font chars info data (RAM) |
675689
| UnloadMaterial | Unload material from GPU memory (VRAM) |
690+
| UnloadTextLines | Unload text lines |
676691
| UnloadVrStereoConfig | Unload VR stereo config |
677692

raylib/func-def.h

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
{2, 2, "COMPUTECRC32", cmd_computecrc32},
3030
{2, 2, "COMPUTEMD5", cmd_computemd5},
3131
{2, 2, "COMPUTESHA1", cmd_computesha1},
32+
{2, 2, "COMPUTESHA256", cmd_computesha256},
3233
{1, 1, "DECODEDATABASE64", cmd_decodedatabase64},
3334
{2, 2, "DECOMPRESSDATA", cmd_decompressdata},
3435
{1, 1, "DIRECTORYEXISTS", cmd_directoryexists},
@@ -44,7 +45,13 @@
4445
{2, 2, "EXPORTWAVE", cmd_exportwave},
4546
{2, 2, "EXPORTWAVEASCODE", cmd_exportwaveascode},
4647
{2, 2, "FADE", cmd_fade},
48+
{2, 2, "FILECOPY", cmd_filecopy},
4749
{1, 1, "FILEEXISTS", cmd_fileexists},
50+
{2, 2, "FILEMOVE", cmd_filemove},
51+
{1, 1, "FILEREMOVE", cmd_fileremove},
52+
{2, 2, "FILERENAME", cmd_filerename},
53+
{2, 2, "FILETEXTFINDINDEX", cmd_filetextfindindex},
54+
{3, 3, "FILETEXTREPLACE", cmd_filetextreplace},
4855
{3, 3, "GENIMAGECELLULAR", cmd_genimagecellular},
4956
{6, 6, "GENIMAGECHECKED", cmd_genimagechecked},
5057
{3, 3, "GENIMAGECOLOR", cmd_genimagecolor},
@@ -146,6 +153,7 @@
146153
{4, 4, "GETSPLINEPOINTBEZIERQUAD", cmd_getsplinepointbezierquad},
147154
{5, 5, "GETSPLINEPOINTCATMULLROM", cmd_getsplinepointcatmullrom},
148155
{3, 3, "GETSPLINEPOINTLINEAR", cmd_getsplinepointlinear},
156+
{3, 3, "GETTEXTBETWEEN", cmd_gettextbetween},
149157
{0, 0, "GETTIME", cmd_gettime},
150158
{0, 0, "GETTOUCHPOINTCOUNT", cmd_gettouchpointcount},
151159
{1, 1, "GETTOUCHPOINTID", cmd_gettouchpointid},
@@ -218,9 +226,9 @@
218226
{1, 1, "LOADFILEDATA", cmd_loadfiledata},
219227
{1, 1, "LOADFILETEXT", cmd_loadfiletext},
220228
{1, 1, "LOADFONT", cmd_loadfont},
221-
{3, 3, "LOADFONTEX", cmd_loadfontex},
229+
{4, 4, "LOADFONTEX", cmd_loadfontex},
222230
{3, 3, "LOADFONTFROMIMAGE", cmd_loadfontfromimage},
223-
{5, 5, "LOADFONTFROMMEMORY", cmd_loadfontfrommemory},
231+
{6, 6, "LOADFONTFROMMEMORY", cmd_loadfontfrommemory},
224232
{1, 1, "LOADIMAGE", cmd_loadimage},
225233
{1, 1, "LOADIMAGEANIM", cmd_loadimageanim},
226234
{3, 3, "LOADIMAGEANIMFROMMEMORY", cmd_loadimageanimfrommemory},
@@ -259,7 +267,9 @@
259267
{3, 3, "TEXTINSERT", cmd_textinsert},
260268
{2, 2, "TEXTISEQUAL", cmd_textisequal},
261269
{1, 1, "TEXTLENGTH", cmd_textlength},
270+
{1, 1, "TEXTREMOVESPACES", cmd_textremovespaces},
262271
{3, 3, "TEXTREPLACE", cmd_textreplace},
272+
{4, 4, "TEXTREPLACEBETWEEN", cmd_textreplacebetween},
263273
{3, 3, "TEXTSUBTEXT", cmd_textsubtext},
264274
{1, 1, "TEXTTOCAMEL", cmd_texttocamel},
265275
{1, 1, "TEXTTOFLOAT", cmd_texttofloat},

0 commit comments

Comments
 (0)