epervier-old/gamecore/modules/world/camera/utils.lua

47 lines
1,012 B
Lua
Raw Normal View History

local camutils = {}
function camutils.getViewsPositions(basewidth, baseheight, verticalSplit)
local posList = {}
posList.dual = {}
posList.multi = {}
if (verticalSplit) then
posList.dual[1] = {}
posList.dual[1].x = 0
posList.dual[1].y = (baseheight/4)
posList.dual[2] = {}
posList.dual[2].x = 0
posList.dual[2].y = -(baseheight/4)
else
posList.dual[1] = {}
posList.dual[1].x = -(basewidth/4)
posList.dual[1].y = 0
posList.dual[2] = {}
posList.dual[2].x = (basewidth/4)
posList.dual[2].y = 0
end
posList.multi[1] = {}
posList.multi[1].x = -(basewidth /4)
posList.multi[1].y = -(baseheight/4)
posList.multi[2] = {}
posList.multi[2].x = (basewidth /4)
posList.multi[2].y = -(baseheight/4)
posList.multi[3] = {}
posList.multi[3].x = -(basewidth /4)
posList.multi[3].y = (baseheight/4)
posList.multi[4] = {}
posList.multi[4].x = (basewidth /4)
posList.multi[4].y = (baseheight/4)
return posList
end
return camutils