Allegro

Allegro is a game programming library, containing functions for graphics, sound, input etc. it is free - giftware and cross-platform, running under dos, windows, linux etc. On its homepage you can download source. The project is also hosted on sourceforge. Various people have written great games using this library, there is a website dedicated to gaming using allegro some games being free, some not.