mirror of
https://github.com/LDDestroier/CC/
synced 2025-06-25 22:52:50 +00:00
Update ccbn.lua
This commit is contained in:
parent
b893214b16
commit
eadcae3482
4
ccbn.lua
4
ccbn.lua
@ -20,7 +20,6 @@ local stage = {
|
|||||||
|
|
||||||
-- ripped from NFTE
|
-- ripped from NFTE
|
||||||
local getSize = function(image)
|
local getSize = function(image)
|
||||||
assert(checkValid(image), "Invalid image.")
|
|
||||||
local x, y = 0, #image[1]
|
local x, y = 0, #image[1]
|
||||||
for y = 1, #image[1] do
|
for y = 1, #image[1] do
|
||||||
x = math.max(x, #image[1][y])
|
x = math.max(x, #image[1][y])
|
||||||
@ -46,11 +45,8 @@ local makeRectangle = function(width, height, char, text, back)
|
|||||||
return output
|
return output
|
||||||
end
|
end
|
||||||
local stretchImage = function(_image, sx, sy, noRepeat)
|
local stretchImage = function(_image, sx, sy, noRepeat)
|
||||||
assert(checkValid(_image), "Invalid image.")
|
|
||||||
local output = {{},{},{}}
|
local output = {{},{},{}}
|
||||||
local image = deepCopy(_image)
|
local image = deepCopy(_image)
|
||||||
if sx < 0 then image = flipX(image) end
|
|
||||||
if sy < 0 then image = flipY(image) end
|
|
||||||
sx, sy = math.abs(sx), math.abs(sy)
|
sx, sy = math.abs(sx), math.abs(sy)
|
||||||
local imageX, imageY = getSize(image)
|
local imageX, imageY = getSize(image)
|
||||||
local tx, ty
|
local tx, ty
|
||||||
|
Loading…
x
Reference in New Issue
Block a user