Update raylib, reimplement deprecated LoadImageEx

LoadImageEx is deprecated in this raylib version, for backward compatibility, it is reimplemented in Lua.
This commit is contained in:
TSnake41 2020-08-08 17:32:04 +02:00
parent 8a2684491f
commit 099595ae17
5 changed files with 15 additions and 3 deletions

2
raygui

@ -1 +1 @@
Subproject commit 3e61557f251c5c64ed002081870434e9dbaa7ba7
Subproject commit 07b30c30af7309b396cfa458d30f54b38ef78808

2
raylib

@ -1 +1 @@
Subproject commit 8fa5c902f991e1ed6916d6f3d2a428117ef73857
Subproject commit ccdd8b5f28f4aaffda2b637e9cb7602ca167ba5f

View File

@ -14,6 +14,16 @@
CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
]]
-- LoadImageEx removed function
rawset(rl, "LoadImageEx", function (pixels, width, height)
local image = rl.new "Image"
image.width = width
image.height = height
image.data = pixels
image.format = rl.UNCOMPRESSED_R8G8B8A8
return image
end)
-- math metamethods
local new = ffi.new

View File

@ -184,8 +184,8 @@ bool CheckCollisionPointRec(Vector2 point, Rectangle rec)
bool CheckCollisionPointCircle(Vector2 point, Vector2 center, float radius)
bool CheckCollisionPointTriangle(Vector2 point, Vector2 p1, Vector2 p2, Vector2 p3)
Image LoadImage(const char *fileName)
Image LoadImageEx(Color *pixels, int width, int height)
Image LoadImageRaw(const char *fileName, int width, int height, int format, int headerSize)
Image LoadImageAnim(const char *fileName, int *frames)
void ExportImage(Image image, const char *fileName)
void ExportImageAsCode(Image image, const char *fileName)
Texture2D LoadTexture(const char *fileName)
@ -343,6 +343,7 @@ Mesh GenMeshCubicmap(Image cubicmap, Vector3 cubeSize)
BoundingBox MeshBoundingBox(Mesh mesh)
void MeshTangents(Mesh *mesh)
void MeshBinormals(Mesh *mesh)
void MeshNormalsSmooth(Mesh *mesh)
void DrawModel(Model model, Vector3 position, float scale, Color tint)
void DrawModelEx(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint)
void DrawModelWires(Model model, Vector3 position, float scale, Color tint)

View File

@ -45,6 +45,7 @@ unsigned int rlLoadAttribBuffer(unsigned int vaoId, int shaderLoc, void *buffer,
void rlglInit(int width, int height)
void rlglClose(void)
void rlglDraw(void)
void rlCheckErrors(void)
int rlGetVersion(void)
bool rlCheckBufferLimit(int vCount)
void rlSetDebugMarker(const char *text)