Here you go!

dowload

I've taken the liberty of including two scripts: draw_obj.c and bmap_rendertarget.c

I venture to say that both behaviors are related.

Salud!