qdsdl

[SDL Powered] qdsdl -- a set of inline C++ header files to simplify the functionality of the Simple Directmedia Layer and a few of it's expansion libraries, like SDL_net.

The idea of qdsdl is not to wrap the entire functionality of SDL. That would be a huge undertaking and kind of pointless -- the SDL functionality is pretty damn good in the first place, why reinvent it with new wrappers that you must use in a totally different way?

This is also not an add-on library to SDL. It is 100% inline. This means there are no qdsdl binaries to link in, and it does not require any libraries other than the ones you'd be using in the first place. It adds no bloat to your code, this is stuff you'd be doing anyway -- it just makes it more convenient.

Instead, qdsdl wrapper classes are interchangable with the SDL constructs they wrap. For instance, once you create a qdmutex, you can call SDL_mutexP() and SDL_mutexV() on it just like it's a SDL_Mutex *. You don't need to relearn how to use SDL from a new point of view.

The difference between a qdmutex and a SDL_Mutex * is just sensible default values and garbage collection. You don't need to explicitly create and destroy a qdmutex -- just declare one as a variable, and the qdmutex constructor calls SDL_CreateMutex() for you when it goes into scope and the destructor calls SDL_DestroyMutex() for you when it goes out of scope.

This is what the headers include so far:


Send comments, patches, ports etc to Tyler Montbriand, monttyle@heavyspace.ca.

qdsdl.zip (9K)