From f4079668f45b499431c8bad4040eb5fd62dba6e7 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Mon, 10 Apr 2023 13:20:16 +0200 Subject: [PATCH] fixed regression bug with bad playfield offset This reverts commit a35cd127. The bug introduced by the above commit was caused by a wrong comment indicating that a certain offset was related to the playfield border, which was wrong. In fact, this offset is related to the width of the laser beam (to store the middle position of the tile the laser beam touches, to be able to draw a variable-width laser beam later with a size that is relative to the middle of the tile). As the laser beam currently has a width of 4 pixels, this value has to be set to 2 here. --- src/game_mm/mm_tools.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/game_mm/mm_tools.c b/src/game_mm/mm_tools.c index 38ff7431..48c99912 100644 --- a/src/game_mm/mm_tools.c +++ b/src/game_mm/mm_tools.c @@ -29,8 +29,8 @@ void SetDrawtoField_MM(int mode) // for convenience, absolute screen position to centered level playfield cSX = SX + dSX; cSY = SY + dSY; - cSX2 = SX + dSX + (SX - REAL_SX); // including playfield border - cSY2 = SY + dSY + (SY - REAL_SY); // including playfield border + cSX2 = SX + dSX + 2; // including half laser line size + cSY2 = SY + dSY + 2; // including half laser line size if (mode == DRAW_TO_BACKBUFFER) { -- 2.34.1