The font part of the code is here, and the rest is at the rapidshare link.
Code: Select all
int char2Font(char char_input[255]) {
int indexNumber = 0;
int i;
for(i=0;i++;i<=strlen(inputString)) {
if (stricmp(inputString[i], char_input)==0) {
return indexNumber;
}
indexNumber = indexNumber + letterPixelsWide;
}
}
void blitChar(char text[255], int posX, int posY) {
blitAlphaImageToScreen(char2Font(text), 0, letterPixelsWide, letterPixelsTall, font, posX, posY);
}
void blitString(int posX, int posY, char text[255]) {
int incX = 0;
int i;
strupr(text);
for(i=0;i++;i<=strlen(text)) {
blitChar(text[i], posX + incX, posY);
incX = incX + letterPixelsWide;
}
}
Thanks!