Fixed buffer overrun for fps_text, fixed warnings, added c99.