(Glide2GL) (Glitch64) converted from C++ to C99