Skip to content

Commit

Permalink
SHERLOCK: Fix compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
dreammaster committed Jul 13, 2015
1 parent 6c03654 commit 5629410
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 14 deletions.
3 changes: 3 additions & 0 deletions engines/sherlock/image_file.cpp
Expand Up @@ -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] = {
Expand Down
20 changes: 7 additions & 13 deletions engines/sherlock/tattoo/tattoo_darts.cpp
Expand Up @@ -128,19 +128,13 @@ 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++) {
if (_cricketScore[playerNum][y] < 3)
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)
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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);
}

Expand Down
2 changes: 1 addition & 1 deletion engines/sherlock/tattoo/tattoo_darts.h
Expand Up @@ -150,7 +150,7 @@ class Darts {
/**
* 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
Expand Down

0 comments on commit 5629410

Please sign in to comment.