SHERLOCK: Fix compiler warnings

This commit is contained in:
Paul Gilbert 2015-07-12 23:09:38 -04:00
parent 6c03654980
commit 5629410576
3 changed files with 11 additions and 14 deletions

View File

@ -729,6 +729,9 @@ void ImageFile3DO::load3DOCelRoomData(Common::SeekableReadStream &stream) {
push_back(imageFrame);
}
}
// Suppress compiler warning
warning("ccbPPMP0 = %d, ccbPPMP1 = %d", ccbPPMP0, ccbPPMP1);
}
static uint16 imagefile3DO_cel_bitsMask[17] = {

View File

@ -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);
}

View File

@ -150,7 +150,7 @@ private:
/**
* Updates the score based upon what the dart hit
*/
void updateCricketScore(int player, int dartHit, int multiplier);
void updateCricketScore(int player, int dartVal, int multiplier);
/**
* Draw the darts left