-- "psp" or "pc" used for compatibility, change it accordingly; ant does it for you
-- do not touch at it as it is regexp based, see build.xml task make_psp_compatible
environment='psp'
dofile("scripts/framework/debug.lua")
--too much stress to let debug mode on the psp all the time

if environment=="pc" then
	enableFDebug()
	initFDebug("debug.log")
end


splashImage=Image.load("images/splash.png")
screen:blit(0, 0, splashImage, false)
screen.waitVblankStart()
screen.flip()

dofile("initialization.lua")

------------------------------------------------------
--
-- start
--
------------------------------------------------------


--indexBGImage=drawSplashScreen()
splashImage=nil
GC()
while true do
   	screen.waitVblankStart()
	screen.flip()
	
	choice=game() --see menus/game.lua
	--choice=gameDebug()
   	
   	if choice=="exit" then
   		--TODO null everything
   		--it is really important when ran in lowser
   		break
   	elseif choice=="quitMenu" then
   		--nothing, not allowed to quit the main menu to go there again
   	end
end

