X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame_em%2Fsynchro_3.c;h=8ec410d34eb61f6b842ab19cece7c90e1c3b312e;hb=a4c71d580965e41a96f02d4014357a941eeef2fb;hp=307d285ebfa6794efa687a1efe477ddd53ca419a;hpb=3ff2e8a0b5c27b99a9920bdf5ed82bc41bf40181;p=rocksndiamonds.git diff --git a/src/game_em/synchro_3.c b/src/game_em/synchro_3.c index 307d285e..8ec410d3 100644 --- a/src/game_em/synchro_3.c +++ b/src/game_em/synchro_3.c @@ -13,7 +13,7 @@ void synchro_3(void) int x; int y; int count; - unsigned long random; + unsigned int random; /* update variables */ @@ -39,7 +39,7 @@ void synchro_3(void) lev.wonderwall_time--; if (lev.wheel_cnt) - play_element_sound(lev.wheel_x, lev.wheel_y, SAMPLE_wheel, Xwheel); + play_element_sound(lev.wheel_x, lev.wheel_y, SOUND_wheel, Xwheel); /* grow amoeba */ @@ -49,21 +49,21 @@ void synchro_3(void) { x = (random >> 10) % (WIDTH - 2); y = (random >> 20) % (HEIGHT - 2); - switch (Cave[y][x]) + switch (Cave[x][y]) { case Xblank: - case Yacid_splash_eB: - case Yacid_splash_wB: + case Xacid_splash_e: + case Xacid_splash_w: case Xgrass: case Xdirt: case Xsand: case Xplant: case Yplant: - if (tab_amoeba[Cave[y-1][x]] || - tab_amoeba[Cave[y][x+1]] || - tab_amoeba[Cave[y+1][x]] || - tab_amoeba[Cave[y][x-1]]) - Cave[y][x] = Xdrip_eat; + if (tab_amoeba[Cave[x][y-1]] || + tab_amoeba[Cave[x+1][y]] || + tab_amoeba[Cave[x][y+1]] || + tab_amoeba[Cave[x-1][y]]) + Cave[x][y] = Xdrip; } random = random * 129 + 1; @@ -76,30 +76,30 @@ void synchro_3(void) for (y = 1; y < HEIGHT - 1; y++) for (x = 1; x < WIDTH - 1; x++) { - switch (Cave[y][x]) + switch (Cave[x][y]) { case Znormal: - Cave[y][x] = Xboom_1; - Cave[y-1][x] = tab_explode_normal[Cave[y-1][x]]; - Cave[y][x-1] = tab_explode_normal[Cave[y][x-1]]; - Cave[y][x+1] = tab_explode_normal[Cave[y][x+1]]; - Cave[y+1][x] = tab_explode_normal[Cave[y+1][x]]; - Cave[y-1][x-1] = tab_explode_normal[Cave[y-1][x-1]]; - Cave[y-1][x+1] = tab_explode_normal[Cave[y-1][x+1]]; - Cave[y+1][x-1] = tab_explode_normal[Cave[y+1][x-1]]; - Cave[y+1][x+1] = tab_explode_normal[Cave[y+1][x+1]]; + Cave[x][y] = Xboom_1; + Cave[x][y-1] = tab_explode_normal[Cave[x][y-1]]; + Cave[x-1][y] = tab_explode_normal[Cave[x-1][y]]; + Cave[x+1][y] = tab_explode_normal[Cave[x+1][y]]; + Cave[x][y+1] = tab_explode_normal[Cave[x][y+1]]; + Cave[x-1][y-1] = tab_explode_normal[Cave[x-1][y-1]]; + Cave[x+1][y-1] = tab_explode_normal[Cave[x+1][y-1]]; + Cave[x-1][y+1] = tab_explode_normal[Cave[x-1][y+1]]; + Cave[x+1][y+1] = tab_explode_normal[Cave[x+1][y+1]]; break; case Zdynamite: - Cave[y][x] = Xboom_1; - Cave[y-1][x] = tab_explode_dynamite[Cave[y-1][x]]; - Cave[y][x-1] = tab_explode_dynamite[Cave[y][x-1]]; - Cave[y][x+1] = tab_explode_dynamite[Cave[y][x+1]]; - Cave[y+1][x] = tab_explode_dynamite[Cave[y+1][x]]; - Cave[y-1][x-1] = tab_explode_dynamite[Cave[y-1][x-1]]; - Cave[y-1][x+1] = tab_explode_dynamite[Cave[y-1][x+1]]; - Cave[y+1][x-1] = tab_explode_dynamite[Cave[y+1][x-1]]; - Cave[y+1][x+1] = tab_explode_dynamite[Cave[y+1][x+1]]; + Cave[x][y] = Xboom_1; + Cave[x][y-1] = tab_explode_dynamite[Cave[x][y-1]]; + Cave[x-1][y] = tab_explode_dynamite[Cave[x-1][y]]; + Cave[x+1][y] = tab_explode_dynamite[Cave[x+1][y]]; + Cave[x][y+1] = tab_explode_dynamite[Cave[x][y+1]]; + Cave[x-1][y-1] = tab_explode_dynamite[Cave[x-1][y-1]]; + Cave[x+1][y-1] = tab_explode_dynamite[Cave[x+1][y-1]]; + Cave[x-1][y+1] = tab_explode_dynamite[Cave[x-1][y+1]]; + Cave[x+1][y+1] = tab_explode_dynamite[Cave[x+1][y+1]]; break; } } @@ -108,5 +108,5 @@ void synchro_3(void) for (y = 0; y < HEIGHT; y++) for (x = 0; x < WIDTH; x++) - Next[y][x] = Cave[y][x]; + Next[x][y] = Cave[x][y]; }