mirror of
https://github.com/ctruLua/uCompat.git
synced 2025-10-28 09:09:31 +00:00
Added Image, Motion and Sprite libraries
This commit is contained in:
parent
6d3ec78c8c
commit
0166ba6bce
6 changed files with 307 additions and 2 deletions
|
|
@ -102,7 +102,7 @@ end
|
|||
|
||||
function screen.blit(scr, x, y, img, sx, sy, w, h)
|
||||
local sizex, sizey = img:getSize()
|
||||
videoStack[scr][#videoStack[scr]] = {"img", {offsetX+x, offsetY+y, (sx or 0), (sy or 0), (w or sizex), (h or sizey)}}
|
||||
videoStack[scr][#videoStack[scr]] = {"img", img.texture, {offsetX+x, offsetY+y, (sx or 0), (sy or 0), (w or sizex), (h or sizey), img.rotation}}
|
||||
end
|
||||
|
||||
function screen.drawPoint(scr, x, y, color)
|
||||
|
|
@ -171,7 +171,7 @@ function screen.endDrawing()
|
|||
for i=1, #videoStack[drawScreen] do
|
||||
local e = videoStack[drawScreen][i]
|
||||
if e[1] == "img" then
|
||||
|
||||
e[2]:drawPart(unpack(e[3]))
|
||||
else
|
||||
gfx[e[1]](unpack(e[2])
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue