parent
c0937fed08
commit
cd55de5ce0
20
slangin.ino
20
slangin.ino
|
@ -158,7 +158,7 @@ void loop() {
|
|||
font3x5.print(F("v1.1.1"));
|
||||
menu[0] = F("Hit the Streets");
|
||||
menu[1] = F("Extended Game");
|
||||
//menu[2] = F("High Scores");
|
||||
// menu[2] = F("High Scores");
|
||||
menuLength = 2;
|
||||
menuSmall = true;
|
||||
menuCols = false;
|
||||
|
@ -353,17 +353,19 @@ void loop() {
|
|||
break;
|
||||
|
||||
case STATE_GAME_OVER: {
|
||||
int score = floor(sqrt((pSavingsAmount + pMoney - pLoanAmount) / 31.5));
|
||||
if (score > 100) score = 100;
|
||||
dialog[0] = "";
|
||||
dialog[1] = " Game over!";
|
||||
dialog[2] = " Your score: ";
|
||||
dialog[2] += String(score);
|
||||
dialog[3] = " out of 100.";
|
||||
dialog[0] = "Game over! Score:";
|
||||
dialogSmall = false;
|
||||
dialogLength = 4;
|
||||
dialogLength = 1;
|
||||
sPreviousGameState = STATE_TITLE;
|
||||
pMoney += pSavingsAmount - pLoanAmount;
|
||||
for (int i = 0; i < 6; i++) {
|
||||
pMoney += pInventory[i] * sDrugPrices[i];
|
||||
}
|
||||
if (pMoney < 0) {
|
||||
pMoney = 0;
|
||||
}
|
||||
drawDialog();
|
||||
drawMoney(10, 20, pMoney);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue