Skip to content

Commit 5b4d2a9

Browse files
committed
update to 5.0
1 parent 4966129 commit 5b4d2a9

File tree

2 files changed

+64
-21
lines changed

2 files changed

+64
-21
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# raylib-freebasic -> v4.5
1+
# raylib-freebasic -> v5.0
22

33
[FreeBasic](https://freebasic.net/) bindings for [raylib](https://github.com/raysan5/raylib)
44

raylib.bi

+63-20
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@
3434
extern "C"
3535

3636
#define RAYLIB_H
37-
const RAYLIB_VERSION_MAJOR = 4
38-
const RAYLIB_VERSION_MINOR = 5
37+
const RAYLIB_VERSION_MAJOR = 5
38+
const RAYLIB_VERSION_MINOR = 0
3939
const RAYLIB_VERSION_PATCH = 0
40-
#define RAYLIB_VERSION "4.5"
40+
#define RAYLIB_VERSION "5.0"
4141

4242
#ifndef PI
4343
const PI = 3.14159265358979323846
@@ -443,6 +443,18 @@ type FilePathList
443443
paths as zstring ptr ptr
444444
end type
445445

446+
type AutomationEvent
447+
frame as ulong
448+
type_ as ulong
449+
params(0 to 4) as long
450+
end type
451+
452+
type AutomationEventList
453+
capacity as ulong
454+
count as ulong
455+
events as AutomationEvent ptr
456+
end type
457+
446458
type ConfigFlags as long
447459
enum
448460
FLAG_VSYNC_HINT = &h00000040
@@ -734,6 +746,9 @@ enum
734746
PIXELFORMAT_UNCOMPRESSED_R32
735747
PIXELFORMAT_UNCOMPRESSED_R32G32B32
736748
PIXELFORMAT_UNCOMPRESSED_R32G32B32A32
749+
PIXELFORMAT_UNCOMPRESSED_R16
750+
PIXELFORMAT_UNCOMPRESSED_R16G16B16
751+
PIXELFORMAT_UNCOMPRESSED_R16G16B16A16
737752
PIXELFORMAT_COMPRESSED_DXT1_RGB
738753
PIXELFORMAT_COMPRESSED_DXT1_RGBA
739754
PIXELFORMAT_COMPRESSED_DXT3_RGBA
@@ -832,9 +847,13 @@ enum
832847
end enum
833848

834849
type TraceLogCallback as sub(byval logLevel as long, byval text as const zstring ptr, byval args as va_list)
835-
type LoadFileDataCallback as function(byval fileName as const zstring ptr, byval bytesRead as ulong ptr) as ubyte ptr
836-
type SaveFileDataCallback as function(byval fileName as const zstring ptr, byval data_ as any ptr, byval bytesToWrite as ulong) as boolean
850+
851+
type LoadFileDataCallback as function(byval fileName as const zstring ptr, byval dataSize as long ptr) as ubyte ptr
852+
853+
type SaveFileDataCallback as function(byval fileName as const zstring ptr, byval data_ as any ptr, byval dataSize as long) as boolean
854+
837855
type LoadFileTextCallback as function(byval fileName as const zstring ptr) as zstring ptr
856+
838857
type SaveFileTextCallback as function(byval fileName as const zstring ptr, byval text as zstring ptr) as boolean
839858

840859
declare sub InitWindow(byval width_ as long, byval height_ as long, byval title as const zstring ptr)
@@ -851,6 +870,7 @@ declare function IsWindowState(byval flag as ulong) as boolean
851870
declare sub SetWindowState(byval flags as ulong)
852871
declare sub ClearWindowState(byval flags as ulong)
853872
declare sub ToggleFullscreen()
873+
declare sub ToggleBorderlessWindow()
854874
declare sub MaximizeWindow()
855875
declare sub MinimizeWindow()
856876
declare sub RestoreWindow()
@@ -860,8 +880,10 @@ declare sub SetWindowTitle(byval title as const zstring ptr)
860880
declare sub SetWindowPosition(byval x as long, byval y as long)
861881
declare sub SetWindowMonitor(byval monitor as long)
862882
declare sub SetWindowMinSize(byval width_ as long, byval height_ as long)
883+
declare sub SetWindowMaxSize(byval width_ as long, byval height_ as long)
863884
declare sub SetWindowSize(byval width_ as long, byval height_ as long)
864885
declare sub SetWindowOpacity(byval opacity as single)
886+
declare sub SetWindowFocused()
865887
declare function GetWindowHandle() as any ptr
866888
declare function GetScreenWidth() as long
867889
declare function GetScreenHeight() as long
@@ -946,10 +968,10 @@ declare sub SetLoadFileDataCallback(byval callback as LoadFileDataCallback)
946968
declare sub SetSaveFileDataCallback(byval callback as SaveFileDataCallback)
947969
declare sub SetLoadFileTextCallback(byval callback as LoadFileTextCallback)
948970
declare sub SetSaveFileTextCallback(byval callback as SaveFileTextCallback)
949-
declare function LoadFileData(byval fileName as const zstring ptr, byval bytesRead as ulong ptr) as ubyte ptr
971+
declare function LoadFileData(byval fileName as const zstring ptr, byval dataSize as long ptr) as ubyte ptr
950972
declare sub UnloadFileData(byval data_ as ubyte ptr)
951-
declare function SaveFileData(byval fileName as const zstring ptr, byval data_ as any ptr, byval bytesToWrite as ulong) as boolean
952-
declare function ExportDataAsCode(byval data_ as const zstring ptr, byval size as ulong, byval fileName as const zstring ptr) as boolean
973+
declare function SaveFileData(byval fileName as const zstring ptr, byval data_ as any ptr, byval dataSize as long) as boolean
974+
declare function ExportDataAsCode(byval data_ as const zstring ptr, byval dataSize as long, byval fileName as const zstring ptr) as boolean
953975
declare function LoadFileText(byval fileName as const zstring ptr) as zstring ptr
954976
declare sub UnloadFileText(byval text as zstring ptr)
955977
declare function SaveFileText(byval fileName as const zstring ptr, byval text as zstring ptr) as boolean
@@ -964,7 +986,7 @@ declare function GetDirectoryPath(byval filePath as const zstring ptr) as const
964986
declare function GetPrevDirectoryPath(byval dirPath as const zstring ptr) as const zstring ptr
965987
declare function GetWorkingDirectory() as const zstring ptr
966988
declare function GetApplicationDirectory() as const zstring ptr
967-
declare function ChangeDirectory(byval dir as const zstring ptr) as boolean
989+
declare function ChangeDirectory(byval dir_ as const zstring ptr) as boolean
968990
declare function IsPathFile(byval path as const zstring ptr) as boolean
969991
declare function LoadDirectoryFiles(byval dirPath as const zstring ptr) as FilePathList
970992
declare function LoadDirectoryFilesEx(byval basePath as const zstring ptr, byval filter as const zstring ptr, byval scanSubdirs as boolean) as FilePathList
@@ -977,7 +999,19 @@ declare function CompressData(byval data_ as const ubyte ptr, byval dataSize as
977999
declare function DecompressData(byval compData as const ubyte ptr, byval compDataSize as long, byval dataSize as long ptr) as ubyte ptr
9781000
declare function EncodeDataBase64(byval data_ as const ubyte ptr, byval dataSize as long, byval outputSize as long ptr) as zstring ptr
9791001
declare function DecodeDataBase64(byval data_ as const ubyte ptr, byval outputSize as long ptr) as ubyte ptr
1002+
1003+
declare function LoadAutomationEventList(byval fileName as const zstring ptr) as AutomationEventList
1004+
declare sub UnloadAutomationEventList(byval list_ as AutomationEventList ptr)
1005+
declare function ExportAutomationEventList(byval list_ as AutomationEventList, byval fileName as const zstring ptr) as boolean
1006+
declare sub SetAutomationEventList(byval list_ as AutomationEventList ptr)
1007+
declare sub SetAutomationEventBaseFrame(byval frame_ as long)
1008+
declare sub StartAutomationEventRecording()
1009+
declare sub StopAutomationEventRecording()
1010+
declare sub PlayAutomationEvent(byval frame_ as AutomationEvent)
1011+
1012+
9801013
declare function IsKeyPressed(byval key as long) as boolean
1014+
declare function IsKeyPressedRepeat(byval key as long) as boolean
9811015
declare function IsKeyDown(byval key as long) as boolean
9821016
declare function IsKeyReleased(byval key as long) as boolean
9831017
declare function IsKeyUp(byval key as long) as boolean
@@ -1014,7 +1048,7 @@ declare function GetTouchPosition(byval index as long) as Vector2
10141048
declare function GetTouchPointId(byval index as long) as long
10151049
declare function GetTouchPointCount() as long
10161050
declare sub SetGesturesEnabled(byval flags as ulong)
1017-
declare function IsGestureDetected(byval gesture as long) as boolean
1051+
declare function IsGestureDetected(byval gesture as ulong) as boolean
10181052
declare function GetGestureDetected() as long
10191053
declare function GetGestureHoldDuration() as single
10201054
declare function GetGestureDragVector() as Vector2
@@ -1073,18 +1107,20 @@ declare function CheckCollisionPointLine(byval point_ as Vector2, byval p1 as Ve
10731107
declare function GetCollisionRec(byval rec1 as Rectangle, byval rec2 as Rectangle) as Rectangle
10741108
declare function LoadImage(byval fileName as const zstring ptr) as Image
10751109
declare function LoadImageRaw(byval fileName as const zstring ptr, byval width_ as long, byval height_ as long, byval format_ as long, byval headerSize as long) as Image
1110+
declare function LoadImageSVG(byval fileNameOrString as const zstring ptr, byval width_ as long, byval height_ as long) as Image
10761111
declare function LoadImageAnim(byval fileName as const zstring ptr, byval frames as long ptr) as Image
10771112
declare function LoadImageFromMemory(byval fileType as const zstring ptr, byval fileData as const ubyte ptr, byval dataSize as long) as Image
10781113
declare function LoadImageFromTexture(byval texture as Texture2D) as Image
10791114
declare function LoadImageFromScreen() as Image
10801115
declare function IsImageReady(byval image_ as Image) as byte
10811116
declare sub UnloadImage(byval image_ as Image)
10821117
declare function ExportImage(byval image_ as Image, byval fileName as const zstring ptr) as boolean
1118+
declare function ExportImageToMemory(byval image_ as Image, byval fileType as const zstring ptr, byval fileSie as long) as zstring ptr
10831119
declare function ExportImageAsCode(byval image_ as Image, byval fileName as const zstring ptr) as boolean
10841120
declare function GenImageColor(byval width_ as long, byval height_ as long, byval color as RLColor) as Image
1085-
declare function GenImageGradientV(byval width_ as long, byval height_ as long, byval top as RLColor, byval bottom as RLColor) as Image
1086-
declare function GenImageGradientH(byval width_ as long, byval height_ as long, byval left_ as RLColor, byval right_ as RLColor) as Image
1121+
declare function GenImageGradientLinear(byval width_ as long, byval height_ as long, byval direction as long, byval start_ as RLColor, byval end_ as RLColor) as Image
10871122
declare function GenImageGradientRadial(byval width_ as long, byval height_ as long, byval density as single, byval inner as RLColor, byval outer as RLColor) as Image
1123+
declare function GenImageGradientSquare(byval width_ as long, byval height_ as long, byval density as single, byval inner as RLColor, byval outer as RLColor) as Image
10881124
declare function GenImageChecked(byval width_ as long, byval height_ as long, byval checksX as long, byval checksY as long, byval col1 as RLColor, byval col2 as RLColor) as Image
10891125
declare function GenImageWhiteNoise(byval width_ as long, byval height_ as long, byval factor as single) as Image
10901126
declare function GenImagePerlinNoise(byval width_ as long, byval height_ as long, byval offsetX as long, byval offsetY as long, byval scale as single) as Image
@@ -1109,6 +1145,7 @@ declare sub ImageMipmaps(byval image_ as Image ptr)
11091145
declare sub ImageDither(byval image_ as Image ptr, byval rBpp as long, byval gBpp as long, byval bBpp as long, byval aBpp as long)
11101146
declare sub ImageFlipVertical(byval image_ as Image ptr)
11111147
declare sub ImageFlipHorizontal(byval image_ as Image ptr)
1148+
declare sub ImageRotate(byval image_ as Image ptr, byval degrees as long)
11121149
declare sub ImageRotateCW(byval image_ as Image ptr)
11131150
declare sub ImageRotateCCW(byval image_ as Image ptr)
11141151
declare sub ImageColorTint(byval image_ as Image ptr, byval color as RLColor)
@@ -1175,21 +1212,24 @@ declare sub SetPixelColor(byval dstPtr as any ptr, byval color as RLColor, byval
11751212
declare function GetPixelDataSize(byval width_ as long, byval height_ as long, byval format_ as long) as long
11761213
declare function GetFontDefault() as Font
11771214
declare function LoadFont(byval fileName as const zstring ptr) as Font
1178-
declare function LoadFontEx(byval fileName as const zstring ptr, byval fontSize as long, byval fontChars as long ptr, byval glyphCount as long) as Font
1215+
declare function LoadFontEx(byval fileName as const zstring ptr, byval fontSize as long, byval codepoints as long ptr, byval codepointCount as long) as Font
11791216
declare function LoadFontFromImage(byval image_ as Image, byval key as RLColor, byval firstChar as long) as Font
1180-
declare function LoadFontFromMemory(byval fileType as const zstring ptr, byval fileData as const ubyte ptr, byval dataSize as long, byval fontSize as long, byval fontChars as long ptr, byval glyphCount as long) as Font
1217+
declare function LoadFontFromMemory(byval fileType as const zstring ptr, byval fileData as const ubyte ptr, byval dataSize as long, byval fontSize as long, byval codepoints as long ptr, byval codepointCount as long) as Font
11811218
declare function IsFontReady(byval font as Font) as byte
1182-
declare function LoadFontData(byval fileData as const ubyte ptr, byval dataSize as long, byval fontSize as long, byval fontChars as long ptr, byval glyphCount as long, byval type as long) as GlyphInfo ptr
1183-
declare function GenImageFontAtlas(byval chars as const GlyphInfo ptr, byval recs as Rectangle ptr ptr, byval glyphCount as long, byval fontSize as long, byval padding as long, byval packMethod as long) as Image
1184-
declare sub UnloadFontData(byval chars as GlyphInfo ptr, byval glyphCount as long)
1219+
declare function LoadFontData(byval fileData as const ubyte ptr, byval dataSize as long, byval fontSize as long, byval codepoints as long ptr, byval codepointCount as long, byval type as long) as GlyphInfo ptr
1220+
declare function GenImageFontAtlas(byval glyphs as const GlyphInfo ptr, byval glyphRecs as Rectangle ptr ptr, byval glyphCount as long, byval fontSize as long, byval padding as long, byval packMethod as long) as Image
1221+
declare sub UnloadFontData(byval glyphs as GlyphInfo ptr, byval glyphCount as long)
11851222
declare sub UnloadFont(byval font as Font)
11861223
declare function ExportFontAsCode(byval font as Font, byval fileName as const zstring ptr) as boolean
11871224
declare sub DrawFPS(byval posX as long, byval posY as long)
11881225
declare sub DrawText(byval text as const zstring ptr, byval posX as long, byval posY as long, byval fontSize as long, byval color as RLColor)
11891226
declare sub DrawTextEx(byval font as Font, byval text as const zstring ptr, byval position as Vector2, byval fontSize as single, byval spacing as single, byval tint as RLColor)
11901227
declare sub DrawTextPro(byval font as Font, byval text as const zstring ptr, byval position as Vector2, byval origin as Vector2, byval rotation as single, byval fontSize as single, byval spacing as single, byval tint as RLColor)
11911228
declare sub DrawTextCodepoint(byval font as Font, byval codepoint as long, byval position as Vector2, byval fontSize as single, byval tint as RLColor)
1192-
declare sub DrawTextCodepoints(byval font as Font, byval codepoints as const long ptr, byval count as long, byval position as Vector2, byval fontSize as single, byval spacing as single, byval tint as RLColor)
1229+
declare sub DrawTextCodepoints(byval font as Font, byval codepoints as const long ptr, byval codepointCount as long, byval position as Vector2, byval fontSize as single, byval spacing as single, byval tint as RLColor)
1230+
1231+
declare sub SetTextLineSpacing(byval spaceing as long)
1232+
11931233
declare function MeasureText(byval text as const zstring ptr, byval fontSize as long) as long
11941234
declare function MeasureTextEx(byval font as Font, byval text as const zstring ptr, byval fontSize as single, byval spacing as single) as Vector2
11951235
declare function GetGlyphIndex(byval font as Font, byval codepoint as long) as long
@@ -1278,10 +1318,10 @@ declare function IsMaterialReady(byval material as Material) as byte
12781318
declare sub UnloadMaterial(byval material as Material)
12791319
declare sub SetMaterialTexture(byval material as Material ptr, byval mapType as long, byval texture as Texture2D)
12801320
declare sub SetModelMeshMaterial(byval model as Model ptr, byval meshId as long, byval materialId as long)
1281-
declare function LoadModelAnimations(byval fileName as const zstring ptr, byval animCount as ulong ptr) as ModelAnimation ptr
1321+
declare function LoadModelAnimations(byval fileName as const zstring ptr, byval animCount as long ptr) as ModelAnimation ptr
12821322
declare sub UpdateModelAnimation(byval model as Model, byval anim as ModelAnimation, byval frame as long)
12831323
declare sub UnloadModelAnimation(byval anim as ModelAnimation)
1284-
declare sub UnloadModelAnimations(byval animations as ModelAnimation ptr, byval count as ulong)
1324+
declare sub UnloadModelAnimations(byval animations as ModelAnimation ptr, byval count as long)
12851325
declare function IsModelAnimationValid(byval model as Model, byval anim as ModelAnimation) as boolean
12861326
declare function CheckCollisionSpheres(byval center1 as Vector3, byval radius1 as single, byval center2 as Vector3, byval radius2 as single) as boolean
12871327
declare function CheckCollisionBoxes(byval box1 as BoundingBox, byval box2 as BoundingBox) as boolean
@@ -1296,15 +1336,18 @@ declare sub InitAudioDevice()
12961336
declare sub CloseAudioDevice()
12971337
declare function IsAudioDeviceReady() as boolean
12981338
declare sub SetMasterVolume(byval volume as single)
1339+
declare function GetMasterVolume() as single
12991340
declare function LoadWave(byval fileName as const zstring ptr) as Wave
13001341
declare function LoadWaveFromMemory(byval fileType as const zstring ptr, byval fileData as const ubyte ptr, byval dataSize as long) as Wave
13011342
declare function IsWaveReady(byval wave as Wave) as byte
13021343
declare function LoadSound(byval fileName as const zstring ptr) as Sound
13031344
declare function LoadSoundFromWave(byval wave as Wave) as Sound
1345+
declare function LoadSoundAlias(byval source as Sound) as Sound
13041346
declare function IsSoundReady(byval sound as Sound) as byte
13051347
declare sub UpdateSound(byval sound as Sound, byval data_ as const any ptr, byval sampleCount as long)
13061348
declare sub UnloadWave(byval wave as Wave)
13071349
declare sub UnloadSound(byval sound as Sound)
1350+
declare sub UnloadSoundAlias(byval alias as Sound)
13081351
declare function ExportWave(byval wave as Wave, byval fileName as const zstring ptr) as boolean
13091352
declare function ExportWaveAsCode(byval wave as Wave, byval fileName as const zstring ptr) as boolean
13101353
declare sub PlaySound(byval sound as Sound)

0 commit comments

Comments
 (0)