1
0
Fork 0
mirror of https://github.com/ctruLua/uCompat.git synced 2025-10-27 08:39:31 +00:00

Fixed the screen.blit() offset with parts of images

This commit is contained in:
Firew0lf 2016-03-28 19:02:39 +02:00
parent 590a47d88d
commit 36c85bb540

View file

@ -135,7 +135,7 @@ function screen.blit(scr, x, y, img, sx, sy, w, h)
local x = math.floor(x)
local y = math.floor(y)
local sizex, sizey = img.texture:getSize()
checkBuffer(scr)[#videoStack[scr]+1] = {"img", img.texture, {offsetX+x+math.floor(sizex/2), offsetY+y+math.floor(sizey/2), (sx or 0), (sy or 0), (w or sizex), (h or sizey), img.rotation}}
checkBuffer(scr)[#videoStack[scr]+1] = {"img", img.texture, {offsetX+x+math.floor((w or sizex)/2), offsetY+y+math.floor((h or sizey)/2), (sx or 0), (sy or 0), (w or sizex), (h or sizey), img.rotation}}
end
function screen.drawPoint(scr, x, y, color)