A retro gaming programme, designed for use on a portable embedded system. Incorporates power saving techniques.
Dependencies: ConfigFile N5110 PowerControl beep mbed
Diff: tower.h
- Revision:
- 28:d1bd8a91177e
- Parent:
- 27:c50111a3b46b
- Child:
- 29:c17bd5597723
--- a/tower.h Mon Apr 20 19:12:48 2015 +0000 +++ b/tower.h Mon Apr 20 19:21:27 2015 +0000 @@ -955,27 +955,18 @@ lcd.printString(buffer3,49,26);//display } - char x = fsm[state].output1; - char y = fsm[state].output2; - char z = fsm[state].output3; - - int insert1 = sprintf (player1initials, "%c%c%c",x,y,z); - actionButtons(); - //inwhile + //in while if(buttonFlagA) { buttonFlagA = 0; buttonFlagB = 0; - // char x = fsm[state].output1; // char y = fsm[state].output2; // char z = fsm[state].output3; // // int insert1 = sprintf (player1initials, "%c%c%c",x,y,z); -// int insert2 = sprintf (player2initials, "1.%c%c%c.....%i",x,y,z,highScore2); -// int insert3 = sprintf (player3initials, "1.%c%c%c.....%i",x,y,z,highScore3); break; } @@ -1133,16 +1124,16 @@ char buffer2[14]; char buffer3[14]; - int player1 = sprintf(buffer1,"",player1initials);//insert scores + int player1 = sprintf(buffer1,"1.DRT......%i",highScore1);//insert scores int player2 = sprintf(buffer2,"2.HFR......%i",highScore2);//and names in int player3 = sprintf(buffer3,"3.DEU......%i",highScore3);//to the buffer if (player1 <= 14) //ensure length is smaller than screen - lcd.printString(player1initials,5,2);//display + lcd.printString(buffer1,5,2);//display if (player2 <= 14) //ensure length is smaller than screen - lcd.printString(player2initials,5,3);//display + lcd.printString(buffer2,5,3);//display if (player3 <= 14) //ensure length is smaller than screen - lcd.printString(player3initials,5,4);//display + lcd.printString(buffer3,5,4);//display while(1) { actionButtons();//select