Began redoing a lot of loop.c, creating a structure to represent a "view" for each panel. Made many functions take a void* parameter for their view-specific structure to allow generic function pointers to those functions. These views are wrapped into a loop_data_t structure (an instance of which is declared in main()), and are dynamically added. main() is responsible for (indirectly) allocating and freeing this structure.
The functions that take a void* parameter usually do this to avoid many cumbersome casts:
void func(void *vdata, ...) {
struct whatever_t *data = vdata;
While this code compiles and runs, there is still a very large amount of it that needs modifiying to fit this new scheme.
Made the SDL_gfx font code create text with completely transparent backgrounds through a call to SDL_SetColorKey(). This involves creating an opaque image, picking a unique background colour, blitting the text to the image, and then using the background colour as the transparent colour. It's a bit inefficient, but it works.
Made listbox contents wrap properly horizontally, which was really very simple (only gui.c line 385 was changed).
Modified error.c slightly, mainly to get rid of unused code and unused parameters.
Fixed two memory leaks: one in gui.c and another in settings.c.
Fixed the memcheck Makefile target, which used to print a very long comment.
17 files changed: