Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("Booting NOS")
- --os.sleep(1)
- print("Checking Monitors")
- --os.sleep(1)
- print("Checking Disks")
- --os.sleep(1)
- print("Here we go!")
- os.sleep(1)
- --Set Up Globals
- local screenWidth, screenHeight = term.getSize()
- --Graphics
- -------Boot Animation
- local bootframe1 = {
- {5,5,colors.cyan}
- }
- local bootframe2 = {
- {5,6,colors.cyan}
- }
- local bootframe3 = {
- {5,7,colors.cyan}
- }
- local bootframe4 = {
- {5,8,colors.cyan}
- }
- local bootsequence = {
- 0.1,
- true,
- colors.white,
- bootframe1,
- bootframe2,
- bootframe3,
- bootframe4
- }
- local bootanifile = fs.open("nos_boot.ssf", "r")
- local bootanistring = bootanifile.readAll()
- bootanifile.close()
- bootsequence = textutils.unserialize(bootanistring)
- --Set Up Functions
- function nos_renderFrame(frame)
- if frame == false then
- else
- for p=1,#frame do
- paintutils.drawPixel(frame[p][1], frame[p][2], frame[p][3])
- end
- end
- end
- function nos_renderSequence(sequence)
- local delay = 0.15--sequence[1]
- local clearing = true--sequence[2]
- local bg = colors.black
- for f=1,#sequence do
- term.setBackgroundColor(bg)
- if clearing == true then
- term.clear()
- end
- nos_renderFrame(sequence[f])
- os.sleep(delay)
- end
- end
- function bootAnimation()
- term.clear()
- term.setTextColor(colors.white)
- term.setBackgroundColor(colors.white)
- local delay = 0
- for x=1,screenWidth do
- for y=1,screenHeight do
- paintutils.drawPixel(x,y, colors.red)
- end
- end
- os.sleep(delay)
- for x=1,screenWidth do
- for y=1,screenHeight do
- paintutils.drawPixel(x,y, colors.orange)
- end
- end
- os.sleep(delay)
- for x=1,screenWidth do
- for y=1,screenHeight do
- paintutils.drawPixel(x,y, colors.yellow)
- end
- end
- os.sleep(delay)
- for x=1,screenWidth do
- for y=1,screenHeight do
- paintutils.drawPixel(x,y, colors.lime)
- end
- end
- os.sleep(delay)
- for x=1,screenWidth do
- for y=1,screenHeight do
- paintutils.drawPixel(x,y, colors.cyan)
- end
- end
- os.sleep(delay)
- for x=1,screenWidth do
- for y=1,screenHeight do
- paintutils.drawPixel(x,y, colors.purple)
- end
- end
- os.sleep(delay)
- for x=1,screenWidth do
- for y=1,screenHeight do
- paintutils.drawPixel(x,y, colors.white)
- end
- end
- nos_renderSequence(bootsequence)
- end
- --Boot Up
- bootAnimation()
- --Set Up Render
- while true do
- --Logic
- --Render
- os.sleep(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement