Rinnegatamante / lpp-vita

Lua Player Plus for PSVITA. Documentation on: http://rinnegatamante.github.io/lpp-vita/
GNU General Public License v3.0
175 stars 27 forks source link

Maybe i'm stupid but, drawLine() #33

Closed Creckeryop closed 6 years ago

Creckeryop commented 6 years ago

Can't draw " / " line. if i draw " / " line i am getting " \ " line. Maybe it's because you're switching y1 and y2 (if y2 < y1) in LuaGraphics.cpp (127 - 131) Lines last nightly build

Rinnegatamante commented 6 years ago

That check was meant to be used for rectangles originally and got added to lines too. It's performed by lpp-3ds too. Btw, at least on Vita, i think it's irrelevant and can be removed. Have to do some further tests. In the meantime, can you post your code?

Creckeryop commented 6 years ago
while true do
    pad = Controls.read()
    Graphics.initBlend()
    Graphics.drawLine(0,960,544,0,Color.new(255,255,255)) -- "/"
    Graphics.drawLine(0,960,0,544,Color.new(255,255,255)) -- "\"
    Screen.clear()
    Graphics.termBlend()
    if Controls.check(pad, SCE_CTRL_START) and Controls.check(pad, SCE_CTRL_START) then
        System.exit()
    end
    Screen.flip()
    oldpad = pad
end

This code have to Give Cross image like this, but it gives image

Rinnegatamante commented 6 years ago

Should be addressed with https://github.com/Rinnegatamante/lpp-vita/commit/432e12c57135f1a79ea2efcf06f2d2cdc9ffb842 and available in next nightly.