Sorry heres my class definition:
First question --- where does "map" come from in your print function??
map holds all the characters displayable in order. EG: 0123456789ABCDEF....etc.
BitText(const char*, const char*);
void Print(Uint16, Uint16, const char*);
data holds the mask data. EG: "mprtxpm" is the data to display the number 0.
Yeah forgot about that.
In BitText::BitText() . . .
map = new char[len];
Now youre just showing off :p
col = (unsigned long)-1;
Oh. I dident think it recalculated it each loop. Best move it out I guess.
Calculating strlen() is expensive, consider moving the calculation outside of the for loop and storing it in a variable.
But wheres 'i' gone then?
It seems to me that this is simpler:
for(pos = 0; map[pos]; pos ++)
if(map[pos] == text[i]) break;
ptr = data + pos * 7;