X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Fgame.c;h=3d2f055f27c88415dccb499d83d65932ad8a5f1e;hp=09dc63fd73f158752a22eee66a69ac7ddeb717d1;hb=567cfcb396e3fc031a25362b747dd0a5a096b4ec;hpb=97f6d75262c34ef6ec0facdf76dbbeb51f53f804 diff --git a/src/game.c b/src/game.c index 09dc63fd..3d2f055f 100644 --- a/src/game.c +++ b/src/game.c @@ -4037,13 +4037,24 @@ void InitGame() SaveEngineSnapshotToListInitial(); } -void UpdateEngineValues(int actual_scroll_x, int actual_scroll_y) +void UpdateEngineValues(int actual_scroll_x, int actual_scroll_y, + int actual_player_x, int actual_player_y) { /* this is used for non-R'n'D game engines to update certain engine values */ + if (level.game_engine_type == GAME_ENGINE_TYPE_EM) + { + actual_player_x = correctLevelPosX_EM(actual_player_x); + actual_player_y = correctLevelPosY_EM(actual_player_y); + } + /* needed to determine if sounds are played within the visible screen area */ scroll_x = actual_scroll_x; scroll_y = actual_scroll_y; + + /* needed to get player position for "follow finger" playing input method */ + local_player->jx = actual_player_x; + local_player->jy = actual_player_y; } void InitMovDir(int x, int y)