X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame_bd%2Fbd_gameplay.c;h=12eb53bcca2ba1c7e8699e3af954f96907e75c33;hb=edaa850fd2d2cae7ec31961fae3d56487e710c71;hp=6588fd8ebe452d01658574388c8d2aeddf17589a;hpb=93a37840d8ff4a84fc878f148e3abfeecb701821;p=rocksndiamonds.git diff --git a/src/game_bd/bd_gameplay.c b/src/game_bd/bd_gameplay.c index 6588fd8e..12eb53bc 100644 --- a/src/game_bd/bd_gameplay.c +++ b/src/game_bd/bd_gameplay.c @@ -17,10 +17,6 @@ #include "main_bd.h" -// universal settings -static boolean gd_no_invisible_outbox = FALSE; - - void gd_game_free(GdGame *game) { // stop sounds @@ -116,6 +112,10 @@ static void load_cave(GdGame *game) game->cave = gd_get_prepared_cave(game->original_cave, game->level_num); + // if requested, recolor cave (cave is a copy only, so no worries) + if (setup.bd_random_colors) + gd_cave_set_random_colors(game->cave, setup.bd_default_color_type); + if (game->cave->intermission && game->cave->intermission_instantlife) add_bonus_life(game, FALSE); @@ -383,7 +383,7 @@ static GdGameState gd_game_main_int(GdGame *game, boolean allow_iterate, boolean { for (x = 0; x < game->cave->w; x++) { - game->last_element_buffer[y][x] = game->element_buffer[y][x]; + game->last_element_buffer[y][x] = game->element_buffer[y][x] & ~SKIPPED; game->dir_buffer[y][x] = GD_MV_STILL; } } @@ -567,8 +567,8 @@ static GdGameState gd_game_main_int(GdGame *game, boolean allow_iterate, boolean // always render the cave to the gfx buffer; // however it may do nothing if animcycle was not changed. if (game->element_buffer && game->gfx_buffer) - gd_drawcave_game(game->cave, game->element_buffer, game->gfx_buffer, - game->bonus_life_flash != 0, game->animcycle, gd_no_invisible_outbox); + gd_drawcave_game(game->cave, game->element_buffer, game->last_element_buffer, game->gfx_buffer, + game->bonus_life_flash != 0, game->animcycle, setup.bd_show_invisible_outbox); game->state_counter = counter_next; @@ -599,13 +599,13 @@ void play_game_func(GdGame *game, int action) game->player_fire = fire; // tell the interrupt "20ms has passed" - state = gd_game_main_int(game, !game->out_of_window, gd_keystate[SDL_SCANCODE_F]); + state = gd_game_main_int(game, !game->out_of_window, FALSE); // state of game, returned by gd_game_main_int switch (state) { case GD_GAME_CAVE_LOADED: - // select colors, prepare drawing etc. + // scroll to start position gd_scroll_to_origin(); // fill whole screen with black - cave might be smaller than previous!