Skip to content

Commit

Permalink
scissor fixes itsself when like 1080p now
Browse files Browse the repository at this point in the history
  • Loading branch information
GuglioIsStupid committed Feb 15, 2023
1 parent 2f21ae8 commit ab381c6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions love/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -259,10 +259,15 @@ function love.load()

loadSongs()
state.switch(skinSelect)

-- scissorScale is meant for 720p
scissorScale = 1
end

function love.resize(w, h)
push.resize(w, h)

scissorScale = h / 720
end

function love.update(dt)
Expand Down
6 changes: 3 additions & 3 deletions love/states/game.lua
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ return {

if charthits[i][j][4] then
if input:down(inputList[i]) then
love.graphics.setScissor(-400, (not settings.downscroll and 125 or 0), 3000, 632)
love.graphics.setScissor(-400, (not settings.downscroll and 125*scissorScale or 0), 3000, 632*scissorScale)
else
love.graphics.setScissor()
end
Expand All @@ -511,11 +511,11 @@ return {
end
else
if input:down(inputList[i]) then
love.graphics.setScissor(-400, (not settings.downscroll and 125 or 0), 3000, 632)
love.graphics.setScissor(-400, (not settings.downscroll and 125*scissorScale or 0), 3000, 632*scissorScale)
else
love.graphics.setScissor()
end
noteImgs[i][3]:draw(90 -(settings.noteSpacing*(#receptors/2-1)) + (settings.noteSpacing * (i-1)), -100+(charthits[i][j][1]*speed+200+(not settings.downscroll and 113 or -50)) * sv, notesize, -notesize)
noteImgs[i][3]:draw(90 -(settings.noteSpacing*(#receptors/2-1)) + (settings.noteSpacing * (i-1)), -100+(charthits[i][j][1]*speed+200+(not settings.downscroll and 32 or -50)) * sv, notesize, -notesize)
love.graphics.setScissor()
end
end
Expand Down

0 comments on commit ab381c6

Please sign in to comment.