moved functions for correcting playfield buffer position to EM engine
[rocksndiamonds.git] / src / game.c
index 4f7f613787a791e589a81ae3c838ea8920d300f4..08b787fdc83c4f489ddf25ad467ad780825c5347 100644 (file)
@@ -14858,9 +14858,12 @@ static void PlayLevelMusic(void)
 void PlayLevelSound_EM(int xx, int yy, int element_em, int sample)
 {
   int element = (element_em > -1 ? map_element_EM_to_RND_game(element_em) : 0);
-  int offset = (BorderElement == EL_STEELWALL ? 1 : 0);
-  int x = xx - 1 - offset;
-  int y = yy - 1 - offset;
+  int offset = 0;
+  int x = xx - offset;
+  int y = yy - offset;
+
+  x = correctLevelPosX_EM(x);
+  y = correctLevelPosY_EM(y);
 
   switch (sample)
   {