/*****************************************************\
 DevsLib 
 URL : http://www.devsgen.com
 Autor : Foury Jean-francois
 V.0.1 - Version Beta

\*****************************************************/

#include <oslib/oslib.h>


PSP_MODULE_INFO("Devslib Sample", 0, 1, 1);
PSP_MAIN_THREAD_ATTR(THREAD_ATTR_USER | THREAD_ATTR_VFPU);


OSL_FONT *maFonte , *maFonte2 , *maFonte3;

extern void IntroAffiche();
extern void MenuAffiche();


int main(int argc, char* argv[])
{

	//oslLogSystem(1);

	//Initialisation
	oslInit(0);							//la lib
	oslInitGfx(OSL_PF_8888, 1);			//Gfx
	oslInitAudio();						//Sound
	oslInitConsole();			


	#ifdef PSP
		scePowerSetClockFrequency(333, 333, 166); // etre sur d'utiliser la psp a plein regime lol
	#endif


	maFonte = oslLoadFontFile("media/ArialBlack18.oft"); //chargement de ma police perso
	maFonte2 = oslLoadFontFile("media/ArialBlack.oft"); //chargement de ma police perso

	//intro de Devslib
	oslShowSplashScreen(5);

	//Affichage de l'intro
	IntroAffiche();

	MenuAffiche();

	while (!osl_quit)
	{
		//Debut du dessin
		oslStartDrawing();
		oslCls();
	

		oslSetFont(maFonte2);
		oslPrintColorShadow(240  -(oslStringLength("Creer par PJEFF pour PSP-GENERATION et DEVSGEN")/2),272-14,BLANC,"Creer par PJEFF pour PSP-GENERATION et DEVSGEN",0);
	

		oslSynchronization();

	}

	oslEndGfx();
	oslQuit();
	return 0;
}


