moved correcting playfield buffer sound position to EM engine
[rocksndiamonds.git] / src / game_em / init.c
index d08d8db1cd2ac7dd26fd3bca9fa4b494c15367d2..0486f87b295fcf7a075b4ecc68bf881eda809f40 100644 (file)
@@ -63,7 +63,7 @@ void em_close_all(void)
 
 void play_element_sound(int x, int y, int sample, int element)
 {
-  PlayLevelSound_EM(x, y, element, sample);
+  PlayLevelSound_EM(CAVE_POS_X(x), CAVE_POS_Y(y), element, sample);
 }
 
 void play_sound(int x, int y, int sample)
@@ -71,6 +71,20 @@ void play_sound(int x, int y, int sample)
   play_element_sound(x, y, sample, -1);
 }
 
+int correctLevelPosX_EM(int lx)
+{
+  lx -= lev.left;
+
+  return lx;
+}
+
+int correctLevelPosY_EM(int ly)
+{
+  ly -= lev.top;
+
+  return ly;
+}
+
 unsigned int InitEngineRandom_EM(int seed)
 {
   if (seed == NEW_RANDOMIZE)