projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added setup option for using "player is pushing" graphics in BD engine
[rocksndiamonds.git]
/
src
/
game_bd
/
bd_gameplay.c
diff --git
a/src/game_bd/bd_gameplay.c
b/src/game_bd/bd_gameplay.c
index 6588fd8ebe452d01658574388c8d2aeddf17589a..a981c81bcf8c4037d9625b00ae89f55d81c2ce88 100644
(file)
--- a/
src/game_bd/bd_gameplay.c
+++ b/
src/game_bd/bd_gameplay.c
@@
-116,6
+116,10
@@
static void load_cave(GdGame *game)
game->cave = gd_get_prepared_cave(game->original_cave, game->level_num);
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);
if (game->cave->intermission && game->cave->intermission_instantlife)
add_bonus_life(game, FALSE);
@@
-383,7
+387,7
@@
static GdGameState gd_game_main_int(GdGame *game, boolean allow_iterate, boolean
{
for (x = 0; x < game->cave->w; x++)
{
{
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;
}
}
game->dir_buffer[y][x] = GD_MV_STILL;
}
}
@@
-567,7
+571,7
@@
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)
// 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,
+ gd_drawcave_game(game->cave, game->element_buffer, game->
last_element_buffer, game->
gfx_buffer,
game->bonus_life_flash != 0, game->animcycle, gd_no_invisible_outbox);
game->state_counter = counter_next;
game->bonus_life_flash != 0, game->animcycle, gd_no_invisible_outbox);
game->state_counter = counter_next;
@@
-605,7
+609,7
@@
void play_game_func(GdGame *game, int action)
switch (state)
{
case GD_GAME_CAVE_LOADED:
switch (state)
{
case GD_GAME_CAVE_LOADED:
- // s
elect colors, prepare drawing etc.
+ // s
croll to start position
gd_scroll_to_origin();
// fill whole screen with black - cave might be smaller than previous!
gd_scroll_to_origin();
// fill whole screen with black - cave might be smaller than previous!