Code: Select all
function dtr(degrees)
return math.pi*degrees/180
end
function dwr(object,X,Y,rotation,flipx,flipy) --ENUM, number, number, number, bool, bool
if flipx == true then
numx=-1
else
numx=1
end
if flipy == true then
numy=-1
else
numy=1
end
height=love.graphics.getHeight()
width=love.graphics.getHeight()
love.graphics.draw(object,width/2,height/2,dtr(rotation),numx,numy,(width/2)-X,(height/2)-Y)
end
function love.draw()
p=love.graphics.newImage("Textures\/Sprit1.png")
dwr(p,0,0,0,false,false)
dwr(p,0,16,90,false,true)
dwr(p,16,0,180,true,false)
dwr(p,16,16,270,true,true)
end
They should be compacted in a 32x32 pixel square. D: