Пример #1
0
int main(int argc, char ** argv) {  
  // General initializations
  PA_Init();
  PA_InitVBL();
  PA_InitRand();
#ifndef DEBUG
  // Sound init to play mp3 and/or sfx
  PA_InitASLibForMP3(AS_MODE_MP3 | AS_MODE_SURROUND | AS_MODE_16CH);
#endif
  // Initialize the Wifi handler
  l_wifi.initialize();
#ifndef DEBUG
  // Set the sound settings
  AS_SetDefaultSettings(AS_PCM_8BIT, 44100, AS_SURROUND);
#endif
  // Initialize the background transitions
  PA_InitBgTrans(0);
  PA_BgTransDiag(0, TRANSITION_TYPE, 0, 1, 0);
  // Load sprite palettes
  PA_LoadSpritePal(1, PALETTE_NB_CASTLE, (void*)castle_Pal);
  PA_LoadSpritePal(1, PALETTE_NB_ITEM, (void*)item_Pal);
  // Enable alpha blending at the bottom and top screens
  PA_EnableSpecialFx(0, SFX_ALPHA, 0, SFX_BG0 | SFX_BG1 | SFX_BG2 | SFX_BG3 | SFX_BD);
  PA_SetSFXAlpha(0,	7, 15);
  PA_EnableSpecialFx(1, SFX_ALPHA, 0, SFX_BG0 | SFX_BG1 | SFX_BG2 | SFX_BG3 | SFX_BD);
  PA_SetSFXAlpha(1,	7, 15);
  // Main menu object
  CMenu l_menu;
  while(1) {
    // Display the menu
    l_menu.displayMenu();
  }
  return 0;
}
Пример #2
0
// Function: main()
int main(int argc, char ** argv){

	PA_Init();    // PA Init...
	PA_InitVBL();	// VBL Init...
	
	// Init the sound system
	AS_Init(AS_MODE_SURROUND | AS_MODE_16CH);
	AS_SetDefaultSettings(AS_PCM_8BIT, 11025, AS_SURROUND);
	
	PA_SetBgColor(0, PA_RGB(31, 31, 31)); // White background color

	// First, convert the gif to a sprite format...
	u8 *spritegfx = PA_GifToTiles((void*)Mollusk, // Gif file
											spritepal); // our palette
	
	// Next, load the sprite...
	PA_CreateSprite(0, 0, spritegfx, OBJ_SIZE_64X64, 1, 0, 64, 64);  // Just like plain sprites !
	PA_LoadSpritePal(0, 0, spritepal);  // Just like plain palettes !

	// spritegfx can be used over and over again to load other sprites... 
	// If you do not need it anymore, use free(spritegfx); to free the memory it uses !

	s32 spritex = -64;  // Sprite position
	s32 pan = 0;   // Audio panning
	
	PA_SetSpriteHflip(0, 0, 1); // Turn sprite around...	again...	
	
  while(1)  {  
  		int channel0 = PA_PlaySimpleSound(Zoom); // Play sound...

		for (spritex = -64; spritex < 256; spritex +=2){
			pan = spritex/2; 
			if (pan < 0) pan = 0; if (pan > 127) pan = 127; // Limit range...
			
			PA_SetSpriteX(0, 0, spritex);
			PA_SetSoundChannelPan(channel0, pan);
			PA_WaitForVBL();
		}
		
		PA_SetSpriteHflip(0, 0, 0); // Turn sprite around...
		
		int channel1 = PA_PlaySimpleSound(Zoom);
 
 		for (spritex = 256; spritex > -65; spritex -=2){
			pan = spritex/2; 
			if (pan < 0) pan = 0; if (pan > 127) pan = 127; // Limit range...
			
			PA_SetSpriteX(0, 0, spritex);
			PA_SetSoundChannelPan(channel1, pan);
			PA_WaitForVBL();
		} 
		
		PA_SetSpriteHflip(0, 0, 1); // Turn sprite around...	again...	
  
	}
		
	return 0;
} // End of main()
Пример #3
0
int main(int argc, char ** argv)
{
  PA_Init();
  PA_InitVBL();

  PA_InitText(0, 0);

  PA_OutputSimpleText(0, 5, 1, "FAT loading of sounds");

// Init ASlib before you play sounds
  AS_Init(AS_MODE_SURROUND | AS_MODE_16CH);
  AS_SetDefaultSettings(AS_PCM_8BIT, 11025, AS_NO_DELAY);

  fatInitDefault(); // Init for libfat. Automatically sets up DLDI and everything else you need for basic FAt access.

  PA_FatInitAllBuffers(); // Initialize all the memory buffers used by the FAT loading system

  PA_FatSetBasePath("DemoFiles/data");  // Set a base path from the card root to load your asset files from
                              // Within this base asset folder:
                              //      all background binaries should be in /bg/
                              //      2D and 3D sprite and palette binaries in /sprites/
                              //      and RAW format sound files in /sfx/


// Load a couple RAW format sounds from card FAT into memory for playback later.
  PA_FatLoadSfx("SFX_1", // A reference name for the loaded sound
                "saberoff"); // The name of sound effect in EFS to load (minus the ".RAW" extension)
  PA_FatLoadSfx("SFX_2", "sfxb");


  while(1)
  {
    PA_OutputSimpleText(0, 0, 4, "Press A/B to play loaded sounds.");

    PA_OutputSimpleText(0, 0, 6, "Or press R to load other sounds.");

    if(Pad.Newpress.A) PA_FatPlaySfx("SFX_1"); // Play a sound file loaded with PA_FatLoadSfx using its reference name
    if(Pad.Newpress.B) PA_FatPlaySfx("SFX_2");

    if(Pad.Newpress.R)
    {
// You can unload a previously loaded sound file to free its slot in memory.
      PA_FatUnloadSfx("SFX_1"); // Unload a sound file using the reference name assigned with PA_FatLoadSfx
      PA_FatUnloadSfx("SFX_2");

// Now you can load some more.
      PA_FatLoadSfx("SFX_1", "laserpower");
      PA_FatLoadSfx("SFX_2", "boi-oing");
// Actually, since you have 32 sound slots, we didn't need to unload the previous ones, but this is a demo!

    }

    PA_WaitForVBL();
  }

  return 0;
}
Пример #4
0
int main(void) {
	AS_Init(AS_MODE_SURROUND | AS_MODE_16CH);
	AS_SetDefaultSettings(AS_PCM_8BIT, 11025, AS_SURROUND); // 사운드 출력 방식 셋팅

	while (1) {
		if (scr_Main()) // 메인 , GAMEEXIT 일 경우 nds 종료
			break;
		user_init(); 	// 유저정보 초기화
		scr_Game(); 	// 게임
		scr_Gameover(); // 종료
	}
	UnLoad_Screen();	// 스크린 지우기
	return 0;

}
Пример #5
0
int main(){
	PA_Init();    // Initializes PA_Lib

	AS_Init(AS_MODE_SURROUND | AS_MODE_16CH);
	AS_SetDefaultSettings(AS_PCM_8BIT, 11025, AS_SURROUND);

	PA_LoadBackground(UP_SCREEN, BACKGROUND_UP, &main_up);
	PA_LoadBackground(DOWN_SCREEN, BACKGROUND_DOWN, &main_down);

	create_tasks();

	vTaskStartScheduler();		// Never returns
	while (1)
		;
	return 0;
}
Пример #6
0
int main(void) {
	void CreateTasks();

	AS_Init(AS_MODE_SURROUND | AS_MODE_16CH);
	AS_SetDefaultSettings(AS_PCM_8BIT, 11025, AS_SURROUND);

	while (1) { // Infinite loop
		if (scr_Main()) // 메인
			break; // nds 종료
		user_init(); // 유저정보 초기화
		scr_Game(); // 게임
		scr_Gameover(); // 종료

	}
	UnLoad_Screen();
	return 0;

}
Пример #7
0
int main() {

	PA_Init();    // Initializes PA_Lib
//	PA_InitVBL(); // Initializes a standard VBL

	PA_VBLFunctionInit(AS_SoundVBL);
	AS_Init(AS_MODE_MP3 | AS_MODE_SURROUND | AS_MODE_16CH);
	AS_SetDefaultSettings(AS_PCM_8BIT, 11025, AS_SURROUND);

	PA_LoadDefaultText(1, 0);

	StartScreen();
	CreateTasks();
	initMap(map);

	vTaskStartScheduler();		// Never returns
	while (1)
		;
	return 0;
}
Пример #8
0
// Function: main()
int main(int argc, char ** argv)
{
	PA_Init();    // Initializes PA_Lib
	PA_InitVBL(); // Initializes a standard VBL
	PA_InitText(0, 0);
	
	
	// Init the sound system
	AS_Init(AS_MODE_SURROUND | AS_MODE_16CH);
	AS_SetDefaultSettings(AS_PCM_8BIT, 11025, AS_SURROUND);
	
	PA_OutputSimpleText(0, 1, 10, "Close the lid and see what     happens...");

	// Infinite loop to keep the program running
	while (1)
	{	
		PA_CloseLidSound2(Babye, HereWeGo); // Sound to play when lid closes and opens

		PA_WaitForVBL();
	}
	
	return 0;
} // End of main()
Пример #9
0
int main(){
	// Initialisation de la PAlib de l'affichage et du son
	PA_Init();    // Initialisation de la PALib
	PA_InitVBL(); // Initialisation de l'affichage
	AS_Init(AS_MODE_16CH); //son	
	AS_SetDefaultSettings(AS_PCM_8BIT, 16384, 0); //son (type,rate)
	
	splash(); //Splashscreen
	
	// Initialisation du texte
	PA_LoadDefaultText(0, 0); //bas
	PA_LoadDefaultText(1, 0); //haut
	PA_SetTextTileCol(1, TEXT_BLACK); // texte en noir (haut)
	PA_SetTextTileCol(0, TEXT_BLACK); // texte en noir (bas)
	
	//Palettes des couleurs pour les sprites des boutons (une seule suffit) (numéro 1)
	PA_LoadSpritePal(0, 1, (void*)plus_Pal);
	
	PA_LoadBackground(1, 1, &titre); // background de l'écran du haut
	
	//Accueil
	AS_SoundDefaultPlay(pinball, pinball_size, 127, 64, true, 0); //musique de fond en boucle
	fonduentree(); //fondu d'entrée 
	if(PA_UserInfo.Language == 2) {
		PA_LoadBackground(0, 1, &jouer);
	}
	else {
		PA_LoadBackground(0, 1, &play);
	}
	PA_OutputText(1, 17, 8, "2.1"); //version
	PA_WaitFor(Pad.Newpress.Anykey || Stylus.Newpress);
	AS_SoundQuickPlay(clic);
	fondusortie();
	
	//Nouvelle partie : etiquette et reset
	debut:
	PA_ClearTextBg(0); //efface tout le texte
	PA_ResetSpriteSys(); //efface tout les sprites
	PA_OutputText(1,1,22,"                                  ");
		
	// Les variables
	u32 nmax = 0; //Nombre maximal
	u32 nmin = 0; //Nombre minimal
	u32 coup = 0; //Nombre de coups
	u32 nombre = 0; //Nombre (valeur de départ)
	u32 diff = 0;
	u32 temps = 0;
	
	//Sélection de la difficulté.
	fonduentree();
	PA_LoadBackground(0, 1, &niveau);
	while(1) {
		
		if(PA_UserInfo.Language == 2) {
			PA_OutputText(0,5,4,"Facile             (B)");
			PA_OutputText(0,5,5,"(entre 10 et 25)");
			PA_OutputText(0,5,11,"Normal             (Y)");
			PA_OutputText(0,5,12,"(entre 10 et 60)");
			PA_OutputText(0,5,18,"Difficile          (X)");
			PA_OutputText(0,5,19,"(entre 10 et 95)");
		}
		else {
			PA_OutputText(0,5,4,"Easy               (B)");
			PA_OutputText(0,5,5,"(between 10 and 25)");
			PA_OutputText(0,5,11,"Normal             (Y)");
			PA_OutputText(0,5,12,"(between 10 and 60)");
			PA_OutputText(0,5,18,"Hard               (X)");
			PA_OutputText(0,5,19,"(between 10 and 95)");
		}
		
		if((PA_StylusInZone(29, 21, 227, 57) && Stylus.Newpress) || Pad.Newpress.A) {
		nombre = 12;
		nmax = 25;
		nmin = 10;
		diff = 1;
		break;
		}
		
		if((PA_StylusInZone(29, 79, 227, 115) && Stylus.Newpress) || Pad.Newpress.A) {
		nombre = 35;
		nmax = 60;
		nmin = 10;
		diff = 2;
		break;
		}
		
		if((PA_StylusInZone(29, 135, 227, 170) && Stylus.Newpress) || Pad.Newpress.A) {
		nombre = 52;
		nmax = 95;
		nmin = 10;
		diff = 3;
		break;
		}
		
		PA_WaitForVBL();
	}
	
	u32 dsnum = PA_RandMinMax(nmin, nmax); //La valeur aléatoire entre 40 et 70
	
	PA_LoadBackground(0, 1, &jeu); //chargement du bg de jeu
	
	//Reset pour effacer l'écran de choix de la difficulté
	PA_ClearTextBg(0);
	
	//Bouton + - et +5 -5
	PA_CreateSprite(0, 0, (void*)plus_Sprite, OBJ_SIZE_32X32, 1, 1, 40, 33);
	PA_CreateSprite(0, 1, (void*)moins_Sprite, OBJ_SIZE_32X32, 1, 1, 40, 110);
	PA_CreateSprite(0, 2, (void*)okb_Sprite, OBJ_SIZE_32X32, 1, 1, 218, 157);
	PA_CreateSprite(0, 4, (void*)moins5_Sprite, OBJ_SIZE_32X32, 1, 1, 75, 110);
	PA_CreateSprite(0, 5, (void*)plus5_Sprite, OBJ_SIZE_32X32, 1, 1, 75, 33);	

	// Boucle principale
	PA_VBLCounterStart(0);
	while (1)
	{
	PA_OutputText(0,8,22,"%d", coup);
	//PA_OutputText(1,1,20,"La DS pense à : %d", dsnum);  // Débug
	//PA_OutputText(1,1,19,"Temps : %d", PA_VBLCounter[0]/60); // Débug
	if(PA_UserInfo.Language == 2) {
		if(diff == 1) {
			PA_OutputText(1,1,22,"Facile (entre %d et %d)",nmin, nmax);
		}
		if(diff == 2) {
			PA_OutputText(1,1,22,"Normal (entre %d et %d)",nmin, nmax);
		}
		if(diff == 3) {
			PA_OutputText(1,1,22,"Difficile (entre %d et %d)",nmin, nmax);
		}
	}
	else {
		if(diff == 1) {
			PA_OutputText(1,1,22,"Easy (between %d and %d)",nmin, nmax);
	}
	if(diff == 2) {
			PA_OutputText(1,1,22,"Normal (between %d and %d)",nmin, nmax);
	}
	if(diff == 3) {
			PA_OutputText(1,1,22,"Hard (between %d and %d)",nmin, nmax);
	}	
	}
	
	if(PA_UserInfo.Language == 2) {
		PA_OutputText(0,4,10,"Votre nombre:");
	}
	else {
		PA_OutputText(0,4,10,"Your number:");
	}
	PA_OutputText(0,4,12,"%d", nombre);
	if(PA_UserInfo.Language == 2) {
		PA_OutputText(0,1,22,"Coups:");
	}
	else {
		PA_OutputText(0,1,22,"Tries:");
	}
	
	if(Pad.Newpress.Up || (Stylus.Newpress && PA_SpriteTouched(0))) {
		nombre++;
		AS_SoundQuickPlay(clic);
	}
	if(Pad.Newpress.Down || (Stylus.Newpress && PA_SpriteTouched(1))) {
		nombre--;
		AS_SoundQuickPlay(clic);
	}	
	if(Pad.Newpress.Left || (Stylus.Newpress && PA_SpriteTouched(4))) {
		nombre = nombre - 5;
		AS_SoundQuickPlay(clic);
	}	
	if(Pad.Newpress.Right || (Stylus.Newpress && PA_SpriteTouched(5))) {
		nombre = nombre + 5;
		AS_SoundQuickPlay(clic);
	}
	if(nombre < nmin) {
		nombre = nmin;
	}		
	if(nombre > nmax) {
		nombre = nmax;
	}
	if((PA_SpriteTouched(2) && Stylus.Newpress) || Pad.Newpress.A) {
		coup++;
		AS_SoundQuickPlay(clic);
		if (dsnum > nombre)
		{
			PA_OutputText(0,25,11,"          ");
			PA_OutputText(0,25,11,"Plus !");
		}
		if (dsnum < nombre)
		{
			PA_OutputText(0,25,11,"          ");
			if(PA_UserInfo.Language == 2) {
				PA_OutputText(0,25,11,"Moins !");
			}
			else {
				PA_OutputText(0,25,11,"Minus !");
			}
		}
		if (dsnum == nombre)
		{
			temps = PA_VBLCounter[0]/60;
			PA_WaitFor(Stylus.Released || Pad.Released.A);
			PA_ResetSpriteSys();
			PA_LoadBackground(0, 1, &gagne);
			PA_ClearTextBg(0); //efface tout le texte
			AS_SoundQuickPlay(ok);
			//Smiley qui applaudit	
			PA_LoadSpritePal(0, 0, (void*)applaudissement_Pal); // la palette du smiley (num 0)
			PA_CreateSprite(0, 3,(void*)applaudissement_Sprite, OBJ_SIZE_32X32,1, 0, 180, 45);
			PA_StartSpriteAnimEx(0, 3, 0, 4, 12, ANIM_LOOP, 7);
			
			if(PA_UserInfo.Language == 2) {
				PA_OutputText(0,15,6,"Gagné !");
				PA_OutputText(0,6,8,"Vous avez trouvé %d", dsnum);
				PA_OutputText(0,6,9,"en %d secondes", temps);
				PA_OutputText(0,6,10,"et %d coups.", coup);
				PA_OutputText(0,6,16,"START ou touchez");
				PA_OutputText(0,6,17,"l'écran pour rejouer.");
			}
			else {
				PA_OutputText(0,15,6,"Win !");
				PA_OutputText(0,6,9,"You find %d", dsnum);
				PA_OutputText(0,6,10,"in %d seconds", temps);
				PA_OutputText(0,6,11,"and %d tests. ", coup);
				PA_OutputText(0,6,15,"START or touch");
				PA_OutputText(0,6,16,"the screen to replay.");
			}
			
			//Recommencer le jeu avec l'etiquette debut
			PA_WaitFor(Stylus.Newpress || Pad.Newpress.Start);
			AS_SoundQuickPlay(clic);
			goto debut;
		}
	}
	PA_WaitForVBL(); //Rafraichissement à ne pas bouger/enlever	
	}

return 0;
}
Пример #10
0
int main() {

    PA_Init();    // Initialisation de la PALib
    PA_InitVBL(); // Initialisation de l'affichage

    splash();

    // Initialisation du texte, de la palette et du son
    PA_LoadDefaultText(0, 0); //bas
    PA_LoadDefaultText(1, 0); //haut
    PA_SetTextTileCol(1, TEXT_BLACK); // texte en noir (haut)
    PA_SetTextTileCol(0, TEXT_BLACK); // texte en noir (bas)
    PA_LoadSpritePal(0, 1, (void*)feu_Pal); // palette du feu
    PA_LoadSpritePal(0, 2, (void*)mario_Pal); //palette pour mario
    PA_LoadSpritePal(0, 3, (void*)boite_Pal); //palette pour la boite
    PA_LoadSpritePal(0, 4, (void*)piece_Pal); //palette pour la piece

    AS_Init(AS_MODE_16CH); //son
    AS_SetDefaultSettings(AS_PCM_8BIT, 8000, 0); //son (type,rate)
    AS_SoundDefaultPlay(fond_smgboss1, fond_smgboss1_size, 50, 64, true, 0); //musique de fond en boucle

    //Accueil
accueil:
    fonduentree(); //fondu d'entrée
    PA_LoadBackground(0, 1, &jeu);
    PA_LoadBackground(1, 1, &titre);
    if(PA_UserInfo.Language == 2) {
        PA_OutputText(0, 3, 6, "Le but est d'appuyer");
        PA_OutputText(0, 3, 7, "sur les boutons le");
        PA_OutputText(0, 3, 8, "plus vite possible.");
        PA_OutputText(0, 3, 9, "Quand vous appuyez sur");
        PA_OutputText(0, 3, 10, "un bouton, votre score");
        PA_OutputText(0, 3, 11, "augmente de un.");
        PA_OutputText(0, 3, 16, "Appuyez sur un bouton");
        PA_OutputText(0, 3, 17, "pour commencer !");
    }
    else {
        PA_OutputText(0, 3, 6, "The aim is to press the");
        PA_OutputText(0, 3, 7, "buttons as fast as you can.");
        PA_OutputText(0, 3, 8, "When a button is pressed,");
        PA_OutputText(0, 3, 9, "it add 1 point to");
        PA_OutputText(0, 3, 10, "your score.");
        PA_OutputText(0, 3, 16, "Press any button to start !");
    }
    PA_WaitFor(Pad.Newpress.Anykey || Stylus.Newpress);

    //Variables
    u32 coups = 0;

    //A vos marques, pret, partez !
    PA_ClearTextBg(0); //efface tout le texte du bas
    PA_VBLCounterStart(0); // compteur

    //A vos marques
    AS_SoundQuickPlay(un);
    PA_CreateSprite(0, 0, (void*)feu_Sprite, OBJ_SIZE_32X64, 1, 1, 200, 30); //feu, sprite 0
    if(PA_UserInfo.Language == 2) {
        PA_OutputText(0, 3, 6, "A vos marques...");
    }
    else {
        PA_OutputText(0, 3, 6, "Ready ?");
    }
    PA_WaitFor(PA_VBLCounter[0]/60 == 2);

    //Pret
    AS_SoundQuickPlay(deux);
    PA_SetSpriteAnim(0, 0, 2);
    if(PA_UserInfo.Language == 2) {
        PA_OutputText(0, 3, 8, "Prêt ?");
    }
    else {
        PA_OutputText(0, 3, 8, "Steady...");
    }
    PA_WaitFor(PA_VBLCounter[0]/60 == 4);


    //Partez
    AS_SoundQuickPlay(trois);
    PA_SetSpriteAnim(0, 0, 1);
    if(PA_UserInfo.Language == 2) {
        PA_OutputText(0, 3, 10, "Partez !");
    }
    else {
        PA_OutputText(0, 3, 10, "Go !");
    }
    PA_WaitFor(PA_VBLCounter[0]/60 == 6);

    PA_ClearTextBg(0); //efface tout le texte du bas
    PA_DeleteSprite(0, 0);
    PA_CreateSprite(0, 1, (void*)mario_Sprite, OBJ_SIZE_32X32, 1, 2, 100, 100); //mario, sprite 1 avec palette 2
    PA_CreateSprite(0, 2, (void*)boite_Sprite, OBJ_SIZE_16X16, 1, 3, 110, 84); //boite, sprite 2 avec palette 3
    PA_CreateSprite(0, 3, (void*)piece_Sprite, OBJ_SIZE_8X16, 1, 4, 114, 68); //boite, sprite 2 avec palette 3
    PA_VBLCounterStart(1); //compteur pour la partie à venir

    while(1) {
        PA_OutputText(0, 3, 7, "Score : %d", coups);
        if(PA_UserInfo.Language == 2) {
            PA_OutputText(0, 3, 6, "Partie en cours...");
            PA_OutputText(0, 3, 8, "Temps : %d ", 20-(PA_VBLCounter[1]/60));
        }
        else {
            PA_OutputText(0, 3, 6, "Game in progress...");
            PA_OutputText(0, 3, 8, "Time : %d ", 20-(PA_VBLCounter[1]/60));
        }
        //Incrémentation du score si la partie n'est pas fini
        if((Pad.Newpress.A || Pad.Newpress.B || Pad.Newpress.X || Pad.Newpress.Y || Pad.Newpress.L || Pad.Newpress.R || Stylus.Newpress || Pad.Newpress.Left || Pad.Newpress.Right || Pad.Newpress.Up || Pad.Newpress.Down) && PA_VBLCounter[1]/60 < 20) {
            PA_SetSpriteAnim(0, 1, 1); //fait sauter mario
            PA_SetSpriteAnim(0, 3, 1); //fait apparaitre une piece
            coups++;
        }

        //Lors du relachement des touches/stylet, les sprites reviennent a la normale
        if(Pad.Released.Anykey || Stylus.Released) {
            PA_SetSpriteAnim(0, 1, 0);//mario revient au sol
            PA_SetSpriteAnim(0, 3, 0); //et la piece disparait
        }

        //Fin de la partie
        if(PA_VBLCounter[1]/60 == 20) {
            //On efface le txt et les sprites
            PA_ClearTextBg(0);
            PA_DeleteSprite(0, 1);
            PA_DeleteSprite(0, 2);
            PA_DeleteSprite(0, 3);
            if(PA_UserInfo.Language == 2) {
                PA_OutputText(0, 3, 6, "Partie terminée !");
                PA_OutputText(0, 3, 7, "Votre score : %d", coups);
                PA_OutputText(0, 3, 9, "Appuyez sur une touche");
                PA_OutputText(0, 3, 10, "pour rejouer...");
            }
            else {
                PA_OutputText(0, 3, 6, "End of the game !");
                PA_OutputText(0, 3, 7, "Your score : %d", coups);
                PA_OutputText(0, 3, 9, "Press a button to");
                PA_OutputText(0, 3, 10, "replay...");
            }
            PA_WaitFor(PA_VBLCounter[1]/60 == 22);
            PA_WaitFor(Pad.Newpress.Anykey || Stylus.Newpress);
            goto accueil;
        }
        PA_CheckLid();
        PA_WaitForVBL();
    }

    return 0;
}