You know, using a string to hold the score is probably something you could eliminate if your score is an integer type to start with:
int tempScore = playerScore;
int scoreCursor = .... ; // starting at right hand side
int cursorStep = 12;
while ( tempScore>0 )
{
int digit = tempScore%10; // next decimal digit
tempScore /= 10;
apply_surface( scoreCursor, 10, font, screen, &fontClips[ digit ] );
scoreCursor -= cursorStep;
}
Note, however, that this method will right align the output and won't zero fill the result, either. That would be easy to add though, just a loop afterwards that renders your "zero" character until you've emitted the required fixed length of digits overall.
-edit-
Actually the above assumes the score must be greater than zero to start with. A better version would be:
int tempScore = playerScore;
int scoreCursor = .... ; // starting at right hand side
int cursorStep = 12;
do {
int digit = tempScore%10; // next decimal digit
tempScore /= 10;
apply_surface( scoreCursor, 10, font, screen, &fontClips[ digit ] );
scoreCursor -= cursorStep;
} while (tempScore != 0);
This version should work with zero score.
It could probably even negative scores, though I'd need to check the side effects of the number rendering - you'd need to abs() the digit for sure and you'd have to render the minus sign yourself afterwards. But at least the scoreCursor would already be at the right position.