diff --git a/src/font.cpp b/src/font.cpp index d5ef9f4..c1d5074 100644 --- a/src/font.cpp +++ b/src/font.cpp @@ -112,7 +112,7 @@ int GetTextWidth( SkittlesFontPtr font, const char *text ) int width = 0; while( *text ) { - width += font->width[*text++]; + width += font->width[(uint8_t) *text++]; } return width; diff --git a/src/level.cpp b/src/level.cpp index 6edd9df..0dd35a1 100644 --- a/src/level.cpp +++ b/src/level.cpp @@ -1087,7 +1087,6 @@ void SharewareVictory( void ) MRect bufferDstRect = { 0, 0, 480, 300 }; MPoint dPoint = { 450, 50 }, lPoint, cPoint; int scroll, ticks, x, y; - int delay = 2; const char* text; int thisFade; const char fade[120] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //0 diff --git a/src/pause.cpp b/src/pause.cpp index b895e46..d91a7ba 100644 --- a/src/pause.cpp +++ b/src/pause.cpp @@ -626,7 +626,7 @@ static void DrawHiScoreContents( int *item, int shade ) { scan = line[index]; while( *scan ) - dPoint[index].h -= smallFont->width[*scan++]; + dPoint[index].h -= smallFont->width[(uint8_t) * scan++]; dPoint[index].h /= 2; } diff --git a/src/score.cpp b/src/score.cpp index a2151d9..4d51469 100644 --- a/src/score.cpp +++ b/src/score.cpp @@ -130,7 +130,7 @@ void ShowScore( int player ) void DrawCharacter( char which, const MRect *myRect ) { MRect srcRect; - char count, result; + int count, result; result = -1; for( count = 0; count < arrsize(characterList); count++ ) diff --git a/src/tutorial.cpp b/src/tutorial.cpp index 014f128..17eabb1 100644 --- a/src/tutorial.cpp +++ b/src/tutorial.cpp @@ -363,7 +363,7 @@ static int CalculateBalloonWidth( char *message ) break; default: - currentWidth += balloonFont->width[in]; + currentWidth += balloonFont->width[(uint8_t) in]; break; } } diff --git a/src/zap.cpp b/src/zap.cpp index 5c92c9d..e78e208 100644 --- a/src/zap.cpp +++ b/src/zap.cpp @@ -60,7 +60,7 @@ void ZapScoreDisplay( int player, int amount, int multiplier, int x, int y, int zapScoreWidth[player] = 0; scan = zapScore[player]; - while( *scan ) zapScoreWidth[player] += zapFont->width[*scan++]; + while( *scan ) zapScoreWidth[player] += zapFont->width[(uint8_t) * scan++]; if( (zapScorePt[player].h + zapScoreWidth[player] + 8) > (kGridAcross * kBlobHorizSize) ) {