renamed variable
authorHolger Schemel <holger.schemel@virtion.de>
Tue, 17 Sep 2024 17:42:41 +0000 (19:42 +0200)
committerHolger Schemel <holger.schemel@virtion.de>
Tue, 17 Sep 2024 12:58:21 +0000 (14:58 +0200)
src/game_bd/bd_cave.c
src/game_bd/bd_cave.h
src/game_bd/bd_caveobject.c

index 8aa3d7782737a27a6499eea6922efd1007a2af8b..6c87444bd98ac9f64ed81d184b8aa1c05be9ab26 100644 (file)
@@ -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:
index 1366b9902554fc85709e2f4e7f5fd0988fa22db0..e3495ce1d0c3887bb38759e76dc6dde7773cb550 100644 (file)
@@ -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,
index ebdc1b4721bf64a0824541b857112e45b680165d..a07a91c676dd1a4e812e21cda10738b5e90b636d 100644 (file)
@@ -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);