Beispiel #1
0
///////////////////////////////////////////////////////////////////////////////
//
//	EndGame
//
//  Appel PrintWin() et PrintLose() selon le bool
//
///////////////////////////////////////////////////////////////////////////////
void Print::EndGame(bool winner)
{
	if (winner == true)
		PrintWin();
	else
		PrintLose();
}
Beispiel #2
0
void PrintBaseScreen( void ) {


    //
    // Background Color
    //
    PrintWin( BaseScreen, bg, 23, 80, 0, 0, WHITE_BLUE, "" );


    //
    // Base Screen
    //
    PrintWin( BaseScreen, logo, 1, 80, 0, 0, WHITE_RED, "Linux Firmware Debug Kit "LFDK_VERSION );
    PrintWin( BaseScreen, copyright, 1, 32, 0, 48, WHITE_RED, "Merck Hung <*****@*****.**>" );
    PrintWin( BaseScreen, help, 1, 80, 23, 0, BLACK_WHITE, "(Q)uit (P)CI (M)emory (I)O CM(O)S" );


    update_panels();
    doupdate();
}
Beispiel #3
0
///////////////////////////////////////////////////////////////////////////////
//
//	thread
//
///////////////////////////////////////////////////////////////////////////////
void Console::thread(void)
{
	unsigned int addr, data;
	bool bAfficheString = true;

	while(1)
	{
		if(Console_Enable_InPort.read() == true)
		{
			// Adresse de la console
			addr = Console_Data_InPort.read();

			// Occupé 
			Console_Ready_OutPort.write( false );

			// Next transmission
			wait(Console_Enable_InPort.default_event()); ;		

			data = Console_Data_InPort.read();

			switch(addr)
			{
			case 4095: // Réception d’un caractère d’une chaîne
				if(bAfficheString)
				{
					cout << "Mot actuel: ";
					bAfficheString = false;
				}
				putchar(data);
				break;
			case 4096: // Réception de la quantité d’erreurs 
				cout << endl << "Nombre d'erreurs : " << data << endl;
				bAfficheString = true;
				break;
			case 4097: // Demande d’affichage de la fonction PrintWin()
				PrintWin();
				break;
			case 4098: // Demande d’affichage de la fonction PrintLose()
				PrintLose();
				break;
			default:
				break;
			}
			Console_Ready_OutPort.write( true );
		}
		Console_Ready_OutPort.write( true );
		wait(Console_Enable_InPort.default_event()); 
	}
}