Brockoly improvements.
Posted by Overkill on October 27, 2008 at 11:59 pm under UncategorizedI don’t have much time to talk today, since I have less than 10 minutes until I fail Gruedorf. So I’ll make this quick.
This week, with the help of Kael and andy, I was able to axe some godawful ugly macros from Brockoly’s software blitter code. I turned Color (which was a typedef for unsigned int before) into an inlined first-class object with methods instead of a macro function that returned a Color through bitshifts. I made blending code into an inline interface that implements SoftwareBlender, and all software drawing code on Images now uses templates. This means things should run faster or at the very least be a hell of a lot tidier.
After hearing a voice of reason from Grue, I decided that making my own data language was silly considering that there are existing ones out there that are already much better supported.
Well, kind of. I decided I’d use JSON in my map/sprite/world/tileset formats, but the existing parsers in both C and C++ are really primitive and don’t really cater to someone who wants to load and then poke at the elements. They expect you to parse as you go. And then there were a bunch that looked promising but just plain didn’t compile, or ended up having stupid library dependencies like boost.
So I’m considering writing a JSON parser for next week. Gotta go!
Tags: brockoly, gruedorf, json
Andrew G. Crowell (Overkill). I am awesome.
[
Trackback