Files
gtav-src/tools_ng/lib/util/ragebuilder/concatImages.rbs
T
2025-09-29 00:52:08 +02:00

28 lines
821 B
Plaintext
Executable File

-- concatenate all the images inside a folder recursively into a single large image
-- KS 22/08/2006
local hashChar = 35 -- '#' is 35, which starts off comments.
function concatImages(pack, common, platform, images)
start_image()
for line in io.lines(images) do
if (string.len(line) > 0) and not(string.byte(line, 1) == hashChar) then
line = string.gsub(line, "%/", "\\")
line = string.gsub(line, "platform:", platform)
line = string.gsub(line, "common:", common)
local file = line .. ".img"
display(file)
add_to_image(file)
end
end
save_image(pack)
close_image()
end
local pack = get_param("pack");
local common = get_param("common");
local platform = get_param("platform");
local images = get_param("images");
concatImages(pack, common, platform, images);