diff options
author | Paul Gilbert | 2015-07-12 23:09:38 -0400 |
---|---|---|
committer | Paul Gilbert | 2015-07-12 23:09:38 -0400 |
commit | 56294105769cf34f7284e815571a6dbc52044ddf (patch) | |
tree | fd28fdd925591104aaea6b784ae1a1b035864a9f /engines/sherlock/tattoo/tattoo_darts.cpp | |
parent | 6c036549806491012a1921bbe4aa3b5a3252702d (diff) | |
download | scummvm-rg350-56294105769cf34f7284e815571a6dbc52044ddf.tar.gz scummvm-rg350-56294105769cf34f7284e815571a6dbc52044ddf.tar.bz2 scummvm-rg350-56294105769cf34f7284e815571a6dbc52044ddf.zip |
SHERLOCK: Fix compiler warnings
Diffstat (limited to 'engines/sherlock/tattoo/tattoo_darts.cpp')
-rw-r--r-- | engines/sherlock/tattoo/tattoo_darts.cpp | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/engines/sherlock/tattoo/tattoo_darts.cpp b/engines/sherlock/tattoo/tattoo_darts.cpp index 917b804602..842320e270 100644 --- a/engines/sherlock/tattoo/tattoo_darts.cpp +++ b/engines/sherlock/tattoo/tattoo_darts.cpp @@ -128,7 +128,6 @@ void Darts::playDarts(GameType gameType) { } else { // check for cricket game over bool allClosed = true; - bool otherAllClosed = true; int nOtherScore; for (int y = 0; y < 7; y++) { @@ -136,11 +135,6 @@ void Darts::playDarts(GameType gameType) { allClosed = false; } - for (int y = 0; y < 7; ++y) { - if (_cricketScore[playerNum ^ 1][y] < 3) - otherAllClosed = false; - } - if (allClosed) { nOtherScore = (playerNum == 0) ? _score2 : _score1; if (score >= nOtherScore) @@ -879,8 +873,8 @@ int Darts::throwDart(int dartNum, int computer) { drawDartsLeft(dartNum, computer); if (!computer) { - screen.print(Common::Point(_dartInfo.left, _dartInfo.top + _spacing), 0, FIXED(HitAKey)); - screen.print(Common::Point(_dartInfo.left, _dartInfo.top + _spacing * 2), 0, FIXED(ToStart)); + screen.print(Common::Point(_dartInfo.left, _dartInfo.top + _spacing), 0, "%s", FIXED(HitAKey)); + screen.print(Common::Point(_dartInfo.left, _dartInfo.top + _spacing * 2), 0, "%s", FIXED(ToStart)); } if (!computer) { @@ -938,13 +932,13 @@ void Darts::doCricketScoreHits(int player, int scoreIndex, int numHits) { } } -void Darts::updateCricketScore(int player, int dartHit, int multiplier) { - if (dartHit < 15) +void Darts::updateCricketScore(int player, int dartVal, int multiplier) { + if (dartVal < 15) return; - if (dartHit <= 20) - doCricketScoreHits(player, 20 - dartHit, multiplier); - else if (dartHit == 25) + if (dartVal <= 20) + doCricketScoreHits(player, 20 - dartVal, multiplier); + else if (dartVal == 25) doCricketScoreHits(player, 6, multiplier); } |