X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame_em%2Fsynchro_2.c;h=c4b9a678b3e1e9dbf5ebb3302986d70c76736abf;hb=61c3da024802ecc0268bab42d7499fc0346e4fd3;hp=1ab59546bc14d613ef83c50f0916f547bb32707a;hpb=1fcb3ddbb8404effdcfa5ebbd53d3ff5009260f6;p=rocksndiamonds.git diff --git a/src/game_em/synchro_2.c b/src/game_em/synchro_2.c index 1ab59546..c4b9a678 100644 --- a/src/game_em/synchro_2.c +++ b/src/game_em/synchro_2.c @@ -43,7 +43,7 @@ void synchro_2(void) { int x = 0; int y = 1; - unsigned long random = RandomEM; + unsigned int random = RandomEM; short *cave_cache = Cave[y]; /* might be a win */ int score = 0; @@ -611,7 +611,7 @@ void synchro_2(void) Boom[y+2][x-1] = Xemerald; Boom[y+2][x] = Xemerald; Boom[y+2][x+1] = Xemerald; -#if 0 +#if PLAY_ELEMENT_SOUND play_element_sound(x, y, SAMPLE_boom, element); #endif score += lev.bug_score; @@ -637,7 +637,7 @@ void synchro_2(void) Boom[y+2][x-1] = Xblank; Boom[y+2][x] = Xblank; Boom[y+2][x+1] = Xblank; -#if 0 +#if PLAY_ELEMENT_SOUND play_element_sound(x, y, SAMPLE_boom, element); #endif score += lev.tank_score; @@ -697,7 +697,7 @@ void synchro_2(void) Boom[y+2][x-1] = lev.eater_array[lev.eater_pos][6]; Boom[y+2][x] = lev.eater_array[lev.eater_pos][7]; Boom[y+2][x+1] = lev.eater_array[lev.eater_pos][8]; -#if 0 +#if PLAY_ELEMENT_SOUND play_element_sound(x, y, SAMPLE_boom, element); #endif lev.eater_pos = (lev.eater_pos + 1) & 7; @@ -718,7 +718,7 @@ void synchro_2(void) Boom[y+2][x-1] = Xblank; Boom[y+2][x] = Xblank; Boom[y+2][x+1] = Xblank; -#if 0 +#if PLAY_ELEMENT_SOUND play_element_sound(x, y, SAMPLE_boom, element); #endif score += lev.alien_score; @@ -799,7 +799,7 @@ void synchro_2(void) Boom[y+2][x-1] = Xblank; Boom[y+2][x] = Xblank; Boom[y+2][x+1] = Xblank; -#if 0 +#if PLAY_ELEMENT_SOUND play_element_sound(x, y, SAMPLE_boom, element); #endif goto loop; @@ -2838,7 +2838,7 @@ void synchro_2(void) Boom[y+2][x-1] = Xblank; Boom[y+2][x] = Xblank; Boom[y+2][x+1] = Xblank; -#if 0 +#if PLAY_ELEMENT_SOUND play_element_sound(x, y, SAMPLE_boom, element); #endif goto loop; @@ -2863,7 +2863,7 @@ void synchro_2(void) Boom[y+2][x-1] = Xemerald; Boom[y+2][x] = Xemerald; Boom[y+2][x+1] = Xemerald; -#if 0 +#if PLAY_ELEMENT_SOUND play_element_sound(x, y, SAMPLE_boom, element); #endif score += lev.bug_score; @@ -2889,7 +2889,7 @@ void synchro_2(void) Boom[y+2][x-1] = Xblank; Boom[y+2][x] = Xblank; Boom[y+2][x+1] = Xblank; -#if 0 +#if PLAY_ELEMENT_SOUND play_element_sound(x, y, SAMPLE_boom, element); #endif score += lev.tank_score; @@ -2911,7 +2911,7 @@ void synchro_2(void) Boom[y+2][x-1] = lev.eater_array[lev.eater_pos][6]; Boom[y+2][x] = lev.eater_array[lev.eater_pos][7]; Boom[y+2][x+1] = lev.eater_array[lev.eater_pos][8]; -#if 0 +#if PLAY_ELEMENT_SOUND play_element_sound(x, y, SAMPLE_boom, element); #endif lev.eater_pos = (lev.eater_pos + 1) & 7; @@ -2932,7 +2932,7 @@ void synchro_2(void) Boom[y+2][x-1] = Xblank; Boom[y+2][x] = Xblank; Boom[y+2][x+1] = Xblank; -#if 0 +#if PLAY_ELEMENT_SOUND play_element_sound(x, y, SAMPLE_boom, element); #endif score += lev.alien_score; @@ -4189,7 +4189,7 @@ void synchro_2(void) Boom[y+1][x-1] = Xblank; Boom[y+1][x] = Xblank; Boom[y+1][x+1] = Xblank; -#if 0 +#if PLAY_ELEMENT_SOUND play_element_sound(x, y, SAMPLE_boom, element); #endif goto loop; @@ -4716,6 +4716,16 @@ void synchro_2(void) case Xacid_6: case Xacid_7: case Xacid_8: +#if 1 + Cave[y][x] = Xsand_stonesand_quickout_1; + if (Cave[y][x+1] == Xblank) + Cave[y][x+1] = Yacid_splash_eB; + if (Cave[y][x-1] == Xblank) + Cave[y][x-1] = Yacid_splash_wB; + Next[y][x] = Xsand_stonesand_quickout_2; + play_element_sound(x, y, SAMPLE_acid, Xacid_1); + goto loop; +#else Cave[y][x] = Xsand_stonesand_3; if (Cave[y][x+1] == Xblank) Cave[y][x+1] = Yacid_splash_eB; @@ -4724,15 +4734,24 @@ void synchro_2(void) Next[y][x] = Xsand_stonesand_4; play_element_sound(x, y, SAMPLE_acid, Xacid_1); goto loop; +#endif case Xblank: case Yacid_splash_eB: case Yacid_splash_wB: +#if 1 + Cave[y][x] = Xsand_stonesand_quickout_1; + Cave[y+1][x] = Xsand_stoneout_1; + Next[y][x] = Xsand_stonesand_quickout_2; + Next[y+1][x] = Xsand_stoneout_2; + goto loop; +#else Cave[y][x] = Xsand_stonesand_3; Cave[y+1][x] = Xsand_stoneout_1; Next[y][x] = Xsand_stonesand_4; Next[y+1][x] = Xsand_stoneout_2; goto loop; +#endif case Xsand: Cave[y][x] = Xsand_stonesand_1; @@ -4777,6 +4796,16 @@ void synchro_2(void) Next[y][x] = Xsand; goto loop; +#if 1 + case Xsand_stonesand_quickout_1: + Next[y][x] = Xsand_stonesand_quickout_2; + goto loop; + + case Xsand_stonesand_quickout_2: + Next[y][x] = Xsand; + goto loop; +#endif + case Xsand_stoneout_1: Next[y][x] = Xsand_stoneout_2; goto loop; @@ -4878,7 +4907,7 @@ void synchro_2(void) Boom[y+1][x-1] = Xemerald; Boom[y+1][x] = Xemerald; Boom[y+1][x+1] = Xemerald; -#if 0 +#if PLAY_ELEMENT_SOUND play_element_sound(x, y, SAMPLE_boom, element); #endif goto loop; @@ -4897,19 +4926,22 @@ void synchro_2(void) Boom[y+1][x-1] = Xblank; Boom[y+1][x] = Xblank; Boom[y+1][x+1] = Xblank; -#if 0 +#if PLAY_ELEMENT_SOUND play_element_sound(x, y, SAMPLE_boom, element); #endif goto loop; case Xboom_android: -#if 0 +#if PLAY_ELEMENT_SOUND play_element_sound(x, y, SAMPLE_boom, Xandroid); #endif case Xboom_1: Next[y][x] = Xboom_2; -#if 1 - play_sound(x, y, SAMPLE_boom); +#if !PLAY_ELEMENT_SOUND + if (x != lev.exit_x && y != lev.exit_y) + play_sound(x, y, SAMPLE_boom); + else + lev.exit_x = lev.exit_y = -1; #endif goto loop;