Implemented most of the main loop in main.c. Game now seems to run OK. Need to write texture code and then add OpenGL.