From: Holger Schemel Date: Mon, 10 Apr 2023 11:20:16 +0000 (+0200) Subject: fixed regression bug with bad playfield offset X-Git-Tag: 4.3.6.0~37 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=f4079668f45b499431c8bad4040eb5fd62dba6e7;p=rocksndiamonds.git 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. --- 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) {