From: Holger Schemel Date: Thu, 28 May 2020 15:35:22 +0000 (+0200) Subject: added correcting playfield scroll position for EM engine X-Git-Tag: 4.2.0.0~29 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=8bf81088836952a4f0263281560ef2127435e4b2;p=rocksndiamonds.git added correcting playfield scroll position for EM engine --- diff --git a/src/game.c b/src/game.c index 08b787fd..f4ae9303 100644 --- a/src/game.c +++ b/src/game.c @@ -4396,6 +4396,9 @@ void UpdateEngineValues(int actual_scroll_x, int actual_scroll_y, if (level.game_engine_type == GAME_ENGINE_TYPE_EM) { + actual_scroll_x = correctLevelPosX_EM(actual_scroll_x); + actual_scroll_y = correctLevelPosY_EM(actual_scroll_y); + actual_player_x = correctLevelPosX_EM(actual_player_x); actual_player_y = correctLevelPosY_EM(actual_player_y); } diff --git a/src/tools.c b/src/tools.c index 2bc7d4fe..70441d1c 100644 --- a/src/tools.c +++ b/src/tools.c @@ -291,8 +291,6 @@ static int getLevelFromScreenX_EM(int sx) int px = sx - SX; int lx = LEVELX((px + dx) / TILESIZE_VAR); - lx = correctLevelPosX_EM(lx); - return lx; } @@ -308,8 +306,6 @@ static int getLevelFromScreenY_EM(int sy) int py = sy - SY; int ly = LEVELY((py + dy) / TILESIZE_VAR); - ly = correctLevelPosY_EM(ly); - return ly; }