Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local tArg = {}
- local FilePath = "os/System/User/Programs/HopeLost.cpf"
- local MapTiles = {}
- local function Clear()
- term.clear()
- term.setCursorPos(1,1)
- end
- local function SetupScreen()
- term.setBackgroundColor(colors.cyan)
- Clear()
- DrawScreen()
- end
- function LoadMap(map)
- local file = fs.open(fs.combine(FilePath,map),"r")
- MapTiles = textutils.unserialize(file.readAll())
- file.close()
- end
- function DrawScreen()
- Clear()
- for i = 1, #MapTiles do
- paintutils.drawPixel(MapTiles[i][1],MapTiles[i][2],colors.red)
- end
- end
- function Menu()
- end
- LoadMap("town1.txt")
- SetupScreen()
- if tArg[1] == "start" then
- Menu()
- end
Add Comment
Please, Sign In to add comment