Marlingaming

CC Tweaked CCSPS Iron - Hope Lost Main

Feb 11th, 2022 (edited)
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. local tArg = {}
  2. local FilePath = "os/System/User/Programs/HopeLost.cpf"
  3. local MapTiles = {}
  4.  
  5. local function Clear()
  6. term.clear()
  7. term.setCursorPos(1,1)
  8. end
  9.  
  10. local function SetupScreen()
  11. term.setBackgroundColor(colors.cyan)
  12. Clear()
  13. DrawScreen()
  14. end
  15.  
  16. function LoadMap(map)
  17. local file = fs.open(fs.combine(FilePath,map),"r")
  18. MapTiles = textutils.unserialize(file.readAll())
  19. file.close()
  20. end
  21.  
  22. function DrawScreen()
  23. Clear()
  24. for i = 1, #MapTiles do
  25. paintutils.drawPixel(MapTiles[i][1],MapTiles[i][2],colors.red)
  26. end
  27. end
  28.  
  29. function Menu()
  30.  
  31. end
  32.  
  33. LoadMap("town1.txt")
  34. SetupScreen()
  35.  
  36. if tArg[1] == "start" then
  37. Menu()
  38. end
Add Comment
Please, Sign In to add comment