--- nuclearchess-1.0.0.old/src/gui.c +++ nuclearchess-1.0.0/src/gui.c @@ -1047,6 +1047,7 @@ int pos_x, pos_y; int schlagende_figur = abs(brett[zug->von_x + 8*zug->von_y]); int i; + int boom_state = 0; // altes Brett sichern for (i=0; i<64; i++) { @@ -1112,7 +1113,12 @@ int vol = quake_max-abs(pos_x - zug->nach_x)-abs(pos_y - zug->nach_y); if (vol < 0) vol = 0; - // male Untergrund + // male Untergrund + + if ((vol > 0) && (boom_state == 0)) + { + boom_state = 1; + } // male Figuren if (figur != 0) { @@ -1144,8 +1150,14 @@ } get_delta_t(); Update(); + + if (boom_state == 1) + { +system ("__META_BINDIR__/aplay __META_PREFIX__/misc/explosion.wav"); +boom_state = 2; + } } - + for (x=-1; x<=1; x++) { for (y=-1; y<=1; y++) { int feld_x = zug->nach_x + x;