From 98fa45f866d2df47976c65470eee8716764bb457 Mon Sep 17 00:00:00 2001 From: RDW Date: Sun, 13 Aug 2023 20:30:59 +0200 Subject: [PATCH 1/3] Repo: Update the Lua runtime to v0.0.9 --- download-runtime.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/download-runtime.sh b/download-runtime.sh index e6710e1f..586935e5 100755 --- a/download-runtime.sh +++ b/download-runtime.sh @@ -2,7 +2,7 @@ set -e GITHUB_ORGANIZATION="evo-lua" GITHUB_REPOSITORY="evo-runtime" -REQUIRED_RUNTIME_VERSION="v0.0.8" +REQUIRED_RUNTIME_VERSION="v0.0.9" PLATFORM=$(uname) From 066afd095fafb89a2b34e751c0e7b85cb9fb4dd1 Mon Sep 17 00:00:00 2001 From: RDW Date: Sun, 13 Aug 2023 20:21:31 +0200 Subject: [PATCH 2/3] Tools: Switch to stbi_get_required_bmp_size for image buffers This is a more accurate, albeit somewhat wasteful method (new in 0.0.9). --- Tools/RagnarokTools.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tools/RagnarokTools.lua b/Tools/RagnarokTools.lua index 7df9a128..89b1b724 100644 --- a/Tools/RagnarokTools.lua +++ b/Tools/RagnarokTools.lua @@ -134,7 +134,7 @@ function RagnarokTools:ExportLightmapsFromGND(gndFileContents) textureImage.data = pixelBuffer textureImage.channels = 4 -- RGBA - local maxFileSize = stbi.max_bitmap_size(textureImage.width, textureImage.height, textureImage.channels) + local maxFileSize = stbi.bindings.stbi_get_required_bmp_size(textureImage) local fileContents = buffer.new(maxFileSize) local startPointer, length = fileContents:reserve(maxFileSize) local numBytesWritten = stbi.bindings.stbi_encode_png(textureImage, startPointer, length, 0) From a154643e381711daa191d64cdfb8856cb572de96 Mon Sep 17 00:00:00 2001 From: RDW Date: Sun, 13 Aug 2023 20:21:23 +0200 Subject: [PATCH 3/3] Repo: Add the image processing API to .luacheckrc --- .luacheckrc | 1 + 1 file changed, 1 insertion(+) diff --git a/.luacheckrc b/.luacheckrc index 0b4bb943..cf667ae5 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -9,6 +9,7 @@ ignore = { globals = { -- Runtime APIs "C_FileSystem", + "C_ImageProcessing", "C_Runtime", "C_Timer", "C_WebView",