added sound consistency check for native BD engine
[rocksndiamonds.git] / src / game_bd / bd_sound.c
index e4f0281fb7634552e257917a4dd46382498ad347..13edc0d92a4c10d8204bd8b69183086a18b6a4d1 100644 (file)
@@ -269,6 +269,10 @@ void gd_sound_init(void)
 {
   int i;
 
+  for (i = 0; i < GD_S_MAX; i++)
+    if (sound_flags[i].sound != i)
+      Fail("sound db index mismatch: %d", i);
+
   for (i = 0; i < MAX_CHANNELS; i++)
     snd_playing[i] = GD_S_NONE;
 }