A story about an unexpected ABI break

This is the story of an unexpected ABI break that I thought would be worth documenting.

At Avalanche we use a small class wrapping 32bit hashes called CHashString, it is basically just a wrapper around uint32_t and one should be able to treat it as a uint32_t in code except for operations that do not make sense on a hash-value.

Why would you want a class like this you might ask, well we use it for adding a const char* c_str()-function that can be used in logging and also we use it to add custom natvis-support in visual studio so that you can just hover a CHashString and have a lookup of the hash-value performed.

Read More

Builtin resources and the resource-system

I have written, in passing, about the resource-system and VFS ( Virtual File System ) I use in my own game-engine. This time it will however not be “in passing” but will dig down a bit deeper into one “feature” in it that I find kind of neat. I’m sure it has been done before but I have not seen it myself somewhere else. I’ll be writing about how I handle builtin resources in the engine.

Read More

utf8_lookup, a write up.

I saw this blog post a while ago A Programmer’s Introduction to Unicode, a really great write up that is a worth a read for anyone interested in the subject! So go ahead and read that now even as it might not be super important for what I am about to write about here :)

Reading this reminded me of an old project of mine that I think is a bit novel and deserves, at least, a write up. I am talking about utf8_lookup, a small lib to translate utf8 chars into offsets into a table.

Read More