added frame parameter to graphics drawing function for MM engine