示例#1
0
 void Tutorial::Play(){
         Introduction();
         m->stampa(h,p);
         slow_print((char*)"Prima di tutto lo spostamento.\nPremere 'w' per aprire la porta della stanza a nord\n");
         slow_print((char*)"Premere 's' per aprire la porta della stanza a sud\nPremere 'a' per aprire la porta della stanza ad est\n");
         slow_print((char*)"Premere 'd' per aprire la porta della stanza a ovest\n");
         slow_print((char*)"Dove vuoi andare?\n");
         for (int i=0;(i<3)&&(!esci);i++)        
             Move();
         if (!esci){                       
           p->get_inventario()->inc_keys();
           Check_inventario();
           if (!esci){
             slow_print((char*)"\nControlla sempre gli oggetti disponibili dall'inventario.\n");
             cout<<"(Premi un tasto per continuare..)\n";
             getch();
             clear_screen(); 
             m->stampa(h,p);}}
        if (!esci)
           Move();
        if (!esci){       
          nod->change_armadietto(true);
          m->stampa(h,p);
          slow_print((char*)"Rilevato un'armadietto chiuso a chiave.\n");
          slow_print((char*)"Il simbolo '?' significa che è possibile usare un grimaldello esplosivo per forzare la serratura e raccogliere il contenuto.\n");
          slow_print((char*)"I grimaldelli non sono utilizzabili una seconda volta ed è necessario trovarne altri per forzare nuove serrature\n");
          sleep(1);
          bool flag3=true;
           cout<<"Premendo il tasto 'm' si accede al comando AZIONE\n";
          do
           input=getch();
          while ((input!='m')&&(input!='f'));
          switch(input){
               case ('f'):{esci=true; clear_screen(); break;}
               case ('m'):{bool flag4=true; 
                           char input1[25]; 
                           do {
                             cout<<"Digitare 'apri' per sfruttare un grimaldello e forzare l'armadietto chiuso\n"; 
                             cout<<"(Premi invio una volta terminato l'inserimento)\n"; 
                             cin>>input1;
                             getchar(); 
                             if (strcmp(input1,(char*)"apri")==0){
                                  nod->push_weapons(w);
                                  p->get_inventario()->dec_keys(); 
                                  clear_screen();
                                  nod->change_armadietto(false);
                                  m->stampa(h,p); 
                                  flag4=false; 
                                  cout<<"Hai trovato un'arma\n";}
                            else{
                                flag4=true; 
                                cout<<"\r                                                    ";}}
                           while (flag4);
                           break;}}}
示例#2
0
BOOLEAN
StartGame (void)
{
	do
	{
		while (!TryStartGame ())
		{
			if (GLOBAL (CurrentActivity) == (ACTIVITY)~0)
			{	// timed out
				GLOBAL (CurrentActivity) = 0;
				SplashScreen (0);
				if(optWhichIntro == OPT_3DO){
					Drumall ();
				}
				Credits (FALSE);
			}

			if (GLOBAL (CurrentActivity) & CHECK_ABORT)
				return (FALSE); // quit
		}

		if (LastActivity & CHECK_RESTART)
		{	// starting a new game
			FadeMusic (NORMAL_VOLUME, 0);
			if(!optSkipIntro){
				Introduction ();
			}
		}
	
	} while (GLOBAL (CurrentActivity) & CHECK_ABORT);

	{
		extern STAR_DESC starmap_array[];
		extern const BYTE element_array[];
		extern const PlanetFrame planet_array[];

		star_array = starmap_array;
		Elements = element_array;
		PlanData = planet_array;
	}

	PlayerControl[0] = HUMAN_CONTROL | STANDARD_RATING;
	PlayerControl[1] = COMPUTER_CONTROL | AWESOME_RATING;

	return (TRUE);
}
示例#3
0
BOOLEAN
StartGame (void)
{
	do
	{
		while (!TryStartGame ())
		{
			if (GLOBAL (CurrentActivity) == (ACTIVITY)~0)
			{	// timed out
				GLOBAL (CurrentActivity) = 0;
				SplashScreen (0);
				Credits (FALSE);
			}

			if (GLOBAL (CurrentActivity) & CHECK_ABORT)
				return (FALSE); // quit
		}

		if (LastActivity & CHECK_RESTART)
		{	// starting a new game
			Introduction ();
		}
	
	} while (GLOBAL (CurrentActivity) & CHECK_ABORT);

	{
		extern STAR_DESC starmap_array[];
		extern const BYTE element_array[];
		extern const PlanetFrame planet_array[];

		star_array = starmap_array;
		Elements = element_array;
		PlanData = planet_array;
	}

	PlayerControl[0] = HUMAN_CONTROL | STANDARD_RATING;
	PlayerControl[1] =  COMPUTER_CONTROL | AWESOME_RATING;
	SetPlayerInput ();

	return (TRUE);
}
示例#4
0
void StartQueue()
{
    Introduction();
    BaseContainer();
}