diff --git a/luajit b/luajit index 8b8304f..5e3c45c 160000 --- a/luajit +++ b/luajit @@ -1 +1 @@ -Subproject commit 8b8304f16e03aa652be728f0dc957eadf42e4353 +Subproject commit 5e3c45c43bb0e0f1f2917d432e9d2dba12c42a6e diff --git a/raygui b/raygui index 4f933c1..865bb29 160000 --- a/raygui +++ b/raygui @@ -1 +1 @@ -Subproject commit 4f933c1e81c7af94716b7b420fc90db9de739839 +Subproject commit 865bb293764073c01e74314ef647464f1f10fd96 diff --git a/raylib b/raylib index 8065504..559ffc6 160000 --- a/raylib +++ b/raylib @@ -1 +1 @@ -Subproject commit 8065504aba66eeddc69111508ef8a267358467a6 +Subproject commit 559ffc633164c30824065a63324ba08efa651ee6 diff --git a/src/raylib.lua b/src/raylib.lua index 231a1a0..450b80c 100644 --- a/src/raylib.lua +++ b/src/raylib.lua @@ -231,8 +231,11 @@ ffi.cdef [[ } Wave; typedef struct rAudioBuffer rAudioBuffer; + typedef struct rAudioProcessor rAudioProcessor; + typedef struct AudioStream { rAudioBuffer *buffer; + rAudioProcessor *processor; unsigned int sampleRate; unsigned int sampleSize; @@ -635,6 +638,7 @@ ffi.cdef [[ } NPatchLayout; typedef void (*TraceLogCallback)(int logLevel, const char *text, va_list args); + typedef void (*AudioCallback)(void *bufferData, unsigned int frames); ]] -- raymath cdef @@ -1083,7 +1087,7 @@ ffi.cdef [[ RAYGUI_ICON_FILE_OPEN = 5, RAYGUI_ICON_FILE_SAVE = 6, RAYGUI_ICON_FILE_EXPORT = 7, - RAYGUI_ICON_FILE_NEW = 8, + RAYGUI_ICON_FILE_ADD = 8, RAYGUI_ICON_FILE_DELETE = 9, RAYGUI_ICON_FILETYPE_TEXT = 10, RAYGUI_ICON_FILETYPE_AUDIO = 11, @@ -1278,8 +1282,8 @@ ffi.cdef [[ RAYGUI_ICON_FILETYPE_BINARY = 200, RAYGUI_ICON_HEX = 201, RAYGUI_ICON_SHIELD = 202, - RAYGUI_ICON_203 = 203, - RAYGUI_ICON_204 = 204, + RAYGUI_ICON_FILE_NEW = 203, + RAYGUI_ICON_FOLDER_ADD = 204, RAYGUI_ICON_205 = 205, RAYGUI_ICON_206 = 206, RAYGUI_ICON_207 = 207, diff --git a/tools/api.h b/tools/api.h index 0517483..7bf5899 100644 --- a/tools/api.h +++ b/tools/api.h @@ -122,10 +122,10 @@ bool IsFileDropped(void) char **GetDroppedFiles(int *count) void ClearDroppedFiles(void) long GetFileModTime(const char *fileName) -unsigned char *CompressData(const unsigned char *data, int dataLength, int *compDataLength) -unsigned char *DecompressData(const unsigned char *compData, int compDataLength, int *dataLength) -char *EncodeDataBase64(const unsigned char *data, int dataLength, int *outputLength) -unsigned char *DecodeDataBase64(const unsigned char *data, int *outputLength) +unsigned char *CompressData(const unsigned char *data, int dataSize, int *compDataSize) +unsigned char *DecompressData(const unsigned char *compData, int compDataSize, int *dataSize) +char *EncodeDataBase64(const unsigned char *data, int dataSize, int *outputSize) +unsigned char *DecodeDataBase64(const unsigned char *data, int *outputSize) bool SaveStorageValue(unsigned int position, int value) int LoadStorageValue(unsigned int position) void OpenURL(const char *url) @@ -430,7 +430,6 @@ bool CheckCollisionBoxes(BoundingBox box1, BoundingBox box2) bool CheckCollisionBoxSphere(BoundingBox box, Vector3 center, float radius) RayCollision GetRayCollisionSphere(Ray ray, Vector3 center, float radius) RayCollision GetRayCollisionBox(Ray ray, BoundingBox box) -RayCollision GetRayCollisionModel(Ray ray, Model model) RayCollision GetRayCollisionMesh(Ray ray, Mesh mesh, Matrix transform) RayCollision GetRayCollisionTriangle(Ray ray, Vector3 p1, Vector3 p2, Vector3 p3) RayCollision GetRayCollisionQuad(Ray ray, Vector3 p1, Vector3 p2, Vector3 p3, Vector3 p4) @@ -490,4 +489,7 @@ void StopAudioStream(AudioStream stream) void SetAudioStreamVolume(AudioStream stream, float volume) void SetAudioStreamPitch(AudioStream stream, float pitch) void SetAudioStreamPan(AudioStream stream, float pan) -void SetAudioStreamBufferSizeDefault(int size) \ No newline at end of file +void SetAudioStreamBufferSizeDefault(int size) +void SetAudioStreamCallback(AudioStream stream, AudioCallback callback) +void AttachAudioStreamProcessor(AudioStream stream, AudioCallback processor) +void DetachAudioStreamProcessor(AudioStream stream, AudioCallback processor) diff --git a/tools/genbind.lua b/tools/genbind.lua index d9779e8..351b473 100644 --- a/tools/genbind.lua +++ b/tools/genbind.lua @@ -16,7 +16,8 @@ local structs = { "TextureCubemap", "TraceLogCallback", "PhysicsBody", "GestureEvent", "GuiStyle", "GuiTextBoxState", "TraceLogCallback", "VertexBuffer", "DrawCall", "RenderBatch", - "ShaderAttributeDataType", "MaterialMapIndex", "VrStereoConfig" + "ShaderAttributeDataType", "MaterialMapIndex", "VrStereoConfig", + "AudioCallback" } local rl_structs = { diff --git a/tools/raygui.h b/tools/raygui.h index e13c46c..b9ec1f8 100644 --- a/tools/raygui.h +++ b/tools/raygui.h @@ -48,6 +48,7 @@ void GuiDrawIcon(int iconId, int posX, int posY, int pixelSize, Color color) unsigned int *GuiGetIcons(void) unsigned int *GuiGetIconData(int iconId) void GuiSetIconData(int iconId, unsigned int *data) +void GuiSetIconScale(unsigned int scale) void GuiSetIconPixel(int iconId, int x, int y) void GuiClearIconPixel(int iconId, int x, int y) bool GuiCheckIconPixel(int iconId, int x, int y) \ No newline at end of file diff --git a/tools/raymath.h b/tools/raymath.h index 0665b06..2990bbf 100644 --- a/tools/raymath.h +++ b/tools/raymath.h @@ -56,7 +56,6 @@ float MatrixDeterminant(Matrix mat) float MatrixTrace(Matrix mat) Matrix MatrixTranspose(Matrix mat) Matrix MatrixInvert(Matrix mat) -Matrix MatrixNormalize(Matrix mat) Matrix MatrixIdentity(void) Matrix MatrixAdd(Matrix left, Matrix right) Matrix MatrixSubtract(Matrix left, Matrix right)