require "src.events" require "src.ecs" require "src.utils" require "src.input" require "src.textures" require "src.phys" SCR_WIDTH = 320 SCR_HEIGHT = 180 WindowScale = 1 register_input("Left", {{"key", "left"}, {"key", "a"}}) register_input("Right", {{"key", "right"}, {"key", "d"}}) register_input("Down", {{"key", "down"}, {"key", "s"}}) register_input("Up", {{"key", "up"}, {"key", "w"}}) register_input("Right_Click", {{"mouse", 1}}) register_input("Left_Click", {{"mouse", 2}}) lg = love.graphics lf = love.filesystem lmath = love.math local function load_dir(path) local files = lf.getDirectoryItems(path) for _, file in ipairs(files) do local filepath = path.."/"..file if lf.getInfo(filepath).type == "directory" then load_dir(filepath) else lf.load(filepath)(); end end end function main_init() lg.setDefaultFilter("nearest", "nearest") viewport = lg.newCanvas(SCR_WIDTH, SCR_HEIGHT) load_textures_from() love.window.setMode(SCR_WIDTH, SCR_HEIGHT, {fullscreen = false}) load_dir("src/objs") load_dir("src/scenes") end