require("lualibs.common")
require("skilanderkit")
boardname="menu.map"

function init(newinitpos, hotload)
	initpos = table_shallow_copy(newinitpos)

	loadsong("music/charts.kdm")
	setmusic(true)

	load_altpal(1, "grayhack")
end

curtime = 0
septile = 79

function frame()
	curtime = curtime + 1.0
	cc = 3.0 + math.sin(curtime * 0.1)*2.0
	clearview(0)
	rotatesprite(160, 100, 1.0, 0,   304,   0,0, 2,    0,0,1,1);

	if (curtime % 10 == 0) then
		septile = math.random(79,84)
	end
	rotatesprite(248, 200, 0.3, 0,   septile,   0,0, 2,    0,0,1,1);

	for i,v in ipairs({
		"SO MUCH THANK FOR PLAYING",
		"OUR GAME! WE HAD A TON",
		"OF FUN MAKING IT!",
		"",
		"WE CAN'T PROMISE YOU",
		" - COOL NEW FEATURES",
		" - COOL NEW LEVELS",
		" - COOL NEW GUNS AND FREEDOMS",
		"BUT DONATING TO",
		"KO-FI.COM/COMPUTERFUTURE/",
		"MAKES IT MORE LIKELY",
		"",
		"",
		"HUGS AND KISSES,",
		" - THE HACKERS",
		"   PRODUCT TEAM"

	}) do
		drawtext(v, 5, 60+i*8, 0.4, 1, 16.0, 1)
	end


	if (getkeystatus(1) or getkeystatus(0x1c)) and not gotomode then
		gotomode = 0
		gomode = nil
	end

end
