
-- Required helpers
os.loadAPI("/lib/apis/periphutils")

monitor = periphutils.find("monitor")
monitor.clear()
function doSplash(art)
	mon = periphutils.find("monitor")
--	mon.clear()
	x,y = mon.getSize()
	centerX = math.ceil(x/2)
	centerY = math.ceil(y/2)

	cornerX = math.floor(art['x']/2)
	cornerY = math.floor(art['y']/2)


	for i,v in ipairs(art) do
		mon.setCursorPos(centerX - cornerX, centerY - cornerY)
		mon.write(v)
		cornerY = cornerY - 1
	end
end


-- Configure-y thing
art2 = { 
        " Meow!   ",
	      	"  \\      ",
        x=9, y=5}
art1 = {
        "",
        "",
     			"  ^   ^  ",
	     		"  =owo=  ",
        x=9, y=5}
art3 = {
        "",
        "",
        "",
        "",
		     	" SnoOS   ",
	     		x=9, y=5}
art4 = {
        "",
        "",
        "",
        "",
        "mod",
        x=-3, y=5}

monitor.setTextColor(colors.orange)
doSplash(art1)
sleep(1)
monitor.setTextColor(colors.purple)
doSplash(art2)
sleep(1)
monitor.setTextColor(colors.white)
doSplash(art3)
--sleep(1)
monitor.setTextColor(colors.red)
doSplash(art4)
monitor.setTextColor(colors.white)
