I am using GM:S 1.4, which does not have functions. I can change your code into script-like, but just to be sure: I shall change the "draw_flush()", and calling the new scipt I shall set the "quads" equal to
(image_xscale + image_yscale + image_xscale*image_yscale)*2
for blocks and walls?