rnd-20020930-1-src
authorHolger Schemel <info@artsoft.org>
Sun, 29 Sep 2002 22:25:15 +0000 (00:25 +0200)
committerHolger Schemel <info@artsoft.org>
Sat, 30 Aug 2014 08:38:44 +0000 (10:38 +0200)
src/conftime.h
src/game.c
src/init.c
src/main.c
src/main.h
src/tools.c

index f0425dde511cef97e56dcfad71857000bf030bcf..73dcedfd9c415604a756f579bab06a19bd034a8a 100644 (file)
@@ -1 +1 @@
-#define COMPILE_DATE_STRING "[2002-09-22 02:29]"
+#define COMPILE_DATE_STRING "[2002-09-30 00:24]"
index 2c5f0e9aabb2f693c3f3c3da9c6ba06d77c428ad..5dd55c76ffa8391c9c2acb1af3ec3b542da531b9 100644 (file)
@@ -669,12 +669,14 @@ void InitGame()
 
   InitGameEngine();
 
+#if 0
 #if DEBUG
 #if USE_NEW_AMOEBA_CODE
   printf("Using new amoeba code.\n");
 #else
   printf("Using old amoeba code.\n");
 #endif
+#endif
 #endif
 
   /* don't play tapes over network */
@@ -3132,7 +3134,7 @@ void StartMoving(int x, int y)
       else
       {
        Feld[newx][newy] = EL_EMPTY;
-       DrawLevelField(newx, newy);
+       DrawNewLevelField(newx, newy);
       }
 
       PlaySoundLevel(x, y, SND_YAMYAM_EATING);
@@ -3153,7 +3155,7 @@ void StartMoving(int x, int y)
       else
       {
        Feld[newx][newy] = EL_EMPTY;
-       DrawLevelField(newx, newy);
+       DrawNewLevelField(newx, newy);
       }
 
       PlaySoundLevel(x, y, SND_DARK_YAMYAM_EATING);
@@ -3205,7 +3207,7 @@ void StartMoving(int x, int y)
 #endif
       else if (element == EL_BUG || element == EL_SPACESHIP ||
               element == EL_SP_SNIKSNAK || element == EL_MOLE)
-#if 1
+#if 0
        DrawLevelField(x, y);
 #else
        DrawNewLevelField(x, y);
@@ -3296,7 +3298,7 @@ void ContinueMoving(int x, int y)
       };
 
       Feld[x][y] = EL_SAND;
-      DrawLevelField(x, y);
+      DrawNewLevelField(x, y);
 
       for(i=0; i<4; i++)
       {
@@ -3306,7 +3308,7 @@ void ContinueMoving(int x, int y)
        yy = y + xy[i][1];
 
        if (IN_LEV_FIELD(xx, yy) && Feld[xx][yy] == EL_SAND)
-         DrawLevelField(xx, yy);       /* for "ErdreichAnbroeckeln()" */
+         DrawNewLevelField(xx, yy);    /* for "ErdreichAnbroeckeln()" */
       }
     }
 
@@ -3365,18 +3367,8 @@ void ContinueMoving(int x, int y)
     if (!CAN_MOVE(element))
       MovDir[newx][newy] = 0;
 
-    if (element == EL_BUG || element == EL_SPACESHIP ||
-       element == EL_SP_SNIKSNAK || element == EL_PACMAN ||
-       element == EL_SP_ELECTRON)
-    {
-      DrawNewLevelField(x, y);
-      DrawNewLevelField(newx, newy);
-    }
-    else
-    {
-      DrawLevelField(x, y);
-      DrawLevelField(newx, newy);
-    }
+    DrawNewLevelField(x, y);
+    DrawNewLevelField(newx, newy);
 
     Stop[newx][newy] = TRUE;
     JustStopped[newx][newy] = 3;
@@ -3396,12 +3388,7 @@ void ContinueMoving(int x, int y)
   }
   else                         /* still moving on */
   {
-    if (element == EL_BUG || element == EL_SPACESHIP ||
-       element == EL_SP_SNIKSNAK || element == EL_PACMAN ||
-       element == EL_SP_ELECTRON)
-      DrawNewLevelField(x, y);
-    else
-      DrawLevelField(x, y);
+    DrawNewLevelField(x, y);
   }
 }
 
index 97c52c16f701d207e26547c0929884befd6a490f..d800de9f61c72d4a5cd0cf676fc1eda09692d1dd 100644 (file)
@@ -930,11 +930,10 @@ void InitElementInfo()
   {
     for(j=0; j<NUM_GFX_ACTIONS_MAPPED; j++)
     {
-      element_info[i].graphic[j] = IMG_EMPTY_SPACE;
+      element_info[i].graphic[j] = -1;                 /* use default */
 
       for(k=0; k<NUM_MV_DIRECTIONS; k++)
-       element_info[i].direction_graphic[j][k] = IMG_EMPTY_SPACE;
-      element_info[i].has_direction_graphic[j] = FALSE;
+       element_info[i].direction_graphic[j][k] = -1;   /* use default */
     }
   }
 
@@ -1004,7 +1003,6 @@ void InitElementInfo()
       direction = MV_DIR_BIT(direction);
 
       element_info[element].direction_graphic[action][direction] = graphic;
-      element_info[element].has_direction_graphic[action] = TRUE;
     }
     else
       element_info[element].graphic[action] = graphic;
@@ -1012,6 +1010,39 @@ void InitElementInfo()
     i++;
   }
 
+  /* now set all '-1' values with element specific default values */
+  for(i=0; i<MAX_ELEMENTS; i++)
+  {
+    int default_action_graphic = element_info[i].graphic[GFX_ACTION_DEFAULT];
+    int default_action_direction_graphic[NUM_MV_DIRECTIONS];
+
+    if (default_action_graphic == -1)
+      default_action_graphic = EL_CHAR_QUESTION;
+
+    for(k=0; k<NUM_MV_DIRECTIONS; k++)
+      default_action_direction_graphic[k] =
+       element_info[i].direction_graphic[GFX_ACTION_DEFAULT][k];
+
+    for(j=0; j<NUM_GFX_ACTIONS_MAPPED; j++)
+    {
+      /* no graphic for this specific action -- use default action graphic */
+      if (element_info[i].graphic[j] == -1)
+       element_info[i].graphic[j] = default_action_graphic;
+
+      for(k=0; k<NUM_MV_DIRECTIONS; k++)
+      {
+       int default_direction_graphic = default_action_direction_graphic[k];
+
+       /* no default direction graphic -- use graphic for current action */
+       if (default_direction_graphic == -1)
+         default_direction_graphic = element_info[i].graphic[j];
+
+       if (element_info[i].direction_graphic[j][k] == -1)
+         element_info[i].direction_graphic[j][k] = default_direction_graphic;
+      }
+    }
+  }
+
 #endif
 }
 
index 8a6dd77e41a420c67283023e838c7e17ebc6f86d..6cafa8eaa5a2942a2e9848e1373092a6550301fd 100644 (file)
@@ -221,18 +221,26 @@ struct ConfigInfo image_config[] =
   { "bd_magic_wall.active.xpos",               "12"                    },
   { "bd_magic_wall.active.ypos",               "10"                    },
   { "bd_magic_wall.active.frames",             "4"                     },
+  { "bd_magic_wall.active.reverse",            "1"                     },
+  { "bd_magic_wall.active.delay",              "4"                     },
   { "bd_magic_wall.filling",                   "RocksElements.pcx"     },
   { "bd_magic_wall.filling.xpos",              "12"                    },
   { "bd_magic_wall.filling.ypos",              "10"                    },
   { "bd_magic_wall.filling.frames",            "4"                     },
+  { "bd_magic_wall.filling.reverse",           "1"                     },
+  { "bd_magic_wall.filling.delay",             "4"                     },
   { "bd_magic_wall.full",                      "RocksElements.pcx"     },
   { "bd_magic_wall.full.xpos",                 "12"                    },
   { "bd_magic_wall.full.ypos",                 "10"                    },
   { "bd_magic_wall.full.frames",               "4"                     },
+  { "bd_magic_wall.full.reverse",              "1"                     },
+  { "bd_magic_wall.full.delay",                        "4"                     },
   { "bd_magic_wall.emptying",                  "RocksElements.pcx"     },
   { "bd_magic_wall.emptying.xpos",             "12"                    },
   { "bd_magic_wall.emptying.ypos",             "10"                    },
   { "bd_magic_wall.emptying.frames",           "4"                     },
+  { "bd_magic_wall.emptying.reverse",          "1"                     },
+  { "bd_magic_wall.emptying.delay",            "4"                     },
   { "bd_magic_wall.dead",                      "RocksElements.pcx"     },
   { "bd_magic_wall.dead.xpos",                 "12"                    },
   { "bd_magic_wall.dead.ypos",                 "10"                    },
@@ -821,18 +829,26 @@ struct ConfigInfo image_config[] =
   { "magic_wall.active.xpos",                  "0"                     },
   { "magic_wall.active.ypos",                  "8"                     },
   { "magic_wall.active.frames",                        "4"                     },
+  { "magic_wall.active.reverse",               "1"                     },
+  { "magic_wall.active.delay",                 "4"                     },
   { "magic_wall.filling",                      "RocksElements.pcx"     },
   { "magic_wall.filling.xpos",                 "0"                     },
   { "magic_wall.filling.ypos",                 "8"                     },
   { "magic_wall.filling.frames",               "4"                     },
+  { "magic_wall.filling.reverse",              "1"                     },
+  { "magic_wall.filling.delay",                        "4"                     },
   { "magic_wall.full",                         "RocksElements.pcx"     },
   { "magic_wall.full.xpos",                    "0"                     },
   { "magic_wall.full.ypos",                    "8"                     },
   { "magic_wall.full.frames",                  "4"                     },
+  { "magic_wall.full.reverse",                 "1"                     },
+  { "magic_wall.full.delay",                   "4"                     },
   { "magic_wall.emptying",                     "RocksElements.pcx"     },
   { "magic_wall.emptying.xpos",                        "0"                     },
   { "magic_wall.emptying.ypos",                        "8"                     },
   { "magic_wall.emptying.frames",              "4"                     },
+  { "magic_wall.emptying.reverse",             "1"                     },
+  { "magic_wall.emptying.delay",               "4"                     },
   { "magic_wall.dead",                         "RocksElements.pcx"     },
   { "magic_wall.dead.xpos",                    "0"                     },
   { "magic_wall.dead.ypos",                    "8"                     },
@@ -880,6 +896,7 @@ struct ConfigInfo image_config[] =
   { "acid.xpos",                               "12"                    },
   { "acid.ypos",                               "7"                     },
   { "acid.frames",                             "4"                     },
+  { "acid.delay",                              "10"                    },
 
   { "acid.splashing_left",                     "RocksHeroes.pcx"       },
   { "acid.splashing_left.xpos",                        "8"                     },
@@ -1006,6 +1023,7 @@ struct ConfigInfo image_config[] =
   { "balloon.moving.ypos",                     "7"                     },
   { "balloon.moving.frames",                   "4"                     },
   { "balloon.moving.pingpong",                 "1"                     },
+  { "balloon.moving.delay",                    "2"                     },
 
   { "balloon_send_left",                       "RocksDC.pcx"           },
   { "balloon_send_left.xpos",                  "8"                     },
@@ -1714,10 +1732,12 @@ struct ConfigInfo image_config[] =
   { "pig_down.moving.xpos",                    "8"                     },
   { "pig_down.moving.ypos",                    "0"                     },
   { "pig_down.moving.frames",                  "4"                     },
+  { "pig_down.moving.delay",                   "2"                     },
   { "pig_down.eating",                         "RocksHeroes.pcx"       },
   { "pig_down.eating.xpos",                    "8"                     },
   { "pig_down.eating.ypos",                    "0"                     },
   { "pig_down.eating.frames",                  "4"                     },
+  { "pig_down.eating.delay",                   "2"                     },
   { "pig_up",                                  "RocksHeroes.pcx"       },
   { "pig_up.xpos",                             "12"                    },
   { "pig_up.ypos",                             "0"                     },
@@ -1726,10 +1746,12 @@ struct ConfigInfo image_config[] =
   { "pig_up.moving.xpos",                      "12"                    },
   { "pig_up.moving.ypos",                      "0"                     },
   { "pig_up.moving.frames",                    "4"                     },
+  { "pig_up.moving.delay",                     "2"                     },
   { "pig_up.eating",                           "RocksHeroes.pcx"       },
   { "pig_up.eating.xpos",                      "12"                    },
   { "pig_up.eating.ypos",                      "0"                     },
   { "pig_up.eating.frames",                    "4"                     },
+  { "pig_up.eating.delay",                     "2"                     },
   { "pig_left",                                        "RocksHeroes.pcx"       },
   { "pig_left.xpos",                           "8"                     },
   { "pig_left.ypos",                           "1"                     },
@@ -1738,10 +1760,12 @@ struct ConfigInfo image_config[] =
   { "pig_left.moving.xpos",                    "8"                     },
   { "pig_left.moving.ypos",                    "1"                     },
   { "pig_left.moving.frames",                  "4"                     },
+  { "pig_left.moving.delay",                   "2"                     },
   { "pig_left.eating",                         "RocksHeroes.pcx"       },
   { "pig_left.eating.xpos",                    "8"                     },
   { "pig_left.eating.ypos",                    "1"                     },
   { "pig_left.eating.frames",                  "4"                     },
+  { "pig_left.eating.delay",                   "2"                     },
   { "pig_right",                               "RocksHeroes.pcx"       },
   { "pig_right.xpos",                          "12"                    },
   { "pig_right.ypos",                          "1"                     },
@@ -1750,10 +1774,12 @@ struct ConfigInfo image_config[] =
   { "pig_right.moving.xpos",                   "12"                    },
   { "pig_right.moving.ypos",                   "1"                     },
   { "pig_right.moving.frames",                 "4"                     },
+  { "pig_right.moving.delay",                  "2"                     },
   { "pig_right.eating",                                "RocksHeroes.pcx"       },
   { "pig_right.eating.xpos",                   "12"                    },
   { "pig_right.eating.ypos",                   "1"                     },
   { "pig_right.eating.frames",                 "4"                     },
+  { "pig_right.eating.delay",                  "2"                     },
 
   { "dragon_down",                             "RocksHeroes.pcx"       },
   { "dragon_down.xpos",                                "8"                     },
@@ -1763,10 +1789,11 @@ struct ConfigInfo image_config[] =
   { "dragon_down.moving.xpos",                 "8"                     },
   { "dragon_down.moving.ypos",                 "2"                     },
   { "dragon_down.moving.frames",               "4"                     },
+  { "dragon_down.moving.delay",                        "2"                     },
   { "dragon_down.attacking",                   "RocksHeroes.pcx"       },
   { "dragon_down.attacking.xpos",              "8"                     },
   { "dragon_down.attacking.ypos",              "2"                     },
-  { "dragon_down.attacking.frames",            "4"                     },
+  { "dragon_down.attacking.frames",            "1"                     },
   { "dragon_up",                               "RocksHeroes.pcx"       },
   { "dragon_up.xpos",                          "12"                    },
   { "dragon_up.ypos",                          "2"                     },
@@ -1775,10 +1802,11 @@ struct ConfigInfo image_config[] =
   { "dragon_up.moving.xpos",                   "12"                    },
   { "dragon_up.moving.ypos",                   "2"                     },
   { "dragon_up.moving.frames",                 "4"                     },
+  { "dragon_up.moving.delay",                  "2"                     },
   { "dragon_up.attacking",                     "RocksHeroes.pcx"       },
   { "dragon_up.attacking.xpos",                        "12"                    },
   { "dragon_up.attacking.ypos",                        "2"                     },
-  { "dragon_up.attacking.frames",              "4"                     },
+  { "dragon_up.attacking.frames",              "1"                     },
   { "dragon_left",                             "RocksHeroes.pcx"       },
   { "dragon_left.xpos",                                "8"                     },
   { "dragon_left.ypos",                                "3"                     },
@@ -1787,10 +1815,11 @@ struct ConfigInfo image_config[] =
   { "dragon_left.moving.xpos",                 "8"                     },
   { "dragon_left.moving.ypos",                 "3"                     },
   { "dragon_left.moving.frames",               "4"                     },
+  { "dragon_left.moving.delay",                        "2"                     },
   { "dragon_left.attacking",                   "RocksHeroes.pcx"       },
   { "dragon_left.attacking.xpos",              "8"                     },
   { "dragon_left.attacking.ypos",              "3"                     },
-  { "dragon_left.attacking.frames",            "4"                     },
+  { "dragon_left.attacking.frames",            "1"                     },
   { "dragon_right",                            "RocksHeroes.pcx"       },
   { "dragon_right.xpos",                       "12"                    },
   { "dragon_right.ypos",                       "3"                     },
@@ -1799,10 +1828,11 @@ struct ConfigInfo image_config[] =
   { "dragon_right.moving.xpos",                        "12"                    },
   { "dragon_right.moving.ypos",                        "3"                     },
   { "dragon_right.moving.frames",              "4"                     },
+  { "dragon_right.moving.delay",               "2"                     },
   { "dragon_right.attacking",                  "RocksHeroes.pcx"       },
   { "dragon_right.attacking.xpos",             "12"                    },
   { "dragon_right.attacking.ypos",             "3"                     },
-  { "dragon_right.attacking.frames",           "4"                     },
+  { "dragon_right.attacking.frames",           "1"                     },
 
   { "mole_down",                               "RocksHeroes.pcx"       },
   { "mole_down.xpos",                          "8"                     },
@@ -1812,10 +1842,12 @@ struct ConfigInfo image_config[] =
   { "mole_down.moving.xpos",                   "8"                     },
   { "mole_down.moving.ypos",                   "4"                     },
   { "mole_down.moving.frames",                 "4"                     },
+  { "mole_down.moving.delay",                  "2"                     },
   { "mole_down.digging",                       "RocksHeroes.pcx"       },
   { "mole_down.digging.xpos",                  "8"                     },
   { "mole_down.digging.ypos",                  "4"                     },
   { "mole_down.digging.frames",                        "4"                     },
+  { "mole_down.digging.delay",                 "2"                     },
   { "mole_up",                                 "RocksHeroes.pcx"       },
   { "mole_up.xpos",                            "12"                    },
   { "mole_up.ypos",                            "4"                     },
@@ -1824,10 +1856,12 @@ struct ConfigInfo image_config[] =
   { "mole_up.moving.xpos",                     "12"                    },
   { "mole_up.moving.ypos",                     "4"                     },
   { "mole_up.moving.frames",                   "4"                     },
+  { "mole_up.moving.delay",                    "2"                     },
   { "mole_up.digging",                         "RocksHeroes.pcx"       },
   { "mole_up.digging.xpos",                    "12"                    },
   { "mole_up.digging.ypos",                    "4"                     },
   { "mole_up.digging.frames",                  "4"                     },
+  { "mole_up.digging.delay",                   "2"                     },
   { "mole_left",                               "RocksHeroes.pcx"       },
   { "mole_left.xpos",                          "8"                     },
   { "mole_left.ypos",                          "5"                     },
@@ -1836,10 +1870,12 @@ struct ConfigInfo image_config[] =
   { "mole_left.moving.xpos",                   "8"                     },
   { "mole_left.moving.ypos",                   "5"                     },
   { "mole_left.moving.frames",                 "4"                     },
+  { "mole_left.moving.delay",                  "2"                     },
   { "mole_left.digging",                       "RocksHeroes.pcx"       },
   { "mole_left.digging.xpos",                  "8"                     },
   { "mole_left.digging.ypos",                  "5"                     },
   { "mole_left.digging.frames",                        "4"                     },
+  { "mole_left.digging.delay",                 "2"                     },
   { "mole_right",                              "RocksHeroes.pcx"       },
   { "mole_right.xpos",                         "12"                    },
   { "mole_right.ypos",                         "5"                     },
@@ -1848,10 +1884,12 @@ struct ConfigInfo image_config[] =
   { "mole_right.moving.xpos",                  "12"                    },
   { "mole_right.moving.ypos",                  "5"                     },
   { "mole_right.moving.frames",                        "4"                     },
+  { "mole_right.moving.delay",                 "2"                     },
   { "mole_right.digging",                      "RocksHeroes.pcx"       },
   { "mole_right.digging.xpos",                 "12"                    },
   { "mole_right.digging.ypos",                 "5"                     },
   { "mole_right.digging.frames",               "4"                     },
+  { "mole_right.digging.delay",                        "2"                     },
 
   { "penguin_down",                            "RocksHeroes.pcx"       },
   { "penguin_down.xpos",                       "8"                     },
@@ -1861,6 +1899,7 @@ struct ConfigInfo image_config[] =
   { "penguin_down.moving.xpos",                        "8"                     },
   { "penguin_down.moving.ypos",                        "6"                     },
   { "penguin_down.moving.frames",              "4"                     },
+  { "penguin_down.moving.delay",               "2"                     },
   { "penguin_up",                              "RocksHeroes.pcx"       },
   { "penguin_up.xpos",                         "12"                    },
   { "penguin_up.ypos",                         "6"                     },
@@ -1869,6 +1908,7 @@ struct ConfigInfo image_config[] =
   { "penguin_up.moving.xpos",                  "12"                    },
   { "penguin_up.moving.ypos",                  "6"                     },
   { "penguin_up.moving.frames",                        "4"                     },
+  { "penguin_up.moving.delay",                 "2"                     },
   { "penguin_left",                            "RocksHeroes.pcx"       },
   { "penguin_left.xpos",                       "8"                     },
   { "penguin_left.ypos",                       "7"                     },
@@ -1877,6 +1917,7 @@ struct ConfigInfo image_config[] =
   { "penguin_left.moving.xpos",                        "8"                     },
   { "penguin_left.moving.ypos",                        "7"                     },
   { "penguin_left.moving.frames",              "4"                     },
+  { "penguin_left.moving.delay",               "2"                     },
   { "penguin_right",                           "RocksHeroes.pcx"       },
   { "penguin_right.xpos",                      "12"                    },
   { "penguin_right.ypos",                      "7"                     },
@@ -1885,6 +1926,7 @@ struct ConfigInfo image_config[] =
   { "penguin_right.moving.xpos",               "12"                    },
   { "penguin_right.moving.ypos",               "7"                     },
   { "penguin_right.moving.frames",             "4"                     },
+  { "penguin_right.moving.delay",              "2"                     },
 
   { "satellite",                               "RocksHeroes.pcx"       },
   { "satellite.xpos",                          "8"                     },
index 08463a8cb83e653a7d2fdebfd419206277a6b618..4309ddbef17a5116ccc00b71308c1255552b0b84 100644 (file)
@@ -1563,11 +1563,11 @@ struct ElementInfo
   char *sound_class_name;      /* classification for custom sound effects */
   char *editor_description;    /* short description for level editor */
 
+                               /* default graphics for several actions */
   int graphic[NUM_GFX_ACTIONS_MAPPED];
 
                                /* special graphics for left/right/up/down */
   int direction_graphic[NUM_GFX_ACTIONS_MAPPED][NUM_MV_DIRECTIONS];
-  boolean has_direction_graphic[NUM_GFX_ACTIONS_MAPPED];
 };
 
 struct GraphicInfo
index 3015b1adad66ea0db1439f7b29fe7815d89de503..cfdd40edc9812e09f1f7fb2ddaace42c5473d2a0 100644 (file)
@@ -1463,95 +1463,32 @@ void DrawNewScreenElementExt(int x, int y, int dx, int dy, int element,
   int ux = LEVELX(x), uy = LEVELY(y);
   int move_dir = MovDir[ux][uy];
   int move_pos = ABS(MovPos[ux][uy]) / (TILEX / 8);
-  int graphic = el_dir2img(element, move_dir);
+  int gfx_action = (IS_MOVING(ux,uy) ? GFX_ACTION_MOVING : GFX_ACTION_DEFAULT);
+  int graphic = el_dir_act2img(element, move_dir, gfx_action);
   int frame = getNewGraphicAnimationFrame(graphic, move_pos);
+#if 0
   int phase8 = move_pos;
   int phase4 = phase8 / 2;
   int phase2  = phase8 / 4;
+#endif
 
-  int dir = move_dir;  /* !!! THROW AWAY LATER !!! */
-
-  if (0)
-  {
-    ;
-  }
-#if 0
-  else if (element == EL_PACMAN || element == EL_BUG ||
-          element == EL_SPACESHIP)
+  if (element == EL_WALL_GROWING)
   {
-    graphic += 1 * !phase2;
+    boolean left_stopped = FALSE, right_stopped = FALSE;
 
-    if (dir == MV_UP)
-      graphic += 1 * 2;
-    else if (dir == MV_LEFT)
-      graphic += 2 * 2;
-    else if (dir == MV_DOWN)
-      graphic += 3 * 2;
-  }
-  else if (element == EL_SP_SNIKSNAK)
-  {
-    if (dir == MV_LEFT)
-      graphic = GFX_SP_SNIKSNAK_LEFT;
-    else if (dir == MV_RIGHT)
-      graphic = GFX_SP_SNIKSNAK_RIGHT;
-    else if (dir == MV_UP)
-      graphic = GFX_SP_SNIKSNAK_UP;
-    else
-      graphic = GFX_SP_SNIKSNAK_DOWN;
-
-    graphic += (phase8 < 4 ? phase8 : 7 - phase8);
-  }
-  else if (element == EL_SP_ELECTRON)
-  {
-    graphic = GFX2_SP_ELECTRON + getGraphicAnimationPhase(8, 2, ANIM_NORMAL);
-  }
-#endif
-  else if (element == EL_MOLE || element == EL_PENGUIN ||
-          element == EL_PIG || element == EL_DRAGON)
-  {
-    if (dir == MV_LEFT)
-      graphic = (element == EL_MOLE ? GFX_MOLE_LEFT :
-                element == EL_PENGUIN ? GFX_PINGUIN_LEFT :
-                element == EL_PIG ? GFX_SCHWEIN_LEFT : GFX_DRACHE_LEFT);
-    else if (dir == MV_RIGHT)
-      graphic = (element == EL_MOLE ? GFX_MOLE_RIGHT :
-                element == EL_PENGUIN ? GFX_PINGUIN_RIGHT :
-                element == EL_PIG ? GFX_SCHWEIN_RIGHT : GFX_DRACHE_RIGHT);
-    else if (dir == MV_UP)
-      graphic = (element == EL_MOLE ? GFX_MOLE_UP :
-                element == EL_PENGUIN ? GFX_PINGUIN_UP :
-                element == EL_PIG ? GFX_SCHWEIN_UP : GFX_DRACHE_UP);
-    else
-      graphic = (element == EL_MOLE ? GFX_MOLE_DOWN :
-                element == EL_PENGUIN ? GFX_PINGUIN_DOWN :
-                element == EL_PIG ? GFX_SCHWEIN_DOWN : GFX_DRACHE_DOWN);
+    if (!IN_LEV_FIELD(ux-1, uy) || IS_MAUER(Feld[ux-1][uy]))
+      left_stopped = TRUE;
+    if (!IN_LEV_FIELD(ux+1, uy) || IS_MAUER(Feld[ux+1][uy]))
+      right_stopped = TRUE;
 
-    graphic += phase4;
-  }
-  else if (element == EL_SATELLITE)
-  {
-#if 1
-    graphic = GFX_SONDE_START + getGraphicAnimationPhase(8, 2, ANIM_NORMAL);
-#else
-    graphic = GFX_SONDE_START + getNewGraphicAnimationFrame(graphic, move_pos);
-#endif
-  }
-  else if (element == EL_ACID)
-  {
-#if 1
-    graphic = GFX_GEBLUBBER + getGraphicAnimationPhase(4, 10, ANIM_NORMAL);
-#else
-    graphic = GFX_GEBLUBBER + getNewGraphicAnimationFrame(graphic, move_pos);
-#endif
-  }
-  else if (element == EL_BD_BUTTERFLY || element == EL_BD_FIREFLY)
-  {
-    graphic += !phase2;
-  }
-  else if (element == EL_BALLOON)
-  {
-    graphic += phase4;
+    if (left_stopped && right_stopped)
+      graphic = IMG_WALL;
+    else if (left_stopped)
+      graphic = IMG_WALL_GROWING_ACTIVE_RIGHT;
+    else if (right_stopped)
+      graphic = IMG_WALL_GROWING_ACTIVE_LEFT;
   }
+#if 0
   else if ((element == EL_ROCK ||
            element == EL_SP_ZONK ||
            element == EL_BD_ROCK ||
@@ -1565,9 +1502,9 @@ void DrawNewScreenElementExt(int x, int y, int dx, int dy, int element,
          element == EL_SP_ZONK ||
          element == EL_BD_ROCK)
       {
-       if (dir == MV_LEFT)
+       if (move_dir == MV_LEFT)
          graphic += (4 - phase4) % 4;
-       else if (dir == MV_RIGHT)
+       else if (move_dir == MV_RIGHT)
          graphic += phase4;
        else
          graphic += phase2 * 2;
@@ -1576,49 +1513,11 @@ void DrawNewScreenElementExt(int x, int y, int dx, int dy, int element,
        graphic += phase2;
     }
   }
-  else if (element == EL_MAGIC_WALL_ACTIVE ||
-          element == EL_MAGIC_WALL_EMPTYING ||
-          element == EL_BD_MAGIC_WALL_ACTIVE ||
-          element == EL_BD_MAGIC_WALL_EMPTYING ||
-          element == EL_MAGIC_WALL_FULL ||
-          element == EL_BD_MAGIC_WALL_FULL)
-  {
-#if 1
-    graphic += 3 + getGraphicAnimationPhase(4, 4, ANIM_REVERSE);
-#else
-    graphic += 3 + getNewGraphicAnimationFrame(graphic, move_pos);
-#endif
-  }
   else if (IS_AMOEBOID(element) || element == EL_AMOEBA_DRIPPING)
   {
     graphic = (element == EL_AMOEBA_DEAD ? GFX_AMOEBE_TOT : GFX_AMOEBE_LEBT);
     graphic += (x + 2 * y + 4) % 4;
   }
-  else if (element == EL_WALL_GROWING)
-  {
-    boolean links_massiv = FALSE, rechts_massiv = FALSE;
-
-    if (!IN_LEV_FIELD(ux-1, uy) || IS_MAUER(Feld[ux-1][uy]))
-      links_massiv = TRUE;
-    if (!IN_LEV_FIELD(ux+1, uy) || IS_MAUER(Feld[ux+1][uy]))
-      rechts_massiv = TRUE;
-
-    if (links_massiv && rechts_massiv)
-      graphic = GFX_MAUERWERK;
-    else if (links_massiv)
-      graphic = GFX_MAUER_R;
-    else if (rechts_massiv)
-      graphic = GFX_MAUER_L;
-  }
-#if 0
-  else if ((element == EL_INVISIBLE_STEELWALL ||
-           element == EL_INVISIBLE_WALL ||
-           element == EL_INVISIBLE_SAND) && game.light_time_left)
-  {
-    graphic = (element == EL_INVISIBLE_STEELWALL ? GFX_INVISIBLE_STEEL_ON :
-              element == EL_INVISIBLE_WALL ? GFX_UNSICHTBAR_ON :
-              GFX_SAND_INVISIBLE_ON);
-  }
 #endif
 
   if (dx || dy)
@@ -3365,26 +3264,13 @@ int el2img(int element)
 
 int el_dir2img(int element, int direction)
 {
-  int action = GFX_ACTION_DEFAULT;
-
-  if (element_info[element].has_direction_graphic[action])
-  {
-    direction = MV_DIR_BIT(direction);
-
-    return element_info[element].direction_graphic[action][direction];
-  }
-  else
-    return el2img(element);
+  return el_dir_act2img(element, direction, GFX_ACTION_DEFAULT);
 }
 
 int el_dir_act2img(int element, int direction, int action)
 {
-  if (element_info[element].has_direction_graphic[action])
-  {
-    direction = MV_DIR_BIT(direction);
+  action = graphics_action_mapping[action];
+  direction = MV_DIR_BIT(direction);
 
-    return element_info[element].direction_graphic[action][direction];
-  }
-  else
-    return el_dir2img(element, direction);
+  return element_info[element].direction_graphic[action][direction];
 }