I moved the primitive drawing calls in to the Surface class as discussed here:
https://openxcom.ninex.info/forum/index.php?topic=124.0I have added the following functions to Surface:
drawRect()
drawLine()
drawCircle()
drawPolygon()
drawTexturedPolygon()
drawString()
These functions should be used instead of directly calling SDL_gfx functions. Let me know if there is anything I have missed. See attached patch.