+void SetDrawtoField_MM(int mode)
+{
+ int full_xsize = lev_fieldx * TILESIZE_VAR;
+ int full_ysize = lev_fieldy * TILESIZE_VAR;
+
+ // distance (delta) from screen border (SX/SY) to centered level playfield
+ dSX = (full_xsize < SXSIZE ? (SXSIZE - full_xsize) / 2 : 0);
+ dSY = (full_ysize < SYSIZE ? (SYSIZE - full_ysize) / 2 : 0);
+
+ // for convenience, absolute screen position to centered level playfield
+ cSX = SX + dSX;
+ cSY = SY + dSY;
+ cSX2 = SX + dSX + 2; // including playfield border
+ cSY2 = SY + dSY + 2; // including playfield border
+
+ if (mode == DRAW_TO_BACKBUFFER)
+ {
+ cFX = FX + dSX;
+ cFY = FY + dSY;
+ }
+
+ SetTileCursorSXSY(cSX, cSY);
+}
+