Finally got my spritefont to work properly.
Before, I simply had an array of 223 characters, drawing each texture separately. Now I've optimized it further by including all characters into one single texture. I've also contained all the info I need about each character into a struct, which is much better than having 5-6 separate arrays of 223 integers/floats.Next up is getting my load-routine to work properly, using a thread.
Programming Thousands of Hamsters #5
Looks great!
A struct huh? I've never even used those since I went straight to using classes.Structs are pretty cool. You basically already know how to use it if you know how to use a class. A struct is like a class without any functions, just members.
Actually a struct is semantically almost identical to a class, the *only* difference is the default access specifier (being private for classes and public for structs).
E.g. the following two are identical.Oh. So structs can have functions also? The more you know…
…I honestly didn't know they could have constructors…
Can they have destructors too?Sure. Again, structs and classes are identical, except for the default access specifier :P
But it's kind of a convention I think (don't quote me on this) to use structs mostly for packed data elements, like Mordi is using them.What about inheritance and shit?
Hey rob, why haven't we seen you on teamspeak? We miss you.