From: Holger Schemel Date: Thu, 22 Aug 2024 18:23:54 +0000 (+0200) Subject: moved code in BD engine (should not change engine functionality) X-Git-Tag: 4.4.0.0-test-4~295 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=14bd552cc3239875af4b6bdec81e2fa07397c6d0;p=rocksndiamonds.git moved code in BD engine (should not change engine functionality) --- diff --git a/src/game_bd/bd_caveengine.c b/src/game_bd/bd_caveengine.c index 6ec87a39..48f4b35f 100644 --- a/src/game_bd/bd_caveengine.c +++ b/src/game_bd/bd_caveengine.c @@ -3627,27 +3627,7 @@ void gd_cave_iterate(GdCave *cave, GdDirection player_move, boolean player_fire, // POSTPROCESSING // ============================================================================ - // another scan-like routine: - // short explosions (for example, in bd1) started with explode_2. - // internally we use explode_1; and change it to explode_2 if needed. - if (cave->short_explosions) - { - for (y = 0; y < cave->h; y++) - { - for (x = 0; x < cave->w; x++) - { - if (is_first_stage_of_explosion(cave, x, y)) - { - next(cave, x, y); // select next frame of explosion - - // forget scanned flag immediately - store(cave, x, y, get(cave, x, y) & ~SCANNED); - } - } - } - } - - // finally: forget "scanned" flags for objects. + // forget "scanned" flags for objects. // also, check for time penalties. // these is something like an effect table, but we do not really use one. for (y = 0; y < cave->h; y++) @@ -3667,6 +3647,27 @@ void gd_cave_iterate(GdCave *cave, GdDirection player_move, boolean player_fire, } } + // another scan-like routine: + // short explosions (for example, in bd1) started with explode_2. + // internally we use explode_1; and change it to explode_2 if needed. + if (cave->short_explosions) + { + for (y = 0; y < cave->h; y++) + { + for (x = 0; x < cave->w; x++) + { + if (is_first_stage_of_explosion(cave, x, y)) + { + // select next frame of explosion + next(cave, x, y); + + // forget scanned flag immediately + store(cave, x, y, get(cave, x, y) & ~SCANNED); + } + } + } + } + // this loop finds the coordinates of the player. needed for scrolling and chasing stone. // but we only do this, if a living player was found. if not yet, the setup // routine coordinates are used