-- mapper.lua-- loads the maps and draws them to the screen-- requireslocaltileLoader=require("libs.advtileloader.Loader")-- constantslocalTOTAL_LEVELS=1-- local varslocalfunctionbuildMapName(index)return"level_"..index..".tmx"end-- modulelocalMapper={currentLevelIndex=1,maps={}}functionMapper.draw()love.graphics.setColor(255,255,255)-- apparently we need to do this to prevent tintMapper.maps[Mapper.currentLevelIndex]:draw()endfunctionMapper.getCurrentMap()returnmaps[currentLevelIndex]end-- init and returnlocalfunctioninit()tileLoader.path="maps/"fori=1,TOTAL_LEVELSdolocalmap=tileLoader.load(buildMapName(i))map:setDrawRange(0,0,love.graphics.getWidth(),love.graphics.getHeight())map.drawObjects=falseMapper.maps[i]=mapendreturnMapperendreturninit()