28 Aug 2003 zx64   » (Journeyer)

Well, after University kicked in I got distracted from this (and other things). Got elected as secretary for the Uni's CompSoc and AnimeSoc which was nice. More recently, I attended the Debian 10th Birthday party in Cambridge.

Bleeh, FreeCNC 0.2.1 still not out. There are a bunch of annoying bugs and design issues (the current code for animating things is a little crufty and is a bitch to debug) that need fixing and I've been preoccupied with both exams last June and preparing for next year at Uni. I'm still rather pleased with the guy who sent in a patch that contained a mostly complete ratemplates.ini so Red Alert maps now load a lot more correctly than before.

On the way to the party in Cambridge I did some mildly crazy stuff to cut out the overhead involved in parsing large ini files that don't change that often by "serialising" the data structure as a .so by emitting C code that was then wrapped inside some boilerplate routines to handle all the library stuff (such as initialising the hash table inside _init and freeing it in _fini). This turned into an interesting learning experience with glib2 (a library I previously hadn't written anything with): I didn't have the API docs installed, so I picked things up by reading the header files (and found gems like g_blow_chunks). The library stuff is done, I "just" have to write the emitter and see what whacky stuff I can do with make so you'd just dump an ini file (e.g. foo.ini) in the right directory and run "make foo.ini" to get your library.
Regardless of whether it has any practical use, it was a fun way to spend about four hours :).

My next mini-project is to extend the ini-file format to support inheritance. This would actually be of use in FreeCNC as there is quite a large intersection between the ini files used for Tiberium Dawn and for Red Alert (which I haven't yet explicitly written because e.g. "raunits.ini" would have a lot from "units.ini" [i.e. data duplication]).
XML is more or less out of the question as ini files are sufficient anyway (this is just me being anal about data duplication) and ini files were what were used by Westwood in their games (so mods can be ported quicker).

Also, if you write C++ that uses the STL, you probably will appreciate StlFilt.

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!