Xiqual 0.9.1 review

Download
by rbytes.net on

Xiqual started out as a library of functions to make 2D games, with the goal of having at least some sprite functionality and tile ma

License: LGPL (GNU Lesser General Public License)
File size: 0K
Developer: EvilIdler
0 stars award from rbytes.net

Xiqual started out as a library of functions to make 2D games, with the goal of having at least some sprite functionality and tile map routines, plus a smattering of utility functions.

It has since started to grow a bit beyond that, with the addition of CGI and net libraries and even an SDL GUI system making decent progress (bar some total redesigns).

Here are some key features of "Xiqual":
Linked list handling, and circular lists
INI-style file read & write (preferences with variable handling)
IFF FORM read & write (datafiles with binary data, fast lookup)
Simple XML parser (no serious manipulation yet)
Amiga-style taglist functions (used by many subsystems)
Extra string functions (some due to Win32 lacking good ones)
Thing-functions for game objects (game logic)
Full-featured CGI library with cookie support
MD5 sum functions (from the fastest PD sources I could find)
'views' - small fields with background storage (sprites, mousecursors etc.)
Server library for select() servers (handle many clients without threading/forking)
SDL startup code (pass some tags, have graphics ready, and audio if SDL_mixer support is compiled in)


With the basic release, you can get started on Linux, FreeBSD and a few other Unix-like operating systems, provided you have SDL and SDL_image installed. The CGI and tool libraries have compiled successfully and been tested on both big- and little-endian CPUs. libxicgi and libxitools will both compile out of the box on nearly any architecture.

You need a working C compiler, as ANSI compliant as possible. The one shipped with Solaris/SunOS has worked before; your favour with the gods may influence your luck.

To use the SDL parts, both libSDL and libSDL_image are needed. There's no way around it, unless you want to remove some image support. Personally, I think Windows BMP files are a crock of shite, as they're largely distributed in an uncompressed format. Stick to PNG, which has some compression (non-lossy), or JPEG, which will be around 2-3 times as good, at slight loss of quality.

SDL_mixer and SDL_ttf are also supported in the startup-code.

SDL's homepage is http://libsdl.org. If you are using Debian, there is a package for every major SDL component, including SDL_net and SDL_mixer. I personally recommend getting a source for each if you are on Sid, though. Again, this depends on whether you've given tribute to the loas.

Functions:

bt_new Create a new LUI button.
cfg_findnext Find a named section starting at a specific section.
cfg_findsection Find a named section in a list.
cfg_findvar Find a variable in a prefs section.
cfg_freesection Free a preferences section and its variables.
cfg_freevar Free a variable and its strings.
cfg_isbool Internal function for cfg_loadprefs().
cfg_loadprefs Load preferences from an INI-style file.
cfg_newsection Allocate a new preferences section.
cfg_saveprefs Save a List of preferences sections to file.
crc32_calc Checksum a buffer of 8-byte characters.
crc32_update Update a CRC32 checksum.
file_getsize Stand-alone routine to get a file's size.
hash_merge Merge any number of hash tables.
hash_newfromlist Turn a struct List into a struct HashTable.
iarea_check Checks an inputarea against cursor position and controller buttons.
iarea_free Free an inputarea.
iarea_new Create a new inputarea.
iff_close Closes an IFF.
iff_correctchunk Correct and pad odd-sized IFF chunks.
iff_endchunk Finishes writing a chunk.
iff_new Creates a new IFF.
iff_newchunk Start on a new chunk in an IFF.
iff_writechunkdata Write data to an IFF where you have just started a chunk.
list_add Add a Node to a List.
list_addhead Add a Node to the top of a List.
list_delete Remove a Node from a List and free data.
list_free Free a List and all its attached Node structures.
list_getnode Return a Node at a specific index position.
list_insert Insert one Node after another given Node.
list_makecircular Make a List circular (first and last nodes point to eachother).
list_new Create a new List and set the destructor.
list_newitem Allocates a new Node structure.
list_remove Remove a Node from a List without freeing any data.
lst_new Create a new LUI list gadget.
mem_arrayget Access memory as a 1-, 2- or 3-dimensional array.
mem_arrayset Access memory as a 1-, 2- or 3-dimensional array.
msg_show Show or hide a message box.
net_addnodes Increase the maximum allowed number of clients in a SelectServer.
net_client Allocate a NetClient structure and connect to a server.
net_client_free Close and free a client structure.
net_create_server Create a new select() server.
net_free_server Release all resources related to a Xiqual select() server.
net_process Handle a select() server's incoming and outgoing data.
net_read Read an incoming xinet package.
net_server Create a new select() server.
net_server_free Release all resources related to a Xiqual select() server.
net_writeh Write an xinet packet header.
node_end Return the last Node in a circular List.
node_findbycontents Return a Node with data partially containing the entire specified string.
node_findbyname Return a Node with data containing the specified string.
node_makecircular Make a chain of nodes circular (first and last Node points to eachother).
node_start Return the first Node in a circular List.
str_getvalue Converts a string to an integer.
strfind Looks for a string within another string.
strisnum Check if a string is all numbers and whitespace.
strlower Turn a string into all-lowercase characters.
strsplit Split a variable-setting string.
strupper Turn a string into all-uppercase characters.
tag_alloclist Allocate a tag array big enough for numtags items.
tag_finditem Look for a tag identifier in a taglist, and return a pointer to the tagitem.
tag_freelist Free a tagarray previously created with tag_alloclist().
tag_getdata Find a tagitem's data by tag ID.
tag_next Get next tagitem in the array.
xi_findopt Find option and return flags.
xi_freefont Free a font when done with it.
xi_freeopts Free xiargs structure.
xi_getopts Parse command args.
xi_loadfont Load a Xiqual free-form IFF font.
xi_puttext Print text using an xifont.
xi_seterror A generic way of setting error strings.
xi_strndup Duplicate a string and return a safe buffer.
xml_addentityhook Add a hook function to handle an escaped character entity.
xml_addgenentityhook Add a generic hook function for all escaped entities.
xml_addgentaghook Add a hook that catches all unspecified tags.
xml_addprocessinghook Add a hook for a processing instruction.
xml_addtaghook Add a hook to handle a specific tag.
xml_freedoc Free an XML document.
xml_loaddoc Load an XML document and allocate an xmldoc structure.
xml_newdoc Creates an xmldoc structure from a string buffer.
xml_parse Walk through an XML document and call user-specified hooks.
xml_printesc Print escaped entities.
xml_prune Walk through an XML document and remove unnecessary nodes.
xml_savedoc Save an XML document to a file.

Macros:

MAKE_ID Quick macro to make a ulong of four characters.
XI_VARARG Macro for vararg taghandling.
XI_VOIDARG Macro for vararg taghandling.
list_nodeend Wrapper for node_end().
list_nodemakecircular Wrapper for node_makecircular().
list_nodestart Wrapper for node_start().
xi_textwidth Calculate how many pixels wide a string printed with a fixed-width xifont will be.
xit_setdefaults Set default screen and tileset

Enums, Unions, Structs:

MD5Context MD5 context for the Rivest/Plumb MD5 checksumming routines.

Typedefs:

HashNode Basic hash node.
HashTable Non-resizing hash table.
IFFHandle Handle returned by iff_new() and iff_open() calls.
List Linked list structure.
Node A simple Node.
OptNode Option node.
aspec Array specification structure
autofile Autofile structure.
gadget Generic gadget.
inputarea An inputarea for testing mouse and other controllers in specific screen coordinates.
lui_msg Message box.
preferences A preferences section.
strtoken The token structure.
tagitem A tagitem.
variable A variable.
xiargs The argument structure.
xifont Xiqual font structure.
xiglob Global structure for Xiqual's automatic handling of miscellaneous data
xiopts User-supplied structure for xi_getopts().
xitiles A tileset in-memory representation.
xiview This is a view, for use as sprites, message boxes, or anything else that might need to store the rectangle it is blitted over.
xmldoc The XML document structure.
xmltag An XML tag.

Xiqual 0.9.1 keywords