diff --git a/luajit b/luajit index a91d0d9..8b8304f 160000 --- a/luajit +++ b/luajit @@ -1 +1 @@ -Subproject commit a91d0d9d3bba1a936669cfac3244509a0f2ac0e3 +Subproject commit 8b8304f16e03aa652be728f0dc957eadf42e4353 diff --git a/raygui b/raygui index de39a60..4f933c1 160000 --- a/raygui +++ b/raygui @@ -1 +1 @@ -Subproject commit de39a6064fa133a729c49ce8309bbbda7e847ebb +Subproject commit 4f933c1e81c7af94716b7b420fc90db9de739839 diff --git a/raylib b/raylib index b54e9db..8065504 160000 --- a/raylib +++ b/raylib @@ -1 +1 @@ -Subproject commit b54e9db7647ae6e5ed86a8a5d92dbd63157c89ac +Subproject commit 8065504aba66eeddc69111508ef8a267358467a6 diff --git a/src/raylib.lua b/src/raylib.lua index 6f7cd13..231a1a0 100644 --- a/src/raylib.lua +++ b/src/raylib.lua @@ -1014,6 +1014,15 @@ ffi.cdef [[ PROGRESS_PADDING = 16, } GuiProgressBarProperty; + typedef enum { + ARROWS_SIZE = 16, + ARROWS_VISIBLE, + SCROLL_SLIDER_PADDING, + SCROLL_SLIDER_SIZE, + SCROLL_PADDING, + SCROLL_SPEED, + } GuiScrollBarProperty; + typedef enum { CHECK_PADDING = 16 } GuiCheckBoxProperty; @@ -1025,30 +1034,19 @@ ffi.cdef [[ typedef enum { ARROW_PADDING = 16, - DROPDOWN_ITEMS_PADDING + DROPDOWN_ITEMS_SPACING } GuiDropdownBoxProperty; typedef enum { TEXT_INNER_PADDING = 16, - TEXT_LINES_PADDING, - COLOR_SELECTED_FG, - COLOR_SELECTED_BG + TEXT_LINES_SPACING } GuiTextBoxProperty; typedef enum { SPIN_BUTTON_WIDTH = 16, - SPIN_BUTTON_PADDING, + SPIN_BUTTON_SPACING, } GuiSpinnerProperty; - typedef enum { - ARROWS_SIZE = 16, - ARROWS_VISIBLE, - SCROLL_SLIDER_PADDING, - SCROLL_SLIDER_SIZE, - SCROLL_PADDING, - SCROLL_SPEED, - } GuiScrollBarProperty; - typedef enum { SCROLLBAR_LEFT_SIDE = 0, SCROLLBAR_RIGHT_SIDE @@ -1056,7 +1054,7 @@ ffi.cdef [[ typedef enum { LIST_ITEMS_HEIGHT = 16, - LIST_ITEMS_PADDING, + LIST_ITEMS_SPACING, SCROLLBAR_WIDTH, SCROLLBAR_SIDE, } GuiListViewProperty; @@ -1277,9 +1275,9 @@ ffi.cdef [[ RAYGUI_ICON_LAYERS = 197, RAYGUI_ICON_WINDOW = 198, RAYGUI_ICON_HIDPI = 199, - RAYGUI_ICON_200 = 200, - RAYGUI_ICON_201 = 201, - RAYGUI_ICON_202 = 202, + RAYGUI_ICON_FILETYPE_BINARY = 200, + RAYGUI_ICON_HEX = 201, + RAYGUI_ICON_SHIELD = 202, RAYGUI_ICON_203 = 203, RAYGUI_ICON_204 = 204, RAYGUI_ICON_205 = 205, diff --git a/tools/api.h b/tools/api.h index 5b2e5fa..0517483 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(unsigned char *data, int dataLength, int *compDataLength) -unsigned char *DecompressData(unsigned char *compData, int compDataLength, int *dataLength) +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(unsigned char *data, int *outputLength) +unsigned char *DecodeDataBase64(const unsigned char *data, int *outputLength) bool SaveStorageValue(unsigned int position, int value) int LoadStorageValue(unsigned int position) void OpenURL(const char *url) @@ -334,7 +334,7 @@ void DrawText(const char *text, int posX, int posY, int fontSize, Color color) void DrawTextEx(Font font, const char *text, Vector2 position, float fontSize, float spacing, Color tint) void DrawTextPro(Font font, const char *text, Vector2 position, Vector2 origin, float rotation, float fontSize, float spacing, Color tint) void DrawTextCodepoint(Font font, int codepoint, Vector2 position, float fontSize, Color tint) -void DrawTextCodepoints(Font font, int *codepoints, int count, Vector2 position, float fontSize, float spacing, Color tint) +void DrawTextCodepoints(Font font, const int *codepoints, int count, Vector2 position, float fontSize, float spacing, Color tint) int MeasureText(const char *text, int fontSize) Vector2 MeasureTextEx(Font font, const char *text, float fontSize, float spacing) int GetGlyphIndex(Font font, int codepoint) @@ -345,7 +345,7 @@ void UnloadCodepoints(int *codepoints) int GetCodepointCount(const char *text) int GetCodepoint(const char *text, int *bytesProcessed) const char *CodepointToUTF8(int codepoint, int *byteSize) -char *TextCodepointsToUTF8(int *codepoints, int length) +char *TextCodepointsToUTF8(const int *codepoints, int length) int TextCopy(char *dst, const char *src) bool TextIsEqual(const char *text1, const char *text2) unsigned int TextLength(const char *text) @@ -396,10 +396,10 @@ void DrawBillboard(Camera camera, Texture2D texture, Vector3 position, float siz void DrawBillboardRec(Camera camera, Texture2D texture, Rectangle source, Vector3 position, Vector2 size, Color tint) void DrawBillboardPro(Camera camera, Texture2D texture, Rectangle source, Vector3 position, Vector3 up, Vector2 size, Vector2 origin, float rotation, Color tint) void UploadMesh(Mesh *mesh, bool dynamic) -void UpdateMeshBuffer(Mesh mesh, int index, void *data, int dataSize, int offset) +void UpdateMeshBuffer(Mesh mesh, int index, const void *data, int dataSize, int offset) void UnloadMesh(Mesh mesh) void DrawMesh(Mesh mesh, Material material, Matrix transform) -void DrawMeshInstanced(Mesh mesh, Material material, Matrix *transforms, int instances) +void DrawMeshInstanced(Mesh mesh, Material material, const Matrix *transforms, int instances) bool ExportMesh(Mesh mesh, const char *fileName) BoundingBox GetMeshBoundingBox(Mesh mesh) void GenMeshTangents(Mesh *mesh) @@ -464,7 +464,7 @@ void WaveFormat(Wave *wave, int sampleRate, int sampleSize, int channels) float *LoadWaveSamples(Wave wave) void UnloadWaveSamples(float *samples) Music LoadMusicStream(const char *fileName) -Music LoadMusicStreamFromMemory(const char *fileType, unsigned char* data, int dataSize) +Music LoadMusicStreamFromMemory(const char *fileType, const unsigned char* data, int dataSize) void UnloadMusicStream(Music music) void PlayMusicStream(Music music) bool IsMusicStreamPlaying(Music music) diff --git a/tools/raygui.h b/tools/raygui.h index ce0fff9..e13c46c 100644 --- a/tools/raygui.h +++ b/tools/raygui.h @@ -13,8 +13,8 @@ int GuiGetStyle(int control, int property) bool GuiWindowBox(Rectangle bounds, const char *title) void GuiGroupBox(Rectangle bounds, const char *text) void GuiLine(Rectangle bounds, const char *text) -void GuiPanel(Rectangle bounds) -Rectangle GuiScrollPanel(Rectangle bounds, Rectangle content, Vector2 *scroll) +void GuiPanel(Rectangle bounds, const char *text) +Rectangle GuiScrollPanel(Rectangle bounds, const char *text, Rectangle content, Vector2 *scroll) void GuiLabel(Rectangle bounds, const char *text) bool GuiButton(Rectangle bounds, const char *text) bool GuiLabelButton(Rectangle bounds, const char *text) @@ -32,16 +32,15 @@ float GuiSliderBar(Rectangle bounds, const char *textLeft, const char *textRight float GuiProgressBar(Rectangle bounds, const char *textLeft, const char *textRight, float value, float minValue, float maxValue) void GuiStatusBar(Rectangle bounds, const char *text) void GuiDummyRec(Rectangle bounds, const char *text) -int GuiScrollBar(Rectangle bounds, int value, int minValue, int maxValue) -Vector2 GuiGrid(Rectangle bounds, float spacing, int subdivs) +Vector2 GuiGrid(Rectangle bounds, const char *text, float spacing, int subdivs) int GuiListView(Rectangle bounds, const char *text, int *scrollIndex, int active) int GuiListViewEx(Rectangle bounds, const char **text, int count, int *focus, int *scrollIndex, int active) int GuiMessageBox(Rectangle bounds, const char *title, const char *message, const char *buttons) -int GuiTextInputBox(Rectangle bounds, const char *title, const char *message, const char *buttons, char *text) -Color GuiColorPicker(Rectangle bounds, Color color) -Color GuiColorPanel(Rectangle bounds, Color color) -float GuiColorBarAlpha(Rectangle bounds, float alpha) -float GuiColorBarHue(Rectangle bounds, float value) +int GuiTextInputBox(Rectangle bounds, const char *title, const char *message, const char *buttons, char *text, int textMaxSize, int *secretViewActive) +Color GuiColorPicker(Rectangle bounds, const char *text, Color color) +Color GuiColorPanel(Rectangle bounds, const char *text, Color color) +float GuiColorBarAlpha(Rectangle bounds, const char *text, float alpha) +float GuiColorBarHue(Rectangle bounds, const char *text, float value) void GuiLoadStyle(const char *fileName) void GuiLoadStyleDefault(void) const char *GuiIconText(int iconId, const char *text) diff --git a/tools/raymath.h b/tools/raymath.h index 1fe9086..0665b06 100644 --- a/tools/raymath.h +++ b/tools/raymath.h @@ -12,6 +12,7 @@ float Vector2Length(Vector2 v) float Vector2LengthSqr(Vector2 v) float Vector2DotProduct(Vector2 v1, Vector2 v2) float Vector2Distance(Vector2 v1, Vector2 v2) +float Vector2DistanceSqr(Vector2 v1, Vector2 v2) float Vector2Angle(Vector2 v1, Vector2 v2) Vector2 Vector2Scale(Vector2 v, float scale) Vector2 Vector2Multiply(Vector2 v1, Vector2 v2) @@ -37,6 +38,7 @@ float Vector3Length(const Vector3 v) float Vector3LengthSqr(const Vector3 v) float Vector3DotProduct(Vector3 v1, Vector3 v2) float Vector3Distance(Vector3 v1, Vector3 v2) +float Vector3DistanceSqr(Vector3 v1, Vector3 v2) Vector2 Vector3Angle(Vector3 v1, Vector3 v2) Vector3 Vector3Negate(Vector3 v) Vector3 Vector3Divide(Vector3 v1, Vector3 v2) diff --git a/tools/rlgl.h b/tools/rlgl.h index 2c4aecd..fafbef0 100644 --- a/tools/rlgl.h +++ b/tools/rlgl.h @@ -84,21 +84,22 @@ void rlDrawRenderBatchActive(void) bool rlCheckRenderBatchLimit(int vCount) void rlSetTexture(unsigned int id) unsigned int rlLoadVertexArray(void) -unsigned int rlLoadVertexBuffer(void *buffer, int size, bool dynamic) -unsigned int rlLoadVertexBufferElement(void *buffer, int size, bool dynamic) -void rlUpdateVertexBuffer(unsigned int bufferId, void *data, int dataSize, int offset) +unsigned int rlLoadVertexBuffer(const void *buffer, int size, bool dynamic) +unsigned int rlLoadVertexBufferElement(const void *buffer, int size, bool dynamic) +void rlUpdateVertexBuffer(unsigned int bufferId, const void *data, int dataSize, int offset) +void rlUpdateVertexBufferElements(unsigned int id, const void *data, int dataSize, int offset) void rlUnloadVertexArray(unsigned int vaoId) void rlUnloadVertexBuffer(unsigned int vboId) -void rlSetVertexAttribute(unsigned int index, int compSize, int type, bool normalized, int stride, void *pointer) +void rlSetVertexAttribute(unsigned int index, int compSize, int type, bool normalized, int stride, const void *pointer) void rlSetVertexAttributeDivisor(unsigned int index, int divisor) void rlSetVertexAttributeDefault(int locIndex, const void *value, int attribType, int count) void rlDrawVertexArray(int offset, int count) -void rlDrawVertexArrayElements(int offset, int count, void *buffer) +void rlDrawVertexArrayElements(int offset, int count, const void *buffer) void rlDrawVertexArrayInstanced(int offset, int count, int instances) -void rlDrawVertexArrayElementsInstanced(int offset, int count, void *buffer, int instances) -unsigned int rlLoadTexture(void *data, int width, int height, int format, int mipmapCount) +void rlDrawVertexArrayElementsInstanced(int offset, int count, const void *buffer, int instances) +unsigned int rlLoadTexture(const void *data, int width, int height, int format, int mipmapCount) unsigned int rlLoadTextureDepth(int width, int height, bool useRenderBuffer) -unsigned int rlLoadTextureCubemap(void *data, int size, int format) +unsigned int rlLoadTextureCubemap(const void *data, int size, int format) void rlUpdateTexture(unsigned int id, int offsetX, int offsetY, int width, int height, int format, const void *data) void rlGetGlTextureFormats(int format, int *glInternalFormat, int *glFormat, int *glType) const char *rlGetPixelFormatName(unsigned int format)