renamed variable
[rocksndiamonds.git] / src / game_em / logic.c
index b76bac67400b54ac4b54a4cdb7914c7086d5727f..73b2d94c21f98318f9de4633f5de9358218d3283 100644 (file)
@@ -115,7 +115,7 @@ static void Lboom_generic(int x, int y, int element, int element_middle)
 
 static void Lboom_bug(int x, int y, int by_element)
 {
-  next[x][y] = Znormal;
+  next[x][y] = Zbug;
 
   Lboom_generic(x, y, Xemerald, Xdiamond);
 
@@ -126,7 +126,7 @@ static void Lboom_bug(int x, int y, int by_element)
 
 static void Lboom_tank(int x, int y, int by_element)
 {
-  next[x][y] = Znormal;
+  next[x][y] = Ztank;
 
   Lboom_generic(x, y, Xblank, Xblank);
 
@@ -137,7 +137,7 @@ static void Lboom_tank(int x, int y, int by_element)
 
 static void Lboom_eater(int x, int y, int by_element)
 {
-  next[x][y] = Znormal;
+  next[x][y] = Zeater;
 
   boom[x-1][y-1] = lev.eater_array[lev.eater_pos][0];
   boom[x][y-1]   = lev.eater_array[lev.eater_pos][1];
@@ -1313,7 +1313,8 @@ static void check_player(struct PLAYER *ply)
       ply->dynamite_cnt = 0;
     }
 
-    RandomEM += 7;     /* be a bit more random if the player doesn't move */
+    /* be a bit more random if the player doesn't move */
+    game_em.random += 7;
 
     return;
   }
@@ -5571,7 +5572,9 @@ static void Lpush_emerald_e(int x, int y)
   switch (cave[x+1][y])
   {
     case Zborder:
-    case Znormal:
+    case Zbug:
+    case Ztank:
+    case Zeater:
     case Zdynamite:
     case Xboom_bug:
     case Xboom_bomb:
@@ -5609,7 +5612,9 @@ static void Lpush_emerald_w(int x, int y)
   switch (cave[x-1][y])
   {
     case Zborder:
-    case Znormal:
+    case Zbug:
+    case Ztank:
+    case Zeater:
     case Zdynamite:
     case Xboom_bug:
     case Xboom_bomb:
@@ -5647,7 +5652,9 @@ static void Lpush_diamond_e(int x, int y)
   switch (cave[x+1][y])
   {
     case Zborder:
-    case Znormal:
+    case Zbug:
+    case Ztank:
+    case Zeater:
     case Zdynamite:
     case Xboom_bug:
     case Xboom_bomb:
@@ -5685,7 +5692,9 @@ static void Lpush_diamond_w(int x, int y)
   switch (cave[x-1][y])
   {
     case Zborder:
-    case Znormal:
+    case Zbug:
+    case Ztank:
+    case Zeater:
     case Zdynamite:
     case Xboom_bug:
     case Xboom_bomb:
@@ -5723,7 +5732,9 @@ static void Lpush_stone_e(int x, int y)
   switch (cave[x+1][y])
   {
     case Zborder:
-    case Znormal:
+    case Zbug:
+    case Ztank:
+    case Zeater:
     case Zdynamite:
     case Xboom_bug:
     case Xboom_bomb:
@@ -5761,7 +5772,9 @@ static void Lpush_stone_w(int x, int y)
   switch (cave[x-1][y])
   {
     case Zborder:
-    case Znormal:
+    case Zbug:
+    case Ztank:
+    case Zeater:
     case Zdynamite:
     case Xboom_bug:
     case Xboom_bomb:
@@ -5799,7 +5812,9 @@ static void Lpush_bomb_e(int x, int y)
   switch (cave[x+1][y])
   {
     case Zborder:
-    case Znormal:
+    case Zbug:
+    case Ztank:
+    case Zeater:
     case Zdynamite:
     case Xboom_bug:
     case Xboom_bomb:
@@ -5837,7 +5852,9 @@ static void Lpush_bomb_w(int x, int y)
   switch (cave[x-1][y])
   {
     case Zborder:
-    case Znormal:
+    case Zbug:
+    case Ztank:
+    case Zeater:
     case Zdynamite:
     case Xboom_bug:
     case Xboom_bomb:
@@ -5875,7 +5892,9 @@ static void Lpush_nut_e(int x, int y)
   switch (cave[x+1][y])
   {
     case Zborder:
-    case Znormal:
+    case Zbug:
+    case Ztank:
+    case Zeater:
     case Zdynamite:
     case Xboom_bug:
     case Xboom_bomb:
@@ -5913,7 +5932,9 @@ static void Lpush_nut_w(int x, int y)
   switch (cave[x-1][y])
   {
     case Zborder:
-    case Znormal:
+    case Zbug:
+    case Ztank:
+    case Zeater:
     case Zdynamite:
     case Xboom_bug:
     case Xboom_bomb:
@@ -5951,7 +5972,9 @@ static void Lpush_spring_e(int x, int y)
   switch (cave[x+1][y])
   {
     case Zborder:
-    case Znormal:
+    case Zbug:
+    case Ztank:
+    case Zeater:
     case Zdynamite:
     case Xboom_bug:
     case Xboom_bomb:
@@ -5989,7 +6012,9 @@ static void Lpush_spring_w(int x, int y)
   switch (cave[x-1][y])
   {
     case Zborder:
-    case Znormal:
+    case Zbug:
+    case Ztank:
+    case Zeater:
     case Zdynamite:
     case Xboom_bug:
     case Xboom_bomb:
@@ -6786,7 +6811,9 @@ static void Lboom_one(int x, int y, boolean by_dynamite)
   switch (cave[x][y])
   {
     case Zborder:
-    case Znormal:
+    case Zbug:
+    case Ztank:
+    case Zeater:
     case Zdynamite:
     case Xboom_bug:
     case Xboom_bomb:
@@ -6882,7 +6909,15 @@ static void Lexplode(int x, int y)
 {
   switch (cave[x][y])
   {
-    case Znormal:
+    case Zbug:
+      Lboom_nine(x, y, FALSE);
+      break;
+
+    case Ztank:
+      Lboom_nine(x, y, FALSE);
+      break;
+
+    case Zeater:
       Lboom_nine(x, y, FALSE);
       break;
 
@@ -7123,7 +7158,8 @@ void logic_players(void)
     ply[i].anim = PLY_still;
   }
 
-  start_check_nr = (RandomEM & 128 ? 0 : 1) * 2 + (RandomEM & 256 ? 0 : 1);
+  start_check_nr = ((game_em.random & 128 ? 0 : 1) * 2 +
+                   (game_em.random & 256 ? 0 : 1));
 
   for (i = 0; i < MAX_PLAYERS; i++)
   {
@@ -7160,7 +7196,7 @@ void logic_objects(void)
   next = lev.next;
   boom = lev.boom;
 
-  seed = RandomEM;
+  seed = game_em.random;
   score = 0;
 
   for (y = lev.top; y < lev.bottom; y++)
@@ -7172,7 +7208,7 @@ void logic_objects(void)
   else
     game_em.game_over = TRUE;
 
-  RandomEM = seed;
+  game_em.random = seed;
 
   /* triple buffering */
   void *temp = lev.cave;
@@ -7220,7 +7256,7 @@ void logic_globals(void)
 
   /* grow amoeba */
 
-  random = RandomEM;
+  random = game_em.random;
 
   for (count = lev.amoeba_time; count--;)
   {
@@ -7234,7 +7270,7 @@ void logic_globals(void)
     random = random * 129 + 1;
   }
 
-  RandomEM = random;
+  game_em.random = random;
 
   /* handle explosions */