From 93d65ee50873436abdff92b776dfcee4936d77dc Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Tue, 27 Aug 2024 23:29:33 +0200 Subject: [PATCH] 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. --- src/game_bd/bd_caveset.c | 3 --- src/game_bd/bd_gameplay.c | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) 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); -- 2.34.1