X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame_em%2Fconvert.c;h=5c5e79befbbfdb6fba3203b0cd79e8e6b1a5a46e;hb=6eaf8f1f31cd229a7315063f4434389d00aa5cff;hp=5091480478d027682383987f493939c824cfccb3;hpb=e1015ff65ebebc0362ba23172acef6f35dc69f51;p=rocksndiamonds.git diff --git a/src/game_em/convert.c b/src/game_em/convert.c index 50914804..5c5e79be 100644 --- a/src/game_em/convert.c +++ b/src/game_em/convert.c @@ -53,6 +53,8 @@ static const short map[CAVE_TILE_MAX] = [Cbomb] = Xbomb, [Cnut] = Xnut, [Cspring] = Xspring, + [Cspring_e] = Xspring_e, + [Cspring_w] = Xspring_w, [Cpush_emerald_e] = Xpush_emerald_e, [Cpush_emerald_w] = Xpush_emerald_w, [Cpush_diamond_e] = Xpush_diamond_e, @@ -376,9 +378,9 @@ void prepare_em_level(void) for (i = 0; i < GAME_TILE_MAX; i++) lev.android_array[i] = map[cav.android_array[i]]; - /* determine number of players in this level */ lev.home_initial = 0; + /* check for players in this level */ for (i = 0; i < MAX_PLAYERS; i++) { ply[i].exists = FALSE; @@ -401,24 +403,30 @@ void prepare_em_level(void) lev.home = lev.home_initial; players_left = lev.home_initial; + /* assign active players */ for (i = 0; i < MAX_PLAYERS; i++) { - if (ply[i].exists) + if (ply[i].exists && isActivePlayer_EM(i)) { if (players_left) { ply[i].alive = TRUE; players_left--; } - else - { - int x = cav.player_x[i]; - int y = cav.player_y[i]; + } + } - lev.cave[lev.left + x][lev.top + y] = Xblank; - lev.next[lev.left + x][lev.top + y] = Xblank; - lev.draw[lev.left + x][lev.top + y] = Xblank; - } + /* remove inactive players */ + for (i = 0; i < MAX_PLAYERS; i++) + { + if (ply[i].exists && !ply[i].alive) + { + int x = cav.player_x[i]; + int y = cav.player_y[i]; + + lev.cave[lev.left + x][lev.top + y] = Xblank; + lev.next[lev.left + x][lev.top + y] = Xblank; + lev.draw[lev.left + x][lev.top + y] = Xblank; } } @@ -453,6 +461,8 @@ void prepare_em_level(void) // - game_em.use_single_button (default: TRUE) // - game_em.use_snap_key_bug (default: FALSE) // - game_em.use_old_explosions (default: FALSE) + // - game_em.use_old_android (default: FALSE) + // - game_em.use_wrap_around (default: TRUE) game_em.level_solved = FALSE; game_em.game_over = FALSE;