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

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
art = { "|\\_____/|",
	      	"|       |",
     			"| |   | |",
	     		"|   -   |",
		     	"  SnoOS  ",
	     		x=9, y=5}

doSplash(art)
