Crappy code from a 1999 demo.