From: Holger Schemel Date: Tue, 27 Aug 2024 21:29:33 +0000 (+0200) Subject: added support for scanned BD elements in editor (but not in game yet) X-Git-Tag: 4.4.0.0-test-4~286 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=93d65ee50873436abdff92b776dfcee4936d77dc;p=rocksndiamonds.git added support for scanned BD elements in editor (but not in game yet) This change still converts all scanned BD elements to their unscanned counterparts when playing a game using the BD engine, but now supports handling of scanned elements in the level editior. --- diff --git a/src/game_bd/bd_caveset.c b/src/game_bd/bd_caveset.c index 39391600..55053040 100644 --- a/src/game_bd/bd_caveset.c +++ b/src/game_bd/bd_caveset.c @@ -251,9 +251,6 @@ GdCave *gd_get_prepared_cave(const GdCave *original_cave, const int level) // initialize some cave variables (like player position) gd_cave_setup_for_game(prepared_cave); - // temporary workaround: set all elements in a cave to their non-scanned counterparts - unscan_cave(prepared_cave); - return prepared_cave; } diff --git a/src/game_bd/bd_gameplay.c b/src/game_bd/bd_gameplay.c index 629e0362..1fb424d9 100644 --- a/src/game_bd/bd_gameplay.c +++ b/src/game_bd/bd_gameplay.c @@ -140,6 +140,9 @@ static void load_cave(GdGame *game) game->cave = gd_get_prepared_cave(game->original_cave, game->level_num); + // temporary workaround: set all elements in a cave to their non-scanned counterparts + unscan_cave(game->cave); + // 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);