Xiqual
- What is it?
A collection of libraries that help me writing SDL programs, and also do many other things.
- What's in it?
- Several sub-libraries:
- xitools
This is the core library. All the other sub-libraries require this to some extent, particularly for linked lists and all the related manipulation, but sometimes also for file-handling.
If you need to read some configuration files, the cfg_* functions will do most of what you need. Hooks are supported to do your own processing of each variable, although this bit needs some more documentation.
The iff_* functions help you create EA-IFF85 style files. It's a simple standard for binary data, with some requirements that make them useful for portable data. The basic FORM types can be used for pretty much any purpose. You may know these filetypes from the Amiga platform.
Taglists also have some utility functions. If you want to avoid changing the interface every time you feel a new option should be supported, this is the way to do it. Using varargs, you can make your API permanent, only adding more tags for new features. Highly recommended for plugin interfaces and dynamic libraries. If only the Gtk+ developers used tags..
MD5 calculation has been grabbed off the 'net, with one additional function by me to create a printable string.
The string tokeniser in Linux' C library, strtok(), is pretty daft. Even the more recent strtok_r() isn't very good, as it's not very portable. They both have many bugs, so I had to write a new one. Use str_tokenise() to create a list of tokens more portably. Unlike strtok(), it should be thread-safe.
- xigfx
You'll find the initialisation functions here. xi_init(), xi_main() and xi_quit() are the important calls. Utility functions for graphics are here, too - views and tilesets are the only really evolved ones included. A map loader, displayer and scroller is in the works, using tilesets as a foundation.
- xicgi
I started writing some utility functions for CGI creation, and couldn't find a better place to put them. If there are other pervs out there who like to write everything in C, this could be useful. Cookies are supported, too.
- xinet
This sub-library only has a server-toolkit for now. It can create select-servers (non-threaded servers). Mostly untested; works well locally, but needs larger scale testing.
- xithings
Various functions to handle objects, things, thingamajigs. You know, players, monsters, inventory objects, magic, whatever. Scripting support will somehow be integrated into this later.
- What's needed to use and compile it?
Development is happening under Linux, as is fashionable these days. Several of the libraries have compiled nicely on many common Unix- like platforms, even without GNU cc. Unless there is a MacOS X port of SDL, that probably won't work, but the other parts worked on the SourceForge compile farm.
Recommended setup
Unix-derivative OS with SDL (http://libsdl.org), SDL_image, SDL_mixer and SDL_ttf, at least the GNU C compiler and proper headers, plus GDB. DDD is a nice frontend, and Valgrind has helped me squash many memory bugs. A profiler would be a nice addition, but you'll be distracted by the lack of optimisation in Xiqual itself.
- What about Win32?
A set of Visual C++ 5.x project files are in the VC5/ directory. Still no luck actually linking programs with MingW32 (Linux hosted).
- Right..and C++?
Much better support there. No Xiqual wrapper class has been written, but it should link. C links with nearly anything. The headers have definitions to ensure C++ compatibility, thanks to Mr.O'Neill.
- What's the license?
LGPL. See the file of the same name. If you find any code of use to you, feel free to simply use the sourcefile and related headers. Just abide by the LICENSE and all is well. If you think I'm doing anything uncool, let me know.
- You mentioned SDL..what the heck is that?
Simple Directmedia Library. The name gives some indication what it is..basically, it's a canvas for portable graphics programming. It supplies the basic functions to create a 2D-display (and also OpenGL with recent versions) and handle input from keyboard, mouse and other controllers, timers, sound and threads (on some platforms), plus even CD-ROM access. All this works in Win32, Linux and MacOS, plus a lot of Unix-derivatives.
SDL has been used to port many games to Linux, and I'd recommend it for input handling with OpenGL. For 2D programming, it has blitting functions, image loading (extended a lot with SDL_image) and all sorts of low-level screen manipulation. But it is merely a canvas; you need to supply the drawing tools. Read up on Bresenham's algorithm ;)
Get SDL from http://libsdl.org, and grab SDL_image, SDL_mixer and SDL_ttf while you're at it.
- What does the name mean?
It's Ouranian-Barbaric for "manifest". It's a verb.
- How do I pronounce it?
How would you like to pronounce it?
Clumsily written in one of the headers.. Note the funny way DOC++ mangles this document ;)