GtkAlleg demonstrates very simply how to use the GTK+ and Allegro libraries together in the same program. An obvious use is a map editor for an Allegro based game.

[ screen shot ]


I thought about writing a tutorial based around the code, but decided that the mountains of comments were enough. If you are unsure of anything, just ask.

Note: These are my first GTK+ programs using the C API. If you have suggestions on how to improve them or if I am using GTK+ incorrectly, let me know.

Maciek Fijalkowski also sent me gtkhelp.c (3.7k) which may be of interest. It handles multiple bitmaps and drawables, and also handles cases where the sizes mismatch.

Note: All the stuff above refers to GTK+ 1.2. For people who stay up to date with software, Grzegorz Adam Hankiewicz did something similar for GTK+ 2.0.

Go back

Back to Psyk Software homepage.