-- Main game loop

anonymous=1

function Main()

	--InSplashScreen(true);	 
	DisplaySplash("splash/playfirst_animated_logo.swf", "splash/playfirst_logo",4000);
	DisplaySplash("splash/sarbakan.swf", "splash/sarbakan",3000); 	
	DisplaySplash("splash/distributor_logo", "splash/distributor_logo",3000);  
	--InSplashScreen(false);
    
	while (true) do
		-- Push the game selection screen

		DoMainWindow("scripts/mainmenu.lua");

		--DebugOut("Main_menu_screen loop");				
		-- The game select screen will spawn its own replacement modal window. When that modal window
		-- returns, it will be time to execute this one again--hence the while/do loop.
	end

end

-- Return a function to be executed in a thread
return Main