Hi!
First off, I'd like to say that we need a forum for non-language specific coding, or a maths section, or both. C# questions shouldn't be posted in this forum, but C# very similiar to C/C++ so I'll post it here anyway.
Anyway, I've been trying to code a demo in C# for the past few days, and I haven't even gotten the scroller to work properly. In Blitz LoadAnimImage() loads the font into frames and everything is solved, though in languages that don't do that for you, it's harder. The problem is that it draws the letters, but instead of "test" it shows "qxyb" or something along those lines. I won't post a lot of code since this is a maths related issue, but here's some code:
new Rect( ((ascii) - ((row-1) * 9)) * 54,
(row) * 44,
(((ascii) - ((row-1) * 9)) * 54) + 54,
((row) * 44) + 44 ) )I can explain how the maths is supposed to work:
x1: Since we want to x position of the letter to draw, we take the ascii code (The position of the letter), and subtract the number of letters on the rows above (row-1) * 9. We multiply it with nine since there are 9 letters on each row, and 9*row would equal the number of letters on the previous rows.
y1: Nothing complicated, we take the row multiplied with 44 to get the y coordinate.
x2: The same as x1, except that we add 54 pixels so that the rect width doesn't become 0.
y2: Same principle as x2.
The above code is in a for loop which loops through every letter in the string to be drawn. There are two variables, ascii is the ascii code of the letter, subtracted by 32 since the font starts with "!". Row is the row number of the letter in the font. The Rect constructor takes x1,y1,x2,y2 respectively, and the font letter size is 54x44. It might be interesting to see the font:

It would be great if anyone could help me out here,
Phoenix



