1
0
mirror of https://github.com/kepler155c/opus synced 2025-10-15 07:47:40 +00:00

transition to kernel

This commit is contained in:
kepler155c@gmail.com
2018-01-15 20:38:30 -05:00
parent bd37d32750
commit d85e9b96b2
6 changed files with 89 additions and 82 deletions

View File

@@ -0,0 +1,44 @@
if false then
local colors = _G.colors
local term = _G.term
local window = _G.window
local terminal = term.current()
local w, h = term.getSize()
local splashWindow = window.create(terminal.parent, 1, 1, w, h, false)
splashWindow.setTextColor(colors.white)
if splashWindow.isColor() then
splashWindow.setBackgroundColor(colors.black)
splashWindow.clear()
local opus = {
'fffff00',
'ffff07000',
'ff00770b00 4444',
'ff077777444444444',
'f07777744444444444',
'f0000777444444444',
'070000111744444',
'777770000',
'7777000000',
'70700000000',
'077000000000',
}
for k,line in ipairs(opus) do
splashWindow.setCursorPos((w - 18) / 2, k + (h - #opus) / 2)
splashWindow.blit(string.rep(' ', #line), string.rep('a', #line), line)
end
end
local str = 'Loading Opus OS...'
print(str)
splashWindow.setCursorPos((w - #str) / 2, h)
splashWindow.write(str)
terminal.setVisible(false)
splashWindow.setVisible(true)
kernel.hook('kernel_ready', function()
kernel.window.setVisible(true)
end)
end

View File

@@ -4,7 +4,7 @@ local Peripheral = require('peripheral')
_G.device = Peripheral.getList()
_G.device.terminal = _G.kernel.terminal.parent
_G.device.terminal = _G.kernel.terminal
_G.device.terminal.side = 'terminal'
_G.device.terminal.type = 'terminal'
_G.device.terminal.name = 'terminal'

View File

@@ -1,4 +1,5 @@
local kernel = _G.kernel
local os = _G.os
_G.network = { }
@@ -18,4 +19,5 @@ end)
if _G.device.wireless_modem then
startNetwork()
os.sleep(0) -- give the network a cycle to start
end