-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
I noticed this piece of code:
function maid64.setup(x,y,overscan)
maid64.overscan = overscan or false
maid64.sizeX = x or 64
maid64.sizeY = y or maid64.sizeX
if x < (y or 0) then
maid64.scaler = love.graphics.getHeight() / maid64.sizeY
else
maid64.scaler = love.graphics.getWidth() / maid64.sizeX
endIt results in an error if x isn't passed in as an argument, and as I see it all arguments should be optional.
Therefore I think something like this would be an improvement:
function maid64.setup(x,y,overscan)
maid64.overscan = overscan or false
maid64.sizeX = x or 64
maid64.sizeY = y or maid64.sizeX
if maid64.sizeX < maid64.sizeY then --edited this lil line to support all arguments as optional
maid64.scaler = love.graphics.getHeight() / maid64.sizeY
else
maid64.scaler = love.graphics.getWidth() / maid64.sizeX
endNote: it's not the full functions, just the part of it I thought mattered the most.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels