Skip to content

Commit

Permalink
v1.1, multiple changes
Browse files Browse the repository at this point in the history
- Fix boot screen background colour anomaly on advanced computers
- Remove update disk functionality; updates can be distributed on standard C64GS disks and they can include the shutdown warning themselves
- Shorten source code by about 10 lines!
  • Loading branch information
TheMrIron2 authored Jun 30, 2019
1 parent 573b141 commit c530cf8
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions src/startup
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
local version = 1.0
local version = 1.1

os.pullEvent = os.pullEventRaw -- prevent CTRL+T

Expand All @@ -13,7 +13,6 @@ local function center(y, string)
print(string)
end

-- separate function due to colour wrapper
local function bootStandard()
local oldback = term.setBackgroundColour
function term.setBackgroundColor(colour)
Expand Down Expand Up @@ -42,7 +41,7 @@ term.setTextColour = term.setTextColor
paintutils.drawBox(1, 1, w, h)
paintutils.drawBox(2, 2, w-1, h-1)
term.setTextColour(colours.white)
term.setBackgroundColour(colours.black)
term.setBackgroundColour(colours.black)
center(8, "*** COMMANDER 64 GAMES SYSTEM ***")
sleep(1)
end
Expand All @@ -54,6 +53,7 @@ local function bootAdvanced()
paintutils.drawBox(1, 1, w, h)
paintutils.drawBox(2, 2, w-1, h-1)
term.setTextColour(colours.white)
term.setBackgroundColour(colours.purple)
center(8, "*** COMMANDER 64 GAMES SYSTEM ***")
sleep(1)
end
Expand All @@ -78,20 +78,10 @@ elseif fs.exists("/disk/run.gs") then
center(12, "BOOTING...")
sleep()
shell.run("/disk/run.gs")

elseif fs.exists("/disk/update.gs") then
center(10, "UPDATE DISK INSERTED.")
sleep(1)
center(11, "UPDATE COMMENCING IN 10 SECONDS.")
sleep(1)
center(12, "IF YOU DO NOT WANT TO UPDATE, PLEASE")
center(13, "SHUT DOWN (CTRL + S) YOUR SYSTEM.")
sleep(10)
shell.run("/disk/update.gs")

else
center(10, "PLEASE INSERT DISK.")
sleep(1)

end
end
end

0 comments on commit c530cf8

Please sign in to comment.