From: Holger Schemel Date: Tue, 17 Sep 2024 17:42:41 +0000 (+0200) Subject: renamed variable X-Git-Tag: 4.4.0.0-test-4~216 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=daf009245ac5f533ba76310d722b03a4e1cf91d8;p=rocksndiamonds.git renamed variable --- diff --git a/src/game_bd/bd_cave.c b/src/game_bd/bd_cave.c index 8aa3d778..6c87444b 100644 --- a/src/game_bd/bd_cave.c +++ b/src/game_bd/bd_cave.c @@ -1840,13 +1840,13 @@ void gd_update_scheduling_cave_speed(GdCave *cave) if (!cave->intermission) { // non-intermissions - cave->speed = (88 + 3.66 * cave->c64_timing + + cave->speed = (88 + 3.66 * cave->ckdelay + (cave->ckdelay_current + cave->ckdelay_extra_for_animation) / 1000); } else { // intermissions were quicker, as only lines 1-12 were processed by the engine. - cave->speed = (60 + 3.66 * cave->c64_timing + + cave->speed = (60 + 3.66 * cave->ckdelay + (cave->ckdelay_current + cave->ckdelay_extra_for_animation) / 1000); } break; @@ -1856,36 +1856,36 @@ void gd_update_scheduling_cave_speed(GdCave *cave) if (!cave->intermission) { // non-intermissions - cave->speed = (74 + 3.2 * cave->c64_timing + (cave->ckdelay_current) / 1000); + cave->speed = (74 + 3.2 * cave->ckdelay + (cave->ckdelay_current) / 1000); } else { // for intermissions - cave->speed = (65 + 2.88 * cave->c64_timing + (cave->ckdelay_current) / 1000); + cave->speed = (65 + 2.88 * cave->ckdelay + (cave->ckdelay_current) / 1000); } break; case GD_SCHEDULING_BD2: // 60 is a guess. cave->speed = MAX(60 + (cave->ckdelay_current + cave->ckdelay_extra_for_animation) / 1000, - cave->c64_timing * 20); + cave->ckdelay * 20); break; case GD_SCHEDULING_PLCK: // 65 is totally empty cave in construction kit, with delay = 0) - cave->speed = MAX(65 + cave->ckdelay_current / 1000, cave->c64_timing * 20); + cave->speed = MAX(65 + cave->ckdelay_current / 1000, cave->ckdelay * 20); break; case GD_SCHEDULING_BD2_PLCK_ATARI: // a really fast engine; timing works like c64 plck. // 40 ms was measured in the construction kit, with delay = 0 - cave->speed = MAX(40 + cave->ckdelay_current / 1000, cave->c64_timing * 20); + cave->speed = MAX(40 + cave->ckdelay_current / 1000, cave->ckdelay * 20); break; case GD_SCHEDULING_CRDR: if (cave->hammered_walls_reappear) // this made the engine very slow. cave->ckdelay_current += 60000; - cave->speed = MAX(130 + cave->ckdelay_current / 1000, cave->c64_timing * 20); + cave->speed = MAX(130 + cave->ckdelay_current / 1000, cave->ckdelay * 20); break; case GD_SCHEDULING_MAX: diff --git a/src/game_bd/bd_cave.h b/src/game_bd/bd_cave.h index 1366b990..e3495ce1 100644 --- a/src/game_bd/bd_cave.h +++ b/src/game_bd/bd_cave.h @@ -579,7 +579,7 @@ typedef struct _gd_cave // appear there int speed; // Time between game cycles in ms - int c64_timing; // a ckdelay value for the level this cave is rendered for + int ckdelay; // a ckdelay value for the level this cave is rendered for int ckdelay_current; // ckdelay value for the current iteration int ckdelay_extra_for_animation; // bd1 and similar engines had animation bits in cave data, // to set which elements to animate (firefly, butterfly, diff --git a/src/game_bd/bd_caveobject.c b/src/game_bd/bd_caveobject.c index ebdc1b47..a07a91c6 100644 --- a/src/game_bd/bd_caveobject.c +++ b/src/game_bd/bd_caveobject.c @@ -1570,7 +1570,7 @@ GdCave *gd_cave_new_rendered(const GdCave *data, const int level, const unsigned // this one may be used by iterate routine to calculate actual delay // if c64scheduling is selected - cave->c64_timing = data->level_ckdelay[level]; + cave->ckdelay = data->level_ckdelay[level]; } gd_cave_correct_visible_size(cave);