some gmdraw.c stuff