rnd-20020917-1-src
authorHolger Schemel <info@artsoft.org>
Mon, 16 Sep 2002 22:08:23 +0000 (00:08 +0200)
committerHolger Schemel <info@artsoft.org>
Sat, 30 Aug 2014 08:38:29 +0000 (10:38 +0200)
src/conftime.h
src/game.c
src/init.c
src/libgame/system.h
src/main.c
src/main.h
src/tools.c
src/tools.h

index 1e3b9b820cbc084b16472347f7180a478bfe27f5..5b4bb77eacb204c41e833e9491d38a97d145145f 100644 (file)
@@ -1 +1 @@
-#define COMPILE_DATE_STRING "[2002-09-14 02:41]"
+#define COMPILE_DATE_STRING "[2002-09-17 00:07]"
index a5620a017b0852734cf7f4998af10fabf0c098a9..a9773267571fb476c67543bd670d55bb6e6f5ccd 100644 (file)
@@ -2847,7 +2847,9 @@ void StartMoving(int x, int y)
       {
        TurnRound(x, y);
 
-       if (MovDelay[x][y] && (element == EL_KAEFER ||
+       if (MovDelay[x][y] && (element == EL_KAEFER))
+         DrawNewLevelField(x, y);
+       else if (MovDelay[x][y] && (element == EL_KAEFER ||
                               element == EL_FLIEGER ||
                               element == EL_SP_SNIKSNAK ||
                               element == EL_SP_ELECTRON ||
@@ -3130,19 +3132,37 @@ void StartMoving(int x, int y)
 
       TurnRound(x, y);
 
-      if (element == EL_KAEFER || element == EL_FLIEGER ||
-         element == EL_SP_SNIKSNAK || element == EL_MOLE)
+      if (element == EL_KAEFER)
+#if 0
        DrawLevelField(x, y);
+#else
+       DrawNewLevelField(x, y);
+#endif
+      else if (element == EL_KAEFER || element == EL_FLIEGER ||
+              element == EL_SP_SNIKSNAK || element == EL_MOLE)
+#if 1
+       DrawLevelField(x, y);
+#else
+       DrawNewLevelField(x, y);
+#endif
       else if (element == EL_BUTTERFLY || element == EL_FIREFLY)
+#if 0
        DrawGraphicAnimation(x, y, el2gfx(element), 2, 4, ANIM_NORMAL);
+#else
+       DrawNewGraphicAnimation(x, y, el2img(element));
+#endif
       else if (element == EL_SONDE)
 #if 0
        DrawGraphicAnimation(x, y, GFX_SONDE_START, 8, 2, ANIM_NORMAL);
 #else
-       DrawNewGraphicAnimation(x, y, IMG_SATELLITE_MOVING);
+       DrawNewGraphicAnimation(x, y, IMG_SATELLITE);
 #endif
       else if (element == EL_SP_ELECTRON)
+#if 0
        DrawGraphicAnimation(x, y, GFX2_SP_ELECTRON, 8, 2, ANIM_NORMAL);
+#else
+       DrawNewGraphicAnimation(x, y, IMG_SP_ELECTRON_MOVING);
+#endif
 
       if (DONT_TOUCH(element))
        TestIfBadThingTouchesHero(x, y);
@@ -3280,8 +3300,16 @@ void ContinueMoving(int x, int y)
     if (!CAN_MOVE(element))
       MovDir[newx][newy] = 0;
 
-    DrawLevelField(x, y);
-    DrawLevelField(newx, newy);
+    if (element == EL_KAEFER)
+    {
+      DrawNewLevelField(x, y);
+      DrawNewLevelField(newx, newy);
+    }
+    else
+    {
+      DrawLevelField(x, y);
+      DrawLevelField(newx, newy);
+    }
 
     Stop[newx][newy] = TRUE;
     JustStopped[newx][newy] = 3;
@@ -3300,7 +3328,12 @@ void ContinueMoving(int x, int y)
       Impact(x, newy);
   }
   else                         /* still moving on */
-    DrawLevelField(x, y);
+  {
+    if (element == EL_KAEFER)
+      DrawNewLevelField(x, y);
+    else
+      DrawLevelField(x, y);
+  }
 }
 
 int AmoebeNachbarNr(int ax, int ay)
index 9b553f1e419672c5990263cd805a235cb1ba70cf..e4d81d051b21daebac7f17c7fc7f2aaebf360c6f 100644 (file)
@@ -824,9 +824,94 @@ void InitElementInfo()
     { -1,                              -1                      }
   };
 
+  static struct
+  {
+    int element;
+    int graphic_left;
+    int graphic_right;
+    int graphic_up;
+    int graphic_down;
+  }
+  element_to_direction_graphic[] =
+  {
+    {
+      EL_FLIEGER,
+      IMG_SPACESHIP_LEFT,      IMG_SPACESHIP_RIGHT,
+      IMG_SPACESHIP_UP,                IMG_SPACESHIP_DOWN
+    },
+    {
+      EL_KAEFER,
+      IMG_BUG_LEFT,            IMG_BUG_RIGHT,
+      IMG_BUG_UP,              IMG_BUG_DOWN
+    },
+    {
+      EL_PACMAN,
+      IMG_PACMAN_LEFT,         IMG_PACMAN_RIGHT,
+      IMG_PACMAN_UP,           IMG_PACMAN_DOWN
+    },
+    {
+      EL_SPIELER1,
+      IMG_PLAYER1_LEFT,                IMG_PLAYER1_RIGHT,
+      IMG_PLAYER1_UP,          IMG_PLAYER1_DOWN
+    },
+    {
+      EL_SPIELER2,
+      IMG_PLAYER2_LEFT,                IMG_PLAYER2_RIGHT,
+      IMG_PLAYER2_UP,          IMG_PLAYER2_DOWN
+    },
+    {
+      EL_SPIELER3,
+      IMG_PLAYER3_LEFT,                IMG_PLAYER3_RIGHT,
+      IMG_PLAYER3_UP,          IMG_PLAYER3_DOWN
+    },
+    {
+      EL_SPIELER4,
+      IMG_PLAYER4_LEFT,                IMG_PLAYER4_RIGHT,
+      IMG_PLAYER4_UP,          IMG_PLAYER4_DOWN
+    },
+    {
+      EL_SCHWEIN,
+      IMG_PIG_LEFT,            IMG_PIG_RIGHT,
+      IMG_PIG_UP,              IMG_PIG_DOWN
+    },
+    {
+      EL_DRACHE,
+      IMG_DRAGON_LEFT,         IMG_DRAGON_RIGHT,
+      IMG_DRAGON_UP,           IMG_DRAGON_DOWN
+    },
+    {
+      EL_MOLE,
+      IMG_MOLE_LEFT,           IMG_MOLE_RIGHT,
+      IMG_MOLE_UP,             IMG_MOLE_DOWN
+    },
+    {
+      EL_PINGUIN,
+      IMG_PENGUIN_LEFT,                IMG_PENGUIN_RIGHT,
+      IMG_PENGUIN_UP,          IMG_PENGUIN_DOWN
+    },
+    {
+      EL_SP_MURPHY,
+      IMG_SP_MURPHY_LEFT,      IMG_SP_MURPHY_RIGHT,
+      IMG_SP_MURPHY_UP,                IMG_SP_MURPHY_DOWN
+    },
+    {
+      EL_SP_SNIKSNAK,
+      IMG_SP_SNIKSNAK_LEFT,    IMG_SP_SNIKSNAK_RIGHT,
+      IMG_SP_SNIKSNAK_UP,      IMG_SP_SNIKSNAK_DOWN
+    },
+    {
+      -1,
+      -1,                      -1,
+      -1,                      -1
+    }
+  };
+
   /* always start with reliable default values */
   for(i=0; i<MAX_ELEMENTS; i++)
+  {
     element_info[i].graphic = GFX_LEERRAUM;
+    element_info[i].has_direction_graphic = FALSE;
+  }
 
   for (i=EL_CHAR_START; i<=EL_CHAR_END; i++)
     element_info[i].graphic = GFX_CHAR_START + (i - EL_CHAR_START);
@@ -852,6 +937,25 @@ void InitElementInfo()
     element_info[element].graphic = graphic;
     i++;
   }
+
+  /* this initializes special graphics for left/right/up/down directions */
+  i = 0;
+  while (element_to_direction_graphic[i].element > -1)
+  {
+    int element = element_to_direction_graphic[i].element;
+    int graphic_left  = element_to_direction_graphic[i].graphic_left;
+    int graphic_right = element_to_direction_graphic[i].graphic_right;
+    int graphic_up    = element_to_direction_graphic[i].graphic_up;
+    int graphic_down  = element_to_direction_graphic[i].graphic_down;
+
+    element_info[element].direction_graphic[MV_BIT_LEFT]  = graphic_left;
+    element_info[element].direction_graphic[MV_BIT_RIGHT] = graphic_right;
+    element_info[element].direction_graphic[MV_BIT_UP]    = graphic_up;
+    element_info[element].direction_graphic[MV_BIT_DOWN]  = graphic_down;
+
+    element_info[element].has_direction_graphic = TRUE;
+    i++;
+  }
 }
 
 static void InitGraphicInfo()
index 9cebd02dda852d0c94755475d42a89589bcd2dc5..5072584ee6441e9e1cdd6d68513b701072ede24b 100644 (file)
 #define DEFAULT_KEY_TOGGLE_PAUSE KSYM_space
 
 /* values for move directions and special "button" keys */
+#define MV_BIT_LEFT            0
+#define MV_BIT_RIGHT           1
+#define MV_BIT_UP              2
+#define MV_BIT_DOWN            3
+
 #define MV_NO_MOVING           0
-#define MV_LEFT                        (1 << 0)
-#define MV_RIGHT               (1 << 1)
-#define MV_UP                  (1 << 2)
-#define MV_DOWN                        (1 << 3)
+#define MV_LEFT                        (1 << MV_BIT_LEFT)
+#define MV_RIGHT               (1 << MV_BIT_RIGHT)
+#define MV_UP                  (1 << MV_BIT_UP)
+#define MV_DOWN                        (1 << MV_BIT_DOWN)
 #define KEY_BUTTON_1           (1 << 4)
 #define KEY_BUTTON_2           (1 << 5)
 #define KEY_MOTION             (MV_LEFT | MV_RIGHT | MV_UP | MV_DOWN)
 #define KEY_BUTTON             (KEY_BUTTON_1 | KEY_BUTTON_2)
 #define KEY_ACTION             (KEY_MOTION | KEY_BUTTON)
 
+#define LOG_MV_DIR(x)          ((x) == MV_LEFT  ? MV_BIT_LEFT  :       \
+                                (x) == MV_RIGHT ? MV_BIT_RIGHT :       \
+                                (x) == MV_UP    ? MV_BIT_UP    : MV_BIT_DOWN)
+
 /* values for button status */
 #define MB_NOT_PRESSED         FALSE
 #define MB_NOT_RELEASED                TRUE
index 1a9cf362f44b760e83ccfa838c6031e20b7e31fe..227c35763c7487ffc2839b7fc2c41396bab56636 100644 (file)
@@ -160,7 +160,7 @@ struct ConfigInfo image_config[] =
   /* images for Emerald Mine style elements and actions */
   { "empty_space",                             "RocksElements.pcx"     },
   { "empty_space.xpos",                                "7"                     },
-  { "empty_space.ypos",                                "10"                    },
+  { "empty_space.ypos",                                "9"                     },
   { "empty_space.frames",                      "1"                     },
 
   { "sand",                                    "RocksElements.pcx"     },
@@ -180,6 +180,10 @@ struct ConfigInfo image_config[] =
   { "quicksand_full.xpos",                     "3"                     },
   { "quicksand_full.ypos",                     "0"                     },
   { "quicksand_full.frames",                   "1"                     },
+  { "quicksand_slipping_through",              "RocksElements.pcx"     },
+  { "quicksand_slipping_through.xpos",         "3"                     },
+  { "quicksand_slipping_through.ypos",         "0"                     },
+  { "quicksand_slipping_through.frames",       "1"                     },
 
   { "steelwall",                               "RocksElements.pcx"     },
   { "steelwall.xpos",                          "4"                     },
@@ -356,18 +360,22 @@ struct ConfigInfo image_config[] =
   { "bug_right.xpos",                          "8"                     },
   { "bug_right.ypos",                          "4"                     },
   { "bug_right.frames",                                "2"                     },
+  { "bug_right.delay",                         "4"                     },
   { "bug_up",                                  "RocksElements.pcx"     },
   { "bug_up.xpos",                             "10"                    },
   { "bug_up.ypos",                             "4"                     },
   { "bug_up.frames",                           "2"                     },
+  { "bug_up.delay",                            "4"                     },
   { "bug_left",                                        "RocksElements.pcx"     },
   { "bug_left.xpos",                           "12"                    },
   { "bug_left.ypos",                           "4"                     },
   { "bug_left.frames",                         "2"                     },
+  { "bug_left.delay",                          "4"                     },
   { "bug_down",                                        "RocksElements.pcx"     },
   { "bug_down.xpos",                           "14"                    },
   { "bug_down.ypos",                           "4"                     },
   { "bug_down.frames",                         "2"                     },
+  { "bug_down.delay",                          "4"                     },
 
   { "pacman_right",                            "RocksElements.pcx"     },
   { "pacman_right.xpos",                       "8"                     },
@@ -396,6 +404,10 @@ struct ConfigInfo image_config[] =
   { "yamyam.ypos",                             "5"                     },
   { "yamyam.frames",                           "4"                     },
   { "yamyam.pingpong",                         "1"                     },
+  { "yamyam.moving",                           "RocksElements.pcx"     },
+  { "yamyam.moving.xpos",                      "0"                     },
+  { "yamyam.moving.ypos",                      "5"                     },
+  { "yamyam.moving.frames",                    "1"                     },
 
   { "robot",                                   "RocksElements.pcx"     },
   { "robot.xpos",                              "4"                     },
@@ -625,6 +637,18 @@ struct ConfigInfo image_config[] =
   { "arrow_down.ypos",                         "12"                    },
   { "arrow_down.frames",                       "1"                     },
 
+  { "bd_butterfly",                            "RocksElements.pcx"     },
+  { "bd_butterfly.xpos",                       "4"                     },
+  { "bd_butterfly.ypos",                       "12"                    },
+  { "bd_butterfly.frames",                     "2"                     },
+  { "bd_butterfly.pingpong",                   "1"                     },
+  { "bd_butterfly.delay",                      "4"                     },
+  { "bd_butterfly.moving",                     "RocksElements.pcx"     },
+  { "bd_butterfly.moving.xpos",                        "4"                     },
+  { "bd_butterfly.moving.ypos",                        "12"                    },
+  { "bd_butterfly.moving.frames",              "2"                     },
+  { "bd_butterfly.moving.pingpong",            "1"                     },
+  { "bd_butterfly.moving.delay",               "4"                     },
   { "bd_butterfly_right",                      "RocksElements.pcx"     },
   { "bd_butterfly_right.xpos",                 "8"                     },
   { "bd_butterfly_right.ypos",                 "12"                    },
@@ -641,12 +665,19 @@ struct ConfigInfo image_config[] =
   { "bd_butterfly_down.xpos",                  "11"                    },
   { "bd_butterfly_down.ypos",                  "12"                    },
   { "bd_butterfly_down.frames",                        "1"                     },
-  { "bd_butterfly.moving",                     "RocksElements.pcx"     },
-  { "bd_butterfly.moving.xpos",                        "4"                     },
-  { "bd_butterfly.moving.ypos",                        "12"                    },
-  { "bd_butterfly.moving.frames",              "2"                     },
-  { "bd_butterfly.moving.pingpong",            "1"                     },
 
+  { "bd_firefly",                              "RocksElements.pcx"     },
+  { "bd_firefly.xpos",                         "6"                     },
+  { "bd_firefly.ypos",                         "12"                    },
+  { "bd_firefly.frames",                       "2"                     },
+  { "bd_firefly.pingpong",                     "1"                     },
+  { "bd_firefly.delay",                                "4"                     },
+  { "bd_firefly.moving",                       "RocksElements.pcx"     },
+  { "bd_firefly.moving.xpos",                  "6"                     },
+  { "bd_firefly.moving.ypos",                  "12"                    },
+  { "bd_firefly.moving.frames",                        "2"                     },
+  { "bd_firefly.moving.pingpong",              "1"                     },
+  { "bd_firefly.moving.delay",                 "4"                     },
   { "bd_firefly_right",                                "RocksElements.pcx"     },
   { "bd_firefly_right.xpos",                   "12"                    },
   { "bd_firefly_right.ypos",                   "12"                    },
@@ -663,11 +694,6 @@ struct ConfigInfo image_config[] =
   { "bd_firefly_down.xpos",                    "15"                    },
   { "bd_firefly_down.ypos",                    "12"                    },
   { "bd_firefly_down.frames",                  "1"                     },
-  { "bd_firefly.moving",                       "RocksElements.pcx"     },
-  { "bd_firefly.moving.xpos",                  "6"                     },
-  { "bd_firefly.moving.ypos",                  "12"                    },
-  { "bd_firefly.moving.frames",                        "2"                     },
-  { "bd_firefly.moving.pingpong",              "1"                     },
 
   { "steelwall_topleft",                       "RocksElements.pcx"     },
   { "steelwall_topleft.xpos",                  "0"                     },
@@ -1142,7 +1168,8 @@ struct ConfigInfo image_config[] =
   { "satellite",                               "RocksHeroes.pcx"       },
   { "satellite.xpos",                          "8"                     },
   { "satellite.ypos",                          "9"                     },
-  { "satellite.frames",                                "1"                     },
+  { "satellite.frames",                                "8"                     },
+  { "satellite.moving.delay",                  "2"                     },
   { "satellite.moving",                                "RocksHeroes.pcx"       },
   { "satellite.moving.xpos",                   "8"                     },
   { "satellite.moving.ypos",                   "9"                     },
@@ -1496,13 +1523,15 @@ struct ConfigInfo image_config[] =
   { "sp_sniksnak_down.moving.pingpong",                "1"                     },
 
   { "sp_electron",                             "RocksSP.pcx"           },
-  { "sp_electron.xpos",                                "0"                     },
-  { "sp_electron.ypos",                                "3"                     },
-  { "sp_electron.frames",                      "1"                     },
+  { "sp_electron.xpos",                                "8"                     },
+  { "sp_electron.ypos",                                "10"                    },
+  { "sp_electron.frames",                      "8"                     },
+  { "sp_electron.delay",                       "2"                     },
   { "sp_electron.moving",                      "RocksSP.pcx"           },
   { "sp_electron.moving.xpos",                 "8"                     },
   { "sp_electron.moving.ypos",                 "10"                    },
   { "sp_electron.moving.frames",               "8"                     },
+  { "sp_electron.delay",                       "2"                     },
 
   { "sp_terminal",                             "RocksSP.pcx"           },
   { "sp_terminal.xpos",                                "3"                     },
index 4cc2417475ef0b22e500b6d2519fc1f6775d99ad..823a230fe7cccf5526f109dec2c185b259f477c4 100644 (file)
@@ -347,6 +347,8 @@ struct ElementInfo
   char *editor_description;    /* short description for level editor */
 
   int graphic;
+  int direction_graphic[4];    /* special graphics for left/right/up/down */
+  boolean has_direction_graphic;
 };
 
 struct GraphicInfo
@@ -1489,460 +1491,464 @@ extern struct FileInfo               *image_files, *sound_files;
 #define IMG_SAND_CRUMBLED                      2
 #define IMG_QUICKSAND_EMPTY                    3
 #define IMG_QUICKSAND_FULL                     4
-#define IMG_STEELWALL                          5
-#define IMG_WALL                               6
-#define IMG_WALL_CRUMBLED                      7
-#define IMG_EMERALD                            8
-#define IMG_EMERALD_FALLING                    9
-#define IMG_DIAMOND                            10
-#define IMG_DIAMOND_FALLING                    11
-#define IMG_ROCK                               12
-#define IMG_ROCK_FALLING                       13
-#define IMG_ROCK_PUSHING                       14
-#define IMG_ACIDPOOL_TOPLEFT                   15
-#define IMG_ACIDPOOL_TOPRIGHT                  16
-#define IMG_ACIDPOOL_BOTTOMLEFT                        17
-#define IMG_ACIDPOOL_BOTTOM                    18
-#define IMG_ACIDPOOL_BOTTOMRIGHT               19
-#define IMG_ACID                               20
-#define IMG_KEY1                               21
-#define IMG_KEY2                               22
-#define IMG_KEY3                               23
-#define IMG_KEY4                               24
-#define IMG_GAMEOFLIFE                         25
-#define IMG_BIOMAZE                            26
-#define IMG_BOMB                               27
-#define IMG_NUT                                        28
-#define IMG_NUT_CRACKING                       29
-#define IMG_GATE1                              30
-#define IMG_GATE2                              31
-#define IMG_GATE3                              32
-#define IMG_GATE4                              33
-#define IMG_GATE1_GRAY                         34
-#define IMG_GATE2_GRAY                         35
-#define IMG_GATE3_GRAY                         36
-#define IMG_GATE4_GRAY                         37
-#define IMG_DYNAMITE                           38
-#define IMG_DYNAMITE_BURNING                   39
-#define IMG_SPACESHIP_RIGHT                    40
-#define IMG_SPACESHIP_UP                       41
-#define IMG_SPACESHIP_LEFT                     42
-#define IMG_SPACESHIP_DOWN                     43
-#define IMG_BUG_RIGHT                          44
-#define IMG_BUG_UP                             45
-#define IMG_BUG_LEFT                           46
-#define IMG_BUG_DOWN                           47
-#define IMG_PACMAN_RIGHT                       48
-#define IMG_PACMAN_UP                          49
-#define IMG_PACMAN_LEFT                                50
-#define IMG_PACMAN_DOWN                                51
-#define IMG_EXPLOSION                          52
-#define IMG_YAMYAM                             53
-#define IMG_ROBOT                              54
-#define IMG_ROBOT_WHEEL                                55
-#define IMG_AMOEBA_DROP                                56
-#define IMG_AMOEBA_GROWING                     57
-#define IMG_AMOEBA                             58
-#define IMG_AMOEBA_DEAD                                59
-#define IMG_LAMP_OFF                           60
-#define IMG_LAMP_ON                            61
-#define IMG_TIME_ORB_FULL                      62
-#define IMG_TIME_ORB_EMPTY                     63
-#define IMG_BD_AMOEBA                          64
-#define IMG_SOKOBAN_OBJECT                     65
-#define IMG_SOKOBAN_FIELD_EMPTY                        66
-#define IMG_SOKOBAN_FIELD_FULL                 67
-#define IMG_MAGIC_WALL                         68
-#define IMG_MAGIC_WALL_RUNNING                 69
-#define IMG_BD_MAGIC_WALL                      70
-#define IMG_BD_MAGIC_WALL_RUNNING              71
-#define IMG_WALL_EMERALD                       72
-#define IMG_WALL_DIAMOND                       73
-#define IMG_WALL_EMERALD_RED                   74
-#define IMG_WALL_EMERALD_PURPLE                        75
-#define IMG_WALL_EMERALD_YELLOW                        76
-#define IMG_WALL_BD_DIAMOND                    77
-#define IMG_EMERALD_RED                                78
-#define IMG_EMERALD_RED_FALLING                        79
-#define IMG_EMERALD_PURPLE                     80
-#define IMG_EMERALD_PURPLE_FALLING             81
-#define IMG_EMERALD_YELLOW                     82
-#define IMG_EMERALD_YELLOW_FALLING             83
-#define IMG_WALL_GROWING_XY                    84
-#define IMG_WALL_GROWING_X                     85
-#define IMG_WALL_GROWING_                    86
-#define IMG_DYNABOMB_XL                                87
-#define IMG_BLACK_ORB                          88
-#define IMG_SPEED_PILL                         89
-#define IMG_BD_DIAMOND                         90
-#define IMG_BD_DIAMOND_FALLING                 91
-#define IMG_WALL_GROWING_RIGHT                 92
-#define IMG_WALL_GROWING_LEFT                  93
-#define IMG_EXIT_CLOSED                                94
-#define IMG_EXIT_OPENING                       95
-#define IMG_EXIT_OPEN                          96
-#define IMG_DARK_YAMYAM                                97
-#define IMG_DYNABOMB_BURNING                   98
-#define IMG_DYNABOMB_NR                                99
-#define IMG_DYNABOMB_SZ                                100
-#define IMG_ARROW_LEFT                         101
-#define IMG_ARROW_RIGHT                                102
-#define IMG_ARROW_UP                           103
-#define IMG_ARROW_DOWN                         104
-#define IMG_BD_BUTTERFLY_RIGHT                 105
-#define IMG_BD_BUTTERFLY_UP                    106
-#define IMG_BD_BUTTERFLY_LEFT                  107
-#define IMG_BD_BUTTERFLY_DOWN                  108
-#define IMG_BD_BUTTERFLY_MOVING                        109
-#define IMG_BD_FIREFLY_RIGHT                   110
-#define IMG_BD_FIREFLY_UP                      111
-#define IMG_BD_FIREFLY_LEFT                    112
-#define IMG_BD_FIREFLY_DOWN                    113
+#define IMG_QUICKSAND_SLIPPING_THROUGH         5
+#define IMG_STEELWALL                          6
+#define IMG_WALL                               7
+#define IMG_WALL_CRUMBLED                      8
+#define IMG_EMERALD                            9
+#define IMG_EMERALD_FALLING                    10
+#define IMG_DIAMOND                            11
+#define IMG_DIAMOND_FALLING                    12
+#define IMG_ROCK                               13
+#define IMG_ROCK_FALLING                       14
+#define IMG_ROCK_PUSHING                       15
+#define IMG_ACIDPOOL_TOPLEFT                   16
+#define IMG_ACIDPOOL_TOPRIGHT                  17
+#define IMG_ACIDPOOL_BOTTOMLEFT                        18
+#define IMG_ACIDPOOL_BOTTOM                    19
+#define IMG_ACIDPOOL_BOTTOMRIGHT               20
+#define IMG_ACID                               21
+#define IMG_KEY1                               22
+#define IMG_KEY2                               23
+#define IMG_KEY3                               24
+#define IMG_KEY4                               25
+#define IMG_GAMEOFLIFE                         26
+#define IMG_BIOMAZE                            27
+#define IMG_BOMB                               28
+#define IMG_NUT                                        29
+#define IMG_NUT_CRACKING                       30
+#define IMG_GATE1                              31
+#define IMG_GATE2                              32
+#define IMG_GATE3                              33
+#define IMG_GATE4                              34
+#define IMG_GATE1_GRAY                         35
+#define IMG_GATE2_GRAY                         36
+#define IMG_GATE3_GRAY                         37
+#define IMG_GATE4_GRAY                         38
+#define IMG_DYNAMITE                           39
+#define IMG_DYNAMITE_BURNING                   40
+#define IMG_SPACESHIP_RIGHT                    41
+#define IMG_SPACESHIP_UP                       42
+#define IMG_SPACESHIP_LEFT                     43
+#define IMG_SPACESHIP_DOWN                     44
+#define IMG_BUG_RIGHT                          45
+#define IMG_BUG_UP                             46
+#define IMG_BUG_LEFT                           47
+#define IMG_BUG_DOWN                           48
+#define IMG_PACMAN_RIGHT                       49
+#define IMG_PACMAN_UP                          50
+#define IMG_PACMAN_LEFT                                51
+#define IMG_PACMAN_DOWN                                52
+#define IMG_EXPLOSION                          53
+#define IMG_YAMYAM                             54
+#define IMG_YAMYAM_MOVING                      55
+#define IMG_ROBOT                              56
+#define IMG_ROBOT_WHEEL                                57
+#define IMG_AMOEBA_DROP                                58
+#define IMG_AMOEBA_GROWING                     59
+#define IMG_AMOEBA                             60
+#define IMG_AMOEBA_DEAD                                61
+#define IMG_LAMP_OFF                           62
+#define IMG_LAMP_ON                            63
+#define IMG_TIME_ORB_FULL                      64
+#define IMG_TIME_ORB_EMPTY                     65
+#define IMG_BD_AMOEBA                          66
+#define IMG_SOKOBAN_OBJECT                     67
+#define IMG_SOKOBAN_FIELD_EMPTY                        68
+#define IMG_SOKOBAN_FIELD_FULL                 69
+#define IMG_MAGIC_WALL                         70
+#define IMG_MAGIC_WALL_RUNNING                 71
+#define IMG_BD_MAGIC_WALL                      72
+#define IMG_BD_MAGIC_WALL_RUNNING              73
+#define IMG_WALL_EMERALD                       74
+#define IMG_WALL_DIAMOND                       75
+#define IMG_WALL_EMERALD_RED                   76
+#define IMG_WALL_EMERALD_PURPLE                        77
+#define IMG_WALL_EMERALD_YELLOW                        78
+#define IMG_WALL_BD_DIAMOND                    79
+#define IMG_EMERALD_RED                                80
+#define IMG_EMERALD_RED_FALLING                        81
+#define IMG_EMERALD_PURPLE                     82
+#define IMG_EMERALD_PURPLE_FALLING             83
+#define IMG_EMERALD_YELLOW                     84
+#define IMG_EMERALD_YELLOW_FALLING             85
+#define IMG_WALL_GROWING_XY                    86
+#define IMG_WALL_GROWING_X                     87
+#define IMG_WALL_GROWING_Y                     88
+#define IMG_DYNABOMB_XL                                89
+#define IMG_BLACK_ORB                          90
+#define IMG_SPEED_PILL                         91
+#define IMG_BD_DIAMOND                         92
+#define IMG_BD_DIAMOND_FALLING                 93
+#define IMG_WALL_GROWING_RIGHT                 94
+#define IMG_WALL_GROWING_LEFT                  95
+#define IMG_EXIT_CLOSED                                96
+#define IMG_EXIT_OPENING                       97
+#define IMG_EXIT_OPEN                          98
+#define IMG_DARK_YAMYAM                                99
+#define IMG_DYNABOMB_BURNING                   100
+#define IMG_DYNABOMB_NR                                101
+#define IMG_DYNABOMB_SZ                                102
+#define IMG_ARROW_LEFT                         103
+#define IMG_ARROW_RIGHT                                104
+#define IMG_ARROW_UP                           105
+#define IMG_ARROW_DOWN                         106
+#define IMG_BD_BUTTERFLY                       107
+#define IMG_BD_BUTTERFLY_MOVING                        108
+#define IMG_BD_BUTTERFLY_RIGHT                 109
+#define IMG_BD_BUTTERFLY_UP                    110
+#define IMG_BD_BUTTERFLY_LEFT                  111
+#define IMG_BD_BUTTERFLY_DOWN                  112
+#define IMG_BD_FIREFLY                         113
 #define IMG_BD_FIREFLY_MOVING                  114
-#define IMG_STEELWALL_TOPLEFT                  115
-#define IMG_STEELWALL_TOPRIGHT                 116
-#define IMG_STEELWALL_BOTTOMLEFT               117
-#define IMG_STEELWALL_BOTTOMRIGHT              118
-#define IMG_STEELWALL_HORIZONTAL               119
-#define IMG_INVISIBLE_STEELWALL_TOPLEFT                120
-#define IMG_INVISIBLE_STEELWALL_TOPRIGHT       121
-#define IMG_INVISIBLE_STEELWALL_BOTTOMLEFT     122
-#define IMG_INVISIBLE_STEELWALL_BOTTOMRIGHT    123
-#define IMG_INVISIBLE_STEELWALL_HORIZONTAL     124
-#define IMG_PLAYER1_DOWN                       125
-#define IMG_PLAYER1_DOWN_MOVING                        126
-#define IMG_PLAYER1_DOWN_DIGGING               127
-#define IMG_PLAYER1_UP                         128
-#define IMG_PLAYER1_UP_MOVING                  129
-#define IMG_PLAYER1_UP_DIGGING                 130
-#define IMG_PLAYER1_LEFT                       131
-#define IMG_PLAYER1_LEFT_MOVING                        132
-#define IMG_PLAYER1_LEFT_DIGGING               133
-#define IMG_PLAYER1_LEFT_PUSHING               134
-#define IMG_PLAYER1_RIGHT                      135
-#define IMG_PLAYER1_RIGHT_MOVING               136
-#define IMG_PLAYER1_RIGHT_DIGGING              137
-#define IMG_PLAYER1_RIGHT_PUSHING              138
-#define IMG_PLAYER2_DOWN                       139
-#define IMG_PLAYER2_DOWN_MOVING                        140
-#define IMG_PLAYER2_DOWN_DIGGING               141
-#define IMG_PLAYER2_UP                         142
-#define IMG_PLAYER2_UP_MOVING                  143
-#define IMG_PLAYER2_UP_DIGGING                 144
-#define IMG_PLAYER2_LEFT                       145
-#define IMG_PLAYER2_LEFT_MOVING                        146
-#define IMG_PLAYER2_LEFT_DIGGING               147
-#define IMG_PLAYER2_LEFT_PUSHING               148
-#define IMG_PLAYER2_RIGHT                      149
-#define IMG_PLAYER2_RIGHT_MOVING               150
-#define IMG_PLAYER2_RIGHT_DIGGING              151
-#define IMG_PLAYER2_RIGHT_PUSHING              152
-#define IMG_PLAYER3_DOWN                       153
-#define IMG_PLAYER3_DOWN_MOVING                        154
-#define IMG_PLAYER3_DOWN_DIGGING               155
-#define IMG_PLAYER3_UP                         156
-#define IMG_PLAYER3_UP_MOVING                  157
-#define IMG_PLAYER3_UP_DIGGING                 158
-#define IMG_PLAYER3_LEFT                       159
-#define IMG_PLAYER3_LEFT_MOVING                        160
-#define IMG_PLAYER3_LEFT_DIGGING               161
-#define IMG_PLAYER3_LEFT_PUSHING               162
-#define IMG_PLAYER3_RIGHT                      163
-#define IMG_PLAYER3_RIGHT_MOVING               164
-#define IMG_PLAYER3_RIGHT_DIGGING              165
-#define IMG_PLAYER3_RIGHT_PUSHING              166
-#define IMG_PLAYER4_DOWN                       167
-#define IMG_PLAYER4_DOWN_MOVING                        168
-#define IMG_PLAYER4_DOWN_DIGGING               169
-#define IMG_PLAYER4_UP                         170
-#define IMG_PLAYER4_UP_MOVING                  171
-#define IMG_PLAYER4_UP_DIGGING                 172
-#define IMG_PLAYER4_LEFT                       173
-#define IMG_PLAYER4_LEFT_MOVING                        174
-#define IMG_PLAYER4_LEFT_DIGGING               175
-#define IMG_PLAYER4_LEFT_PUSHING               176
-#define IMG_PLAYER4_RIGHT                      177
-#define IMG_PLAYER4_RIGHT_MOVING               178
-#define IMG_PLAYER4_RIGHT_DIGGING              179
-#define IMG_PLAYER4_RIGHT_PUSHING              180
-#define IMG_WALL_GROWING_DOWN                  181
-#define IMG_WALL_GROWING_UP                    182
-#define IMG_SHIELD_PASSIVE_ACTIVATED           183
-#define IMG_SHIELD_ACTIVE_ACTIVATED            184
-#define IMG_PIG_DOWN                           185
-#define IMG_PIG_DOWN_MOVING                    186
-#define IMG_PIG_DOWN_EATING                    187
-#define IMG_PIG_UP                             188
-#define IMG_PIG_UP_MOVING                      189
-#define IMG_PIG_UP_EATING                      190
-#define IMG_PIG_LEFT                           191
-#define IMG_PIG_LEFT_MOVING                    192
-#define IMG_PIG_LEFT_EATING                    193
-#define IMG_PIG_RIGHT                          194
-#define IMG_PIG_RIGHT_MOVING                   195
-#define IMG_PIG_RIGHT_EATING                   196
-#define IMG_DRAGON_DOWN                                197
-#define IMG_DRAGON_DOWN_MOVING                 198
-#define IMG_DRAGON_DOWN_ATTACKING              199
-#define IMG_DRAGON_UP                          200
-#define IMG_DRAGON_UP_MOVING                   201
-#define IMG_DRAGON_UP_ATTACKING                        202
-#define IMG_DRAGON_LEFT                                203
-#define IMG_DRAGON_LEFT_MOVING                 204
-#define IMG_DRAGON_LEFT_ATTACKING              205
-#define IMG_DRAGON_RIGHT                       206
-#define IMG_DRAGON_RIGHT_MOVING                        207
-#define IMG_DRAGON_RIGHT_ATTACKING             208
-#define IMG_MOLE_DOWN                          209
-#define IMG_MOLE_DOWN_MOVING                   210
-#define IMG_MOLE_DOWN_DIGGING                  211
-#define IMG_MOLE_UP                            212
-#define IMG_MOLE_UP_MOVING                     213
-#define IMG_MOLE_UP_DIGGING                    214
-#define IMG_MOLE_LEFT                          215
-#define IMG_MOLE_LEFT_MOVING                   216
-#define IMG_MOLE_LEFT_DIGGING                  217
-#define IMG_MOLE_RIGHT                         218
-#define IMG_MOLE_RIGHT_MOVING                  219
-#define IMG_MOLE_RIGHT_DIGGING                 220
-#define IMG_PENGUIN_DOWN                       221
-#define IMG_PENGUIN_DOWN_MOVING                        222
-#define IMG_PENGUIN_UP                         223
-#define IMG_PENGUIN_UP_MOVING                  224
-#define IMG_PENGUIN_LEFT                       225
-#define IMG_PENGUIN_LEFT_MOVING                        226
-#define IMG_PENGUIN_RIGHT                      227
-#define IMG_PENGUIN_RIGHT_MOVING               228
-#define IMG_SATELLITE                          229
-#define IMG_SATELLITE_MOVING                   230
-#define IMG_ACID_SPLASHING_LEFT                        231
-#define IMG_ACID_SPLASHING_RIGHT               232
-#define IMG_SPARKLING_BLUE                     233
-#define IMG_SPARKLING_WHITE                    234
-#define IMG_FLAMES_LEFT1                       235
-#define IMG_FLAMES_LEFT2                       236
-#define IMG_FLAMES_LEFT3                       237
-#define IMG_FLAMES_RIGHT1                      238
-#define IMG_FLAMES_RIGHT2                      239
-#define IMG_FLAMES_RIGHT3                      240
-#define IMG_FLAMES_UP1                         241
-#define IMG_FLAMES_UP2                         242
-#define IMG_FLAMES_UP3                         243
-#define IMG_FLAMES_DOWN1                       244
-#define IMG_FLAMES_DOWN2                       245
-#define IMG_FLAMES_DOWN3                       246
-#define IMG_SP_EMPTY_SPACE                     247
-#define IMG_SP_ZONK                            248
-#define IMG_SP_ZONK_FALLING                    249
-#define IMG_SP_ZONK_PUSHING                    250
-#define IMG_SP_BASE                            251
-#define IMG_SP_MURPHY                          252
-#define IMG_SP_MURPHY_LEFT                     253
-#define IMG_SP_MURPHY_LEFT_MOVING              254
-#define IMG_SP_MURPHY_LEFT_DIGGING             255
-#define IMG_SP_MURPHY_LEFT_PUSHING             256
-#define IMG_SP_MURPHY_LEFT_SNAPPING            257
-#define IMG_SP_MURPHY_RIGHT                    258
-#define IMG_SP_MURPHY_RIGHT_MOVING             259
-#define IMG_SP_MURPHY_RIGHT_DIGGING            260
-#define IMG_SP_MURPHY_RIGHT_PUSHING            261
-#define IMG_SP_MURPHY_RIGHT_SNAPPING           262
-#define IMG_SP_MURPHY_UP                       263
-#define IMG_SP_MURPHY_UP_SNAPPING              264
-#define IMG_SP_MURPHY_DOWN                     265
-#define IMG_SP_MURPHY_DOWN_SNAPPING            266
-#define IMG_SP_MURPHY_CLONE                    267
-#define IMG_SP_INFOTRON                                268
-#define IMG_SP_INFOTRON_FALLING                        269
-#define IMG_SP_CHIP_SINGLE                     270
-#define IMG_SP_CHIP_LEFT                       271
-#define IMG_SP_CHIP_RIGHT                      272
-#define IMG_SP_CHIP_UPPER                      273
-#define IMG_SP_CHIP_LOWER                      274
-#define IMG_SP_HARD_GRAY                       275
-#define IMG_SP_HARD_GREEN                      276
-#define IMG_SP_HARD_BLUE                       277
-#define IMG_SP_HARD_RED                                278
-#define IMG_SP_HARD_YELLOW                     279
-#define IMG_SP_EXIT_CLOSED                     280
-#define IMG_SP_EXIT_OPEN                       281
-#define IMG_SP_DISK_ORANGE                     282
-#define IMG_SP_DISK_ORANGE_FALLING             283
-#define IMG_SP_DISK_ORANGE_PUSHING             284
-#define IMG_SP_DISK_YELLOW                     285
-#define IMG_SP_DISK_YELLOW_PUSHING             286
-#define IMG_SP_DISK_RED                                287
-#define IMG_SP_DISK_RED_COLLECTING             288
-#define IMG_SP_PORT1_RIGHT                     289
-#define IMG_SP_PORT1_DOWN                      290
-#define IMG_SP_PORT1_LEFT                      291
-#define IMG_SP_PORT1_UP                                292
-#define IMG_SP_PORT2_RIGHT                     293
-#define IMG_SP_PORT2_DOWN                      294
-#define IMG_SP_PORT2_LEFT                      295
-#define IMG_SP_PORT2_UP                                296
-#define IMG_SP_PORT_X                          297
-#define IMG_SP_PORT_Y                          298
-#define IMG_SP_PORT_XY                         299
-#define IMG_SP_SNIKSNAK                                300
-#define IMG_SP_SNIKSNAK_LEFT                   301
-#define IMG_SP_SNIKSNAK_LEFT_MOVING            302
-#define IMG_SP_SNIKSNAK_RIGHT                  303
-#define IMG_SP_SNIKSNAK_RIGHT_MOVING           304
-#define IMG_SP_SNIKSNAK_UP                     305
-#define IMG_SP_SNIKSNAK_UP_MOVING              306
-#define IMG_SP_SNIKSNAK_DOWN                   307
-#define IMG_SP_SNIKSNAK_DOWN_MOVING            308
-#define IMG_SP_ELECTRON                                309
-#define IMG_SP_ELECTRON_MOVING                 310
-#define IMG_SP_TERMINAL                                311
-#define IMG_SP_TERMINAL_RUNNING                        312
-#define IMG_SP_TERMINAL_ACTIVE                 313
-#define IMG_SP_TERMINAL_ACTIVE_RUNNING         314
-#define IMG_SP_BUGGY_BASE                      315
-#define IMG_SP_BUGGY_BASE_ACTIVATING           316
-#define IMG_SP_HARD_BASE1                      317
-#define IMG_SP_HARD_BASE2                      318
-#define IMG_SP_HARD_BASE3                      319
-#define IMG_SP_HARD_BASE4                      320
-#define IMG_SP_HARD_BASE5                      321
-#define IMG_SP_HARD_BASE6                      322
-#define IMG_INVISIBLE_STEELWALL                        323
-#define IMG_INVISIBLE_STEELWALL_ON             324
-#define IMG_INVISIBLE_SAND                     325
-#define IMG_INVISIBLE_SAND_ON                  326
-#define IMG_INVISIBLE_WALL                     327
-#define IMG_INVISIBLE_WALL_ON                  328
-#define IMG_EM_KEY1                            329
-#define IMG_EM_KEY2                            330
-#define IMG_EM_KEY3                            331
-#define IMG_EM_KEY4                            332
-#define IMG_EM_GATE1                           333
-#define IMG_EM_GATE2                           334
-#define IMG_EM_GATE3                           335
-#define IMG_EM_GATE4                           336
-#define IMG_EM_GATE1_GRAY                      337
-#define IMG_EM_GATE2_GRAY                      338
-#define IMG_EM_GATE3_GRAY                      339
-#define IMG_EM_GATE4_GRAY                      340
-#define IMG_SP_EXPLOSION                       341
-#define IMG_SP_EXPLOSION_INFOTRON              342
-#define IMG_CONVEYOR_BELT1_MIDDLE              343
-#define IMG_CONVEYOR_BELT1_MIDDLE_RUNNING      344
-#define IMG_CONVEYOR_BELT1_LEFT                        345
-#define IMG_CONVEYOR_BELT1_LEFT_RUNNING                346
-#define IMG_CONVEYOR_BELT1_RIGHT               347
-#define IMG_CONVEYOR_BELT1_RIGHT_RUNNING       348
-#define IMG_CONVEYOR_BELT1_SWITCH_LEFT         349
-#define IMG_CONVEYOR_BELT1_SWITCH_MIDDLE       350
-#define IMG_CONVEYOR_BELT1_SWITCH_RIGHT                351
-#define IMG_CONVEYOR_BELT2_MIDDLE              352
-#define IMG_CONVEYOR_BELT2_MIDDLE_RUNNING      353
-#define IMG_CONVEYOR_BELT2_LEFT                        354
-#define IMG_CONVEYOR_BELT2_LEFT_RUNNING                355
-#define IMG_CONVEYOR_BELT2_RIGHT               356
-#define IMG_CONVEYOR_BELT2_RIGHT_RUNNING       357
-#define IMG_CONVEYOR_BELT2_SWITCH_LEFT         358
-#define IMG_CONVEYOR_BELT2_SWITCH_MIDDLE       359
-#define IMG_CONVEYOR_BELT2_SWITCH_RIGHT                360
-#define IMG_CONVEYOR_BELT3_MIDDLE              361
-#define IMG_CONVEYOR_BELT3_MIDDLE_RUNNING      362
-#define IMG_CONVEYOR_BELT3_LEFT                        363
-#define IMG_CONVEYOR_BELT3_LEFT_RUNNING                364
-#define IMG_CONVEYOR_BELT3_RIGHT               365
-#define IMG_CONVEYOR_BELT3_RIGHT_RUNNING       366
-#define IMG_CONVEYOR_BELT3_SWITCH_LEFT         367
-#define IMG_CONVEYOR_BELT3_SWITCH_MIDDLE       368
-#define IMG_CONVEYOR_BELT3_SWITCH_RIGHT                369
-#define IMG_CONVEYOR_BELT4_MIDDLE              370
-#define IMG_CONVEYOR_BELT4_MIDDLE_RUNNING      371
-#define IMG_CONVEYOR_BELT4_LEFT                        372
-#define IMG_CONVEYOR_BELT4_LEFT_RUNNING                373
-#define IMG_CONVEYOR_BELT4_RIGHT               374
-#define IMG_CONVEYOR_BELT4_RIGHT_RUNNING       375
-#define IMG_CONVEYOR_BELT4_SWITCH_LEFT         376
-#define IMG_CONVEYOR_BELT4_SWITCH_MIDDLE       377
-#define IMG_CONVEYOR_BELT4_SWITCH_RIGHT                378
-#define IMG_SWITCHGATE_SWITCH_UP               379
-#define IMG_SWITCHGATE_SWITCH_DOWN             380
-#define IMG_LIGHT_SWITCH_OFF                   381
-#define IMG_LIGHT_SWITCH_ON                    382
-#define IMG_TIMEGATE_WHEEL                     383
-#define IMG_TIMEGATE_WHEEL_RUNNING             384
-#define IMG_ENVELOPE                           385
-#define IMG_SIGN_EXCLAMATION                   386
-#define IMG_SIGN_STOP                          387
-#define IMG_LANDMINE                           388
-#define IMG_STEELWALL_SLANTED                  389
-#define IMG_EXTRA_TIME                         390
-#define IMG_SHIELD_ACTIVE                      391
-#define IMG_SHIELD_PASSIVE                     392
-#define IMG_SWITCHGATE_CLOSED                  393
-#define IMG_SWITCHGATE_OPENING                 394
-#define IMG_SWITCHGATE_OPEN                    395
-#define IMG_SWITCHGATE_CLOSING                 396
-#define IMG_TIMEGATE_CLOSED                    397
-#define IMG_TIMEGATE_OPENING                   398
-#define IMG_TIMEGATE_OPEN                      399
-#define IMG_TIMEGATE_CLOSING                   400
-#define IMG_BALLOON                            401
-#define IMG_BALLOON_MOVING                     402
-#define IMG_BALLOON_WINDROSE_LEFT              403
-#define IMG_BALLOON_WINDROSE_RIGHT             404
-#define IMG_BALLOON_WINDROSE_UP                        405
-#define IMG_BALLOON_WINDROSE_DOWN              406
-#define IMG_BALLOON_WINDROSE_ALL               407
-#define IMG_EMC_STEELWALL1                     408
-#define IMG_EMC_STEELWALL2                     409
-#define IMG_EMC_STEELWALL3                     410
-#define IMG_EMC_STEELWALL4                     411
-#define IMG_EMC_WALL_PILLAR_UPPER              412
-#define IMG_EMC_WALL_PILLAR_MIDDLE             413
-#define IMG_EMC_WALL_PILLAR_LOWER              414
-#define IMG_EMC_WALL4                          415
-#define IMG_EMC_WALL5                          416
-#define IMG_EMC_WALL6                          417
-#define IMG_EMC_WALL7                          418
-#define IMG_EMC_WALL8                          419
-#define IMG_ARROW_BLUE_LEFT                    420
-#define IMG_ARROW_BLUE_RIGHT                   421
-#define IMG_ARROW_BLUE_UP                      422
-#define IMG_ARROW_BLUE_DOWN                    423
-#define IMG_ARROW_RED_LEFT                     424
-#define IMG_ARROW_RED_RIGHT                    425
-#define IMG_ARROW_RED_UP                       426
-#define IMG_ARROW_RED_DOWN                     427
-#define IMG_SCROLLBAR_BLUE                     428
-#define IMG_SCROLLBAR_RED                      429
-#define IMG_SCROLLBAR_GREEN                    430
-#define IMG_SCROLLBAR_YELLOW                   431
-#define IMG_PEARL                              432
-#define IMG_PEARL_BREAKING                     433
-#define IMG_CRYSTAL                            434
-#define IMG_WALL_PEARL                         435
-#define IMG_WALL_CRYSTAL                       436
-#define IMG_SPRING                             437
-#define IMG_TUBE_RIGHT_DOWN                    438
-#define IMG_TUBE_HORIZONTAL_DOWN               439
-#define IMG_TUBE_LEFT_DOWN                     440
-#define IMG_TUBE_HORIZONTAL                    441
-#define IMG_TUBE_VERTICAL_RIGHT                        442
-#define IMG_TUBE_ALL                           443
-#define IMG_TUBE_VERTICAL_LEFT                 444
-#define IMG_TUBE_VERTICAL                      445
-#define IMG_TUBE_RIGHT_UP                      446
-#define IMG_TUBE_HORIZONTAL_UP                 447
-#define IMG_TUBE_LEFT_UP                       448
-#define IMG_TRAP_INACTIVE                      449
-#define IMG_TRAP_ACTIVE                                450
-#define IMG_TRAP_ACTIVATING                    451
-#define IMG_BD_WALL                            452
-#define IMG_BD_ROCK                            453
-#define IMG_BD_ROCK_FALLING                    454
-#define IMG_BD_ROCK_PUSHING                    455
-#define IMG_DX_BOMB                            456
-
-#define NUM_IMAGE_FILES                                457
+#define IMG_BD_FIREFLY_RIGHT                   115
+#define IMG_BD_FIREFLY_UP                      116
+#define IMG_BD_FIREFLY_LEFT                    117
+#define IMG_BD_FIREFLY_DOWN                    118
+#define IMG_STEELWALL_TOPLEFT                  119
+#define IMG_STEELWALL_TOPRIGHT                 120
+#define IMG_STEELWALL_BOTTOMLEFT               121
+#define IMG_STEELWALL_BOTTOMRIGHT              122
+#define IMG_STEELWALL_HORIZONTAL               123
+#define IMG_INVISIBLE_STEELWALL_TOPLEFT                124
+#define IMG_INVISIBLE_STEELWALL_TOPRIGHT       125
+#define IMG_INVISIBLE_STEELWALL_BOTTOMLEFT     126
+#define IMG_INVISIBLE_STEELWALL_BOTTOMRIGHT    127
+#define IMG_INVISIBLE_STEELWALL_HORIZONTAL     128
+#define IMG_PLAYER1_DOWN                       129
+#define IMG_PLAYER1_DOWN_MOVING                        130
+#define IMG_PLAYER1_DOWN_DIGGING               131
+#define IMG_PLAYER1_UP                         132
+#define IMG_PLAYER1_UP_MOVING                  133
+#define IMG_PLAYER1_UP_DIGGING                 134
+#define IMG_PLAYER1_LEFT                       135
+#define IMG_PLAYER1_LEFT_MOVING                        136
+#define IMG_PLAYER1_LEFT_DIGGING               137
+#define IMG_PLAYER1_LEFT_PUSHING               138
+#define IMG_PLAYER1_RIGHT                      139
+#define IMG_PLAYER1_RIGHT_MOVING               140
+#define IMG_PLAYER1_RIGHT_DIGGING              141
+#define IMG_PLAYER1_RIGHT_PUSHING              142
+#define IMG_PLAYER2_DOWN                       143
+#define IMG_PLAYER2_DOWN_MOVING                        144
+#define IMG_PLAYER2_DOWN_DIGGING               145
+#define IMG_PLAYER2_UP                         146
+#define IMG_PLAYER2_UP_MOVING                  147
+#define IMG_PLAYER2_UP_DIGGING                 148
+#define IMG_PLAYER2_LEFT                       149
+#define IMG_PLAYER2_LEFT_MOVING                        150
+#define IMG_PLAYER2_LEFT_DIGGING               151
+#define IMG_PLAYER2_LEFT_PUSHING               152
+#define IMG_PLAYER2_RIGHT                      153
+#define IMG_PLAYER2_RIGHT_MOVING               154
+#define IMG_PLAYER2_RIGHT_DIGGING              155
+#define IMG_PLAYER2_RIGHT_PUSHING              156
+#define IMG_PLAYER3_DOWN                       157
+#define IMG_PLAYER3_DOWN_MOVING                        158
+#define IMG_PLAYER3_DOWN_DIGGING               159
+#define IMG_PLAYER3_UP                         160
+#define IMG_PLAYER3_UP_MOVING                  161
+#define IMG_PLAYER3_UP_DIGGING                 162
+#define IMG_PLAYER3_LEFT                       163
+#define IMG_PLAYER3_LEFT_MOVING                        164
+#define IMG_PLAYER3_LEFT_DIGGING               165
+#define IMG_PLAYER3_LEFT_PUSHING               166
+#define IMG_PLAYER3_RIGHT                      167
+#define IMG_PLAYER3_RIGHT_MOVING               168
+#define IMG_PLAYER3_RIGHT_DIGGING              169
+#define IMG_PLAYER3_RIGHT_PUSHING              170
+#define IMG_PLAYER4_DOWN                       171
+#define IMG_PLAYER4_DOWN_MOVING                        172
+#define IMG_PLAYER4_DOWN_DIGGING               173
+#define IMG_PLAYER4_UP                         174
+#define IMG_PLAYER4_UP_MOVING                  175
+#define IMG_PLAYER4_UP_DIGGING                 176
+#define IMG_PLAYER4_LEFT                       177
+#define IMG_PLAYER4_LEFT_MOVING                        178
+#define IMG_PLAYER4_LEFT_DIGGING               179
+#define IMG_PLAYER4_LEFT_PUSHING               180
+#define IMG_PLAYER4_RIGHT                      181
+#define IMG_PLAYER4_RIGHT_MOVING               182
+#define IMG_PLAYER4_RIGHT_DIGGING              183
+#define IMG_PLAYER4_RIGHT_PUSHING              184
+#define IMG_WALL_GROWING_DOWN                  185
+#define IMG_WALL_GROWING_UP                    186
+#define IMG_SHIELD_PASSIVE_ACTIVATED           187
+#define IMG_SHIELD_ACTIVE_ACTIVATED            188
+#define IMG_PIG_DOWN                           189
+#define IMG_PIG_DOWN_MOVING                    190
+#define IMG_PIG_DOWN_EATING                    191
+#define IMG_PIG_UP                             192
+#define IMG_PIG_UP_MOVING                      193
+#define IMG_PIG_UP_EATING                      194
+#define IMG_PIG_LEFT                           195
+#define IMG_PIG_LEFT_MOVING                    196
+#define IMG_PIG_LEFT_EATING                    197
+#define IMG_PIG_RIGHT                          198
+#define IMG_PIG_RIGHT_MOVING                   199
+#define IMG_PIG_RIGHT_EATING                   200
+#define IMG_DRAGON_DOWN                                201
+#define IMG_DRAGON_DOWN_MOVING                 202
+#define IMG_DRAGON_DOWN_ATTACKING              203
+#define IMG_DRAGON_UP                          204
+#define IMG_DRAGON_UP_MOVING                   205
+#define IMG_DRAGON_UP_ATTACKING                        206
+#define IMG_DRAGON_LEFT                                207
+#define IMG_DRAGON_LEFT_MOVING                 208
+#define IMG_DRAGON_LEFT_ATTACKING              209
+#define IMG_DRAGON_RIGHT                       210
+#define IMG_DRAGON_RIGHT_MOVING                        211
+#define IMG_DRAGON_RIGHT_ATTACKING             212
+#define IMG_MOLE_DOWN                          213
+#define IMG_MOLE_DOWN_MOVING                   214
+#define IMG_MOLE_DOWN_DIGGING                  215
+#define IMG_MOLE_UP                            216
+#define IMG_MOLE_UP_MOVING                     217
+#define IMG_MOLE_UP_DIGGING                    218
+#define IMG_MOLE_LEFT                          219
+#define IMG_MOLE_LEFT_MOVING                   220
+#define IMG_MOLE_LEFT_DIGGING                  221
+#define IMG_MOLE_RIGHT                         222
+#define IMG_MOLE_RIGHT_MOVING                  223
+#define IMG_MOLE_RIGHT_DIGGING                 224
+#define IMG_PENGUIN_DOWN                       225
+#define IMG_PENGUIN_DOWN_MOVING                        226
+#define IMG_PENGUIN_UP                         227
+#define IMG_PENGUIN_UP_MOVING                  228
+#define IMG_PENGUIN_LEFT                       229
+#define IMG_PENGUIN_LEFT_MOVING                        230
+#define IMG_PENGUIN_RIGHT                      231
+#define IMG_PENGUIN_RIGHT_MOVING               232
+#define IMG_SATELLITE                          233
+#define IMG_SATELLITE_MOVING                   234
+#define IMG_ACID_SPLASHING_LEFT                        235
+#define IMG_ACID_SPLASHING_RIGHT               236
+#define IMG_SPARKLING_BLUE                     237
+#define IMG_SPARKLING_WHITE                    238
+#define IMG_FLAMES_LEFT1                       239
+#define IMG_FLAMES_LEFT2                       240
+#define IMG_FLAMES_LEFT3                       241
+#define IMG_FLAMES_RIGHT1                      242
+#define IMG_FLAMES_RIGHT2                      243
+#define IMG_FLAMES_RIGHT3                      244
+#define IMG_FLAMES_UP1                         245
+#define IMG_FLAMES_UP2                         246
+#define IMG_FLAMES_UP3                         247
+#define IMG_FLAMES_DOWN1                       248
+#define IMG_FLAMES_DOWN2                       249
+#define IMG_FLAMES_DOWN3                       250
+#define IMG_SP_EMPTY_SPACE                     251
+#define IMG_SP_ZONK                            252
+#define IMG_SP_ZONK_FALLING                    253
+#define IMG_SP_ZONK_PUSHING                    254
+#define IMG_SP_BASE                            255
+#define IMG_SP_MURPHY                          256
+#define IMG_SP_MURPHY_LEFT                     257
+#define IMG_SP_MURPHY_LEFT_MOVING              258
+#define IMG_SP_MURPHY_LEFT_DIGGING             259
+#define IMG_SP_MURPHY_LEFT_PUSHING             260
+#define IMG_SP_MURPHY_LEFT_SNAPPING            261
+#define IMG_SP_MURPHY_RIGHT                    262
+#define IMG_SP_MURPHY_RIGHT_MOVING             263
+#define IMG_SP_MURPHY_RIGHT_DIGGING            264
+#define IMG_SP_MURPHY_RIGHT_PUSHING            265
+#define IMG_SP_MURPHY_RIGHT_SNAPPING           266
+#define IMG_SP_MURPHY_UP                       267
+#define IMG_SP_MURPHY_UP_SNAPPING              268
+#define IMG_SP_MURPHY_DOWN                     269
+#define IMG_SP_MURPHY_DOWN_SNAPPING            270
+#define IMG_SP_MURPHY_CLONE                    271
+#define IMG_SP_INFOTRON                                272
+#define IMG_SP_INFOTRON_FALLING                        273
+#define IMG_SP_CHIP_SINGLE                     274
+#define IMG_SP_CHIP_LEFT                       275
+#define IMG_SP_CHIP_RIGHT                      276
+#define IMG_SP_CHIP_UPPER                      277
+#define IMG_SP_CHIP_LOWER                      278
+#define IMG_SP_HARD_GRAY                       279
+#define IMG_SP_HARD_GREEN                      280
+#define IMG_SP_HARD_BLUE                       281
+#define IMG_SP_HARD_RED                                282
+#define IMG_SP_HARD_YELLOW                     283
+#define IMG_SP_EXIT_CLOSED                     284
+#define IMG_SP_EXIT_OPEN                       285
+#define IMG_SP_DISK_ORANGE                     286
+#define IMG_SP_DISK_ORANGE_FALLING             287
+#define IMG_SP_DISK_ORANGE_PUSHING             288
+#define IMG_SP_DISK_YELLOW                     289
+#define IMG_SP_DISK_YELLOW_PUSHING             290
+#define IMG_SP_DISK_RED                                291
+#define IMG_SP_DISK_RED_COLLECTING             292
+#define IMG_SP_PORT1_RIGHT                     293
+#define IMG_SP_PORT1_DOWN                      294
+#define IMG_SP_PORT1_LEFT                      295
+#define IMG_SP_PORT1_UP                                296
+#define IMG_SP_PORT2_RIGHT                     297
+#define IMG_SP_PORT2_DOWN                      298
+#define IMG_SP_PORT2_LEFT                      299
+#define IMG_SP_PORT2_UP                                300
+#define IMG_SP_PORT_X                          301
+#define IMG_SP_PORT_Y                          302
+#define IMG_SP_PORT_XY                         303
+#define IMG_SP_SNIKSNAK                                304
+#define IMG_SP_SNIKSNAK_LEFT                   305
+#define IMG_SP_SNIKSNAK_LEFT_MOVING            306
+#define IMG_SP_SNIKSNAK_RIGHT                  307
+#define IMG_SP_SNIKSNAK_RIGHT_MOVING           308
+#define IMG_SP_SNIKSNAK_UP                     309
+#define IMG_SP_SNIKSNAK_UP_MOVING              310
+#define IMG_SP_SNIKSNAK_DOWN                   311
+#define IMG_SP_SNIKSNAK_DOWN_MOVING            312
+#define IMG_SP_ELECTRON                                313
+#define IMG_SP_ELECTRON_MOVING                 314
+#define IMG_SP_TERMINAL                                315
+#define IMG_SP_TERMINAL_RUNNING                        316
+#define IMG_SP_TERMINAL_ACTIVE                 317
+#define IMG_SP_TERMINAL_ACTIVE_RUNNING         318
+#define IMG_SP_BUGGY_BASE                      319
+#define IMG_SP_BUGGY_BASE_ACTIVATING           320
+#define IMG_SP_HARD_BASE1                      321
+#define IMG_SP_HARD_BASE2                      322
+#define IMG_SP_HARD_BASE3                      323
+#define IMG_SP_HARD_BASE4                      324
+#define IMG_SP_HARD_BASE5                      325
+#define IMG_SP_HARD_BASE6                      326
+#define IMG_INVISIBLE_STEELWALL                        327
+#define IMG_INVISIBLE_STEELWALL_ON             328
+#define IMG_INVISIBLE_SAND                     329
+#define IMG_INVISIBLE_SAND_ON                  330
+#define IMG_INVISIBLE_WALL                     331
+#define IMG_INVISIBLE_WALL_ON                  332
+#define IMG_EM_KEY1                            333
+#define IMG_EM_KEY2                            334
+#define IMG_EM_KEY3                            335
+#define IMG_EM_KEY4                            336
+#define IMG_EM_GATE1                           337
+#define IMG_EM_GATE2                           338
+#define IMG_EM_GATE3                           339
+#define IMG_EM_GATE4                           340
+#define IMG_EM_GATE1_GRAY                      341
+#define IMG_EM_GATE2_GRAY                      342
+#define IMG_EM_GATE3_GRAY                      343
+#define IMG_EM_GATE4_GRAY                      344
+#define IMG_SP_EXPLOSION                       345
+#define IMG_SP_EXPLOSION_INFOTRON              346
+#define IMG_CONVEYOR_BELT1_MIDDLE              347
+#define IMG_CONVEYOR_BELT1_MIDDLE_RUNNING      348
+#define IMG_CONVEYOR_BELT1_LEFT                        349
+#define IMG_CONVEYOR_BELT1_LEFT_RUNNING                350
+#define IMG_CONVEYOR_BELT1_RIGHT               351
+#define IMG_CONVEYOR_BELT1_RIGHT_RUNNING       352
+#define IMG_CONVEYOR_BELT1_SWITCH_LEFT         353
+#define IMG_CONVEYOR_BELT1_SWITCH_MIDDLE       354
+#define IMG_CONVEYOR_BELT1_SWITCH_RIGHT                355
+#define IMG_CONVEYOR_BELT2_MIDDLE              356
+#define IMG_CONVEYOR_BELT2_MIDDLE_RUNNING      357
+#define IMG_CONVEYOR_BELT2_LEFT                        358
+#define IMG_CONVEYOR_BELT2_LEFT_RUNNING                359
+#define IMG_CONVEYOR_BELT2_RIGHT               360
+#define IMG_CONVEYOR_BELT2_RIGHT_RUNNING       361
+#define IMG_CONVEYOR_BELT2_SWITCH_LEFT         362
+#define IMG_CONVEYOR_BELT2_SWITCH_MIDDLE       363
+#define IMG_CONVEYOR_BELT2_SWITCH_RIGHT                364
+#define IMG_CONVEYOR_BELT3_MIDDLE              365
+#define IMG_CONVEYOR_BELT3_MIDDLE_RUNNING      366
+#define IMG_CONVEYOR_BELT3_LEFT                        367
+#define IMG_CONVEYOR_BELT3_LEFT_RUNNING                368
+#define IMG_CONVEYOR_BELT3_RIGHT               369
+#define IMG_CONVEYOR_BELT3_RIGHT_RUNNING       370
+#define IMG_CONVEYOR_BELT3_SWITCH_LEFT         371
+#define IMG_CONVEYOR_BELT3_SWITCH_MIDDLE       372
+#define IMG_CONVEYOR_BELT3_SWITCH_RIGHT                373
+#define IMG_CONVEYOR_BELT4_MIDDLE              374
+#define IMG_CONVEYOR_BELT4_MIDDLE_RUNNING      375
+#define IMG_CONVEYOR_BELT4_LEFT                        376
+#define IMG_CONVEYOR_BELT4_LEFT_RUNNING                377
+#define IMG_CONVEYOR_BELT4_RIGHT               378
+#define IMG_CONVEYOR_BELT4_RIGHT_RUNNING       379
+#define IMG_CONVEYOR_BELT4_SWITCH_LEFT         380
+#define IMG_CONVEYOR_BELT4_SWITCH_MIDDLE       381
+#define IMG_CONVEYOR_BELT4_SWITCH_RIGHT                382
+#define IMG_SWITCHGATE_SWITCH_UP               383
+#define IMG_SWITCHGATE_SWITCH_DOWN             384
+#define IMG_LIGHT_SWITCH_OFF                   385
+#define IMG_LIGHT_SWITCH_ON                    386
+#define IMG_TIMEGATE_WHEEL                     387
+#define IMG_TIMEGATE_WHEEL_RUNNING             388
+#define IMG_ENVELOPE                           389
+#define IMG_SIGN_EXCLAMATION                   390
+#define IMG_SIGN_STOP                          391
+#define IMG_LANDMINE                           392
+#define IMG_STEELWALL_SLANTED                  393
+#define IMG_EXTRA_TIME                         394
+#define IMG_SHIELD_ACTIVE                      395
+#define IMG_SHIELD_PASSIVE                     396
+#define IMG_SWITCHGATE_CLOSED                  397
+#define IMG_SWITCHGATE_OPENING                 398
+#define IMG_SWITCHGATE_OPEN                    399
+#define IMG_SWITCHGATE_CLOSING                 400
+#define IMG_TIMEGATE_CLOSED                    401
+#define IMG_TIMEGATE_OPENING                   402
+#define IMG_TIMEGATE_OPEN                      403
+#define IMG_TIMEGATE_CLOSING                   404
+#define IMG_BALLOON                            405
+#define IMG_BALLOON_MOVING                     406
+#define IMG_BALLOON_WINDROSE_LEFT              407
+#define IMG_BALLOON_WINDROSE_RIGHT             408
+#define IMG_BALLOON_WINDROSE_UP                        409
+#define IMG_BALLOON_WINDROSE_DOWN              410
+#define IMG_BALLOON_WINDROSE_ALL               411
+#define IMG_EMC_STEELWALL1                     412
+#define IMG_EMC_STEELWALL2                     413
+#define IMG_EMC_STEELWALL3                     414
+#define IMG_EMC_STEELWALL4                     415
+#define IMG_EMC_WALL_PILLAR_UPPER              416
+#define IMG_EMC_WALL_PILLAR_MIDDLE             417
+#define IMG_EMC_WALL_PILLAR_LOWER              418
+#define IMG_EMC_WALL4                          419
+#define IMG_EMC_WALL5                          420
+#define IMG_EMC_WALL6                          421
+#define IMG_EMC_WALL7                          422
+#define IMG_EMC_WALL8                          423
+#define IMG_ARROW_BLUE_LEFT                    424
+#define IMG_ARROW_BLUE_RIGHT                   425
+#define IMG_ARROW_BLUE_UP                      426
+#define IMG_ARROW_BLUE_DOWN                    427
+#define IMG_ARROW_RED_LEFT                     428
+#define IMG_ARROW_RED_RIGHT                    429
+#define IMG_ARROW_RED_UP                       430
+#define IMG_ARROW_RED_DOWN                     431
+#define IMG_SCROLLBAR_BLUE                     432
+#define IMG_SCROLLBAR_RED                      433
+#define IMG_SCROLLBAR_GREEN                    434
+#define IMG_SCROLLBAR_YELLOW                   435
+#define IMG_PEARL                              436
+#define IMG_PEARL_BREAKING                     437
+#define IMG_CRYSTAL                            438
+#define IMG_WALL_PEARL                         439
+#define IMG_WALL_CRYSTAL                       440
+#define IMG_SPRING                             441
+#define IMG_TUBE_RIGHT_DOWN                    442
+#define IMG_TUBE_HORIZONTAL_DOWN               443
+#define IMG_TUBE_LEFT_DOWN                     444
+#define IMG_TUBE_HORIZONTAL                    445
+#define IMG_TUBE_VERTICAL_RIGHT                        446
+#define IMG_TUBE_ALL                           447
+#define IMG_TUBE_VERTICAL_LEFT                 448
+#define IMG_TUBE_VERTICAL                      449
+#define IMG_TUBE_RIGHT_UP                      450
+#define IMG_TUBE_HORIZONTAL_UP                 451
+#define IMG_TUBE_LEFT_UP                       452
+#define IMG_TRAP_INACTIVE                      453
+#define IMG_TRAP_ACTIVE                                454
+#define IMG_TRAP_ACTIVATING                    455
+#define IMG_BD_WALL                            456
+#define IMG_BD_ROCK                            457
+#define IMG_BD_ROCK_FALLING                    458
+#define IMG_BD_ROCK_PUSHING                    459
+#define IMG_DX_BOMB                            460
+
+#define NUM_IMAGE_FILES                                461
 
 /* values for sound configuration suffixes */
 /* (currently none) */
index 0552e4af67d70ebf2d041e2ad1e83b5cbf98fd30..7b7bdefbe03585686241febe2422048c7c1bcb1b 100644 (file)
@@ -1169,12 +1169,134 @@ void DrawGraphicShifted(int x,int y, int dx,int dy, int graphic,
   MarkTileDirty(x,y);
 }
 
+void DrawNewGraphicShifted(int x,int y, int dx,int dy, int graphic, int frame,
+                       int cut_mode, int mask_mode)
+{
+  Bitmap *src_bitmap;
+  GC drawing_gc;
+  int src_x;
+  int src_y;
+
+  int width = TILEX, height = TILEY;
+  int cx = 0, cy = 0;
+  int dest_x, dest_y;
+
+  if (graphic < 0)
+  {
+    DrawNewGraphic(x, y, graphic, frame);
+    return;
+  }
+
+  if (dx || dy)                        /* Verschiebung der Grafik? */
+  {
+    if (x < BX1)               /* Element kommt von links ins Bild */
+    {
+      x = BX1;
+      width = dx;
+      cx = TILEX - dx;
+      dx = 0;
+    }
+    else if (x > BX2)          /* Element kommt von rechts ins Bild */
+    {
+      x = BX2;
+      width = -dx;
+      dx = TILEX + dx;
+    }
+    else if (x==BX1 && dx < 0) /* Element verläßt links das Bild */
+    {
+      width += dx;
+      cx = -dx;
+      dx = 0;
+    }
+    else if (x==BX2 && dx > 0) /* Element verläßt rechts das Bild */
+      width -= dx;
+    else if (dx)               /* allg. Bewegung in x-Richtung */
+      MarkTileDirty(x + SIGN(dx), y);
+
+    if (y < BY1)               /* Element kommt von oben ins Bild */
+    {
+      if (cut_mode==CUT_BELOW) /* Element oberhalb des Bildes */
+       return;
+
+      y = BY1;
+      height = dy;
+      cy = TILEY - dy;
+      dy = 0;
+    }
+    else if (y > BY2)          /* Element kommt von unten ins Bild */
+    {
+      y = BY2;
+      height = -dy;
+      dy = TILEY + dy;
+    }
+    else if (y==BY1 && dy < 0) /* Element verläßt oben das Bild */
+    {
+      height += dy;
+      cy = -dy;
+      dy = 0;
+    }
+    else if (dy > 0 && cut_mode == CUT_ABOVE)
+    {
+      if (y == BY2)            /* Element unterhalb des Bildes */
+       return;
+
+      height = dy;
+      cy = TILEY - dy;
+      dy = TILEY;
+      MarkTileDirty(x, y + 1);
+    }                          /* Element verläßt unten das Bild */
+    else if (dy > 0 && (y == BY2 || cut_mode == CUT_BELOW))
+      height -= dy;
+    else if (dy)               /* allg. Bewegung in y-Richtung */
+      MarkTileDirty(x, y + SIGN(dy));
+  }
+
+  src_bitmap = new_graphic_info[graphic].bitmap;
+  drawing_gc = src_bitmap->stored_clip_gc;
+  src_x = new_graphic_info[graphic].src_x;
+  src_y = new_graphic_info[graphic].src_y;
+
+  if (new_graphic_info[graphic].anim_vertical)
+    src_y += frame * TILEY;
+  else
+    src_x += frame * TILEX;
+
+  src_x += cx;
+  src_y += cy;
+
+  dest_x = FX + x * TILEX + dx;
+  dest_y = FY + y * TILEY + dy;
+
+#if DEBUG
+  if (!IN_SCR_FIELD(x,y))
+  {
+    printf("DrawGraphicShifted(): x = %d, y = %d, graphic = %d\n",x,y,graphic);
+    printf("DrawGraphicShifted(): This should never happen!\n");
+    return;
+  }
+#endif
+
+  if (mask_mode == USE_MASKING)
+    SetClipOrigin(src_bitmap, drawing_gc, dest_x - src_x, dest_y - src_y);
+
+  BlitBitmap(src_bitmap, drawto_field, src_x, src_y, width, height,
+            dest_x, dest_y);
+
+  MarkTileDirty(x,y);
+}
+
 void DrawGraphicShiftedThruMask(int x,int y, int dx,int dy, int graphic,
                                int cut_mode)
 {
   DrawGraphicShifted(x,y, dx,dy, graphic, cut_mode, USE_MASKING);
 }
 
+void DrawNewGraphicShiftedThruMask(int x,int y, int dx,int dy, int graphic,
+                                  int frame, int cut_mode)
+{
+  DrawNewGraphicShifted(x,y, dx,dy, graphic, frame, cut_mode, USE_MASKING);
+}
+
 void DrawScreenElementExt(int x, int y, int dx, int dy, int element,
                          int cut_mode, int mask_mode)
 {
@@ -1322,6 +1444,174 @@ void DrawScreenElementExt(int x, int y, int dx, int dy, int element,
     DrawGraphic(x, y, graphic);
 }
 
+void DrawNewScreenElementExt(int x, int y, int dx, int dy, int element,
+                         int cut_mode, int mask_mode)
+{
+  int ux = LEVELX(x), uy = LEVELY(y);
+  int dir = MovDir[ux][uy];
+  int graphic = el_dir2img(element, dir);
+  int frame = getNewGraphicAnimationFrame(graphic);
+  int phase8 = ABS(MovPos[ux][uy]) / (TILEX / 8);
+  int phase4 = phase8 / 2;
+  int phase2  = phase8 / 4;
+
+  if (element == EL_KAEFER)
+  {
+    ;
+  }
+  else if (element == EL_PACMAN || element == EL_KAEFER || element == EL_FLIEGER)
+  {
+    graphic += 1 * !phase2;
+
+    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)
+  {
+#if 1
+    graphic = GFX2_SP_ELECTRON + getGraphicAnimationPhase(8, 2, ANIM_NORMAL);
+#else
+    graphic = GFX2_SP_ELECTRON + getNewGraphicAnimationFrame(graphic);
+#endif
+  }
+  else if (element == EL_MOLE || element == EL_PINGUIN ||
+          element == EL_SCHWEIN || element == EL_DRACHE)
+  {
+    if (dir == MV_LEFT)
+      graphic = (element == EL_MOLE ? GFX_MOLE_LEFT :
+                element == EL_PINGUIN ? GFX_PINGUIN_LEFT :
+                element == EL_SCHWEIN ? GFX_SCHWEIN_LEFT : GFX_DRACHE_LEFT);
+    else if (dir == MV_RIGHT)
+      graphic = (element == EL_MOLE ? GFX_MOLE_RIGHT :
+                element == EL_PINGUIN ? GFX_PINGUIN_RIGHT :
+                element == EL_SCHWEIN ? GFX_SCHWEIN_RIGHT : GFX_DRACHE_RIGHT);
+    else if (dir == MV_UP)
+      graphic = (element == EL_MOLE ? GFX_MOLE_UP :
+                element == EL_PINGUIN ? GFX_PINGUIN_UP :
+                element == EL_SCHWEIN ? GFX_SCHWEIN_UP : GFX_DRACHE_UP);
+    else
+      graphic = (element == EL_MOLE ? GFX_MOLE_DOWN :
+                element == EL_PINGUIN ? GFX_PINGUIN_DOWN :
+                element == EL_SCHWEIN ? GFX_SCHWEIN_DOWN : GFX_DRACHE_DOWN);
+
+    graphic += phase4;
+  }
+  else if (element == EL_SONDE)
+  {
+#if 1
+    graphic = GFX_SONDE_START + getGraphicAnimationPhase(8, 2, ANIM_NORMAL);
+#else
+    graphic = GFX_SONDE_START + getNewGraphicAnimationFrame(graphic);
+#endif
+  }
+  else if (element == EL_SALZSAEURE)
+  {
+#if 1
+    graphic = GFX_GEBLUBBER + getGraphicAnimationPhase(4, 10, ANIM_NORMAL);
+#else
+    graphic = GFX_GEBLUBBER + getNewGraphicAnimationFrame(graphic);
+#endif
+  }
+  else if (element == EL_BUTTERFLY || element == EL_FIREFLY)
+  {
+    graphic += !phase2;
+  }
+  else if (element == EL_BALLOON)
+  {
+    graphic += phase4;
+  }
+  else if ((element == EL_FELSBROCKEN ||
+           element == EL_SP_ZONK ||
+           element == EL_BD_ROCK ||
+           element == EL_SP_INFOTRON ||
+           IS_GEM(element))
+          && !cut_mode)
+  {
+    if (uy >= lev_fieldy-1 || !IS_BELT(Feld[ux][uy+1]))
+    {
+      if (element == EL_FELSBROCKEN ||
+         element == EL_SP_ZONK ||
+         element == EL_BD_ROCK)
+      {
+       if (dir == MV_LEFT)
+         graphic += (4 - phase4) % 4;
+       else if (dir == MV_RIGHT)
+         graphic += phase4;
+       else
+         graphic += phase2 * 2;
+      }
+      else if (element != EL_SP_INFOTRON)
+       graphic += phase2;
+    }
+  }
+  else if (element == EL_MAGIC_WALL_EMPTY ||
+          element == EL_MAGIC_WALL_EMPTYING ||
+          element == EL_MAGIC_WALL_BD_EMPTY ||
+          element == EL_MAGIC_WALL_BD_EMPTYING ||
+          element == EL_MAGIC_WALL_FULL ||
+          element == EL_MAGIC_WALL_BD_FULL)
+  {
+#if 1
+    graphic += 3 + getGraphicAnimationPhase(4, 4, ANIM_REVERSE);
+#else
+    graphic += 3 + getNewGraphicAnimationFrame(graphic);
+#endif
+  }
+  else if (IS_AMOEBOID(element) || element == EL_AMOEBA_DRIPPING)
+  {
+    graphic = (element == EL_AMOEBE_TOT ? GFX_AMOEBE_TOT : GFX_AMOEBE_LEBT);
+    graphic += (x + 2 * y + 4) % 4;
+  }
+  else if (element == EL_MAUER_LEBT)
+  {
+    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;
+  }
+  else if ((element == EL_INVISIBLE_STEEL ||
+           element == EL_UNSICHTBAR ||
+           element == EL_SAND_INVISIBLE) && game.light_time_left)
+  {
+    graphic = (element == EL_INVISIBLE_STEEL ? GFX_INVISIBLE_STEEL_ON :
+              element == EL_UNSICHTBAR ? GFX_UNSICHTBAR_ON :
+              GFX_SAND_INVISIBLE_ON);
+  }
+
+  if (dx || dy)
+    DrawNewGraphicShifted(x, y, dx, dy, graphic, frame, cut_mode, mask_mode);
+  else if (mask_mode == USE_MASKING)
+    DrawNewGraphicThruMask(x, y, graphic, frame);
+  else
+    DrawNewGraphic(x, y, graphic, frame);
+}
+
 void DrawLevelElementExt(int x, int y, int dx, int dy, int element,
                         int cut_mode, int mask_mode)
 {
@@ -1330,33 +1620,68 @@ void DrawLevelElementExt(int x, int y, int dx, int dy, int element,
                         cut_mode, mask_mode);
 }
 
+void DrawNewLevelElementExt(int x, int y, int dx, int dy, int element,
+                        int cut_mode, int mask_mode)
+{
+  if (IN_LEV_FIELD(x, y) && IN_SCR_FIELD(SCREENX(x), SCREENY(y)))
+    DrawNewScreenElementExt(SCREENX(x), SCREENY(y), dx, dy, element,
+                        cut_mode, mask_mode);
+}
+
 void DrawScreenElementShifted(int x, int y, int dx, int dy, int element,
                              int cut_mode)
 {
   DrawScreenElementExt(x, y, dx, dy, element, cut_mode, NO_MASKING);
 }
 
+void DrawNewScreenElementShifted(int x, int y, int dx, int dy, int element,
+                             int cut_mode)
+{
+  DrawNewScreenElementExt(x, y, dx, dy, element, cut_mode, NO_MASKING);
+}
+
 void DrawLevelElementShifted(int x, int y, int dx, int dy, int element,
                             int cut_mode)
 {
   DrawLevelElementExt(x, y, dx, dy, element, cut_mode, NO_MASKING);
 }
 
+void DrawNewLevelElementShifted(int x, int y, int dx, int dy, int element,
+                            int cut_mode)
+{
+  DrawNewLevelElementExt(x, y, dx, dy, element, cut_mode, NO_MASKING);
+}
+
 void DrawScreenElementThruMask(int x, int y, int element)
 {
   DrawScreenElementExt(x, y, 0, 0, element, NO_CUTTING, USE_MASKING);
 }
 
+void DrawNewScreenElementThruMask(int x, int y, int element)
+{
+  DrawNewScreenElementExt(x, y, 0, 0, element, NO_CUTTING, USE_MASKING);
+}
+
 void DrawLevelElementThruMask(int x, int y, int element)
 {
   DrawLevelElementExt(x, y, 0, 0, element, NO_CUTTING, USE_MASKING);
 }
 
+void DrawNewLevelElementThruMask(int x, int y, int element)
+{
+  DrawNewLevelElementExt(x, y, 0, 0, element, NO_CUTTING, USE_MASKING);
+}
+
 void DrawLevelFieldThruMask(int x, int y)
 {
   DrawLevelElementExt(x, y, 0, 0, Feld[x][y], NO_CUTTING, USE_MASKING);
 }
 
+void DrawNewLevelFieldThruMask(int x, int y)
+{
+  DrawNewLevelElementExt(x, y, 0, 0, Feld[x][y], NO_CUTTING, USE_MASKING);
+}
+
 void ErdreichAnbroeckeln(int x, int y)
 {
   Bitmap *src_bitmap;
@@ -1480,12 +1805,24 @@ void DrawScreenElement(int x, int y, int element)
   ErdreichAnbroeckeln(x, y);
 }
 
+void DrawNewScreenElement(int x, int y, int element)
+{
+  DrawNewScreenElementExt(x, y, 0, 0, element, NO_CUTTING, NO_MASKING);
+  ErdreichAnbroeckeln(x, y);
+}
+
 void DrawLevelElement(int x, int y, int element)
 {
   if (IN_LEV_FIELD(x, y) && IN_SCR_FIELD(SCREENX(x), SCREENY(y)))
     DrawScreenElement(SCREENX(x), SCREENY(y), element);
 }
 
+void DrawNewLevelElement(int x, int y, int element)
+{
+  if (IN_LEV_FIELD(x, y) && IN_SCR_FIELD(SCREENX(x), SCREENY(y)))
+    DrawNewScreenElement(SCREENX(x), SCREENY(y), element);
+}
+
 void DrawScreenField(int x, int y)
 {
   int ux = LEVELX(x), uy = LEVELY(y);
@@ -1576,6 +1913,96 @@ void DrawScreenField(int x, int y)
     DrawScreenElement(x, y, EL_LEERRAUM);
 }
 
+void DrawNewScreenField(int x, int y)
+{
+  int ux = LEVELX(x), uy = LEVELY(y);
+  int element, content;
+
+  if (!IN_LEV_FIELD(ux, uy))
+  {
+    if (ux < -1 || ux > lev_fieldx || uy < -1 || uy > lev_fieldy)
+      element = EL_LEERRAUM;
+    else
+      element = BorderElement;
+
+    DrawNewScreenElement(x, y, element);
+    return;
+  }
+
+  element = Feld[ux][uy];
+  content = Store[ux][uy];
+
+  if (IS_MOVING(ux, uy))
+  {
+    int horiz_move = (MovDir[ux][uy] == MV_LEFT || MovDir[ux][uy] == MV_RIGHT);
+    boolean cut_mode = NO_CUTTING;
+
+    if (element == EL_QUICKSAND_EMPTYING ||
+       element == EL_MAGIC_WALL_EMPTYING ||
+       element == EL_MAGIC_WALL_BD_EMPTYING ||
+       element == EL_AMOEBA_DRIPPING)
+      cut_mode = CUT_ABOVE;
+    else if (element == EL_QUICKSAND_FILLING ||
+            element == EL_MAGIC_WALL_FILLING ||
+            element == EL_MAGIC_WALL_BD_FILLING)
+      cut_mode = CUT_BELOW;
+
+    if (cut_mode == CUT_ABOVE)
+      DrawNewScreenElementShifted(x, y, 0, 0, element, NO_CUTTING);
+    else
+      DrawNewScreenElement(x, y, EL_LEERRAUM);
+
+    if (horiz_move)
+      DrawNewScreenElementShifted(x, y, MovPos[ux][uy], 0, element, NO_CUTTING);
+    else if (cut_mode == NO_CUTTING)
+      DrawNewScreenElementShifted(x, y, 0, MovPos[ux][uy], element, cut_mode);
+    else
+      DrawNewScreenElementShifted(x, y, 0, MovPos[ux][uy], content, cut_mode);
+
+    if (content == EL_SALZSAEURE)
+      DrawNewLevelElementThruMask(ux, uy + 1, EL_SALZSAEURE);
+  }
+  else if (IS_BLOCKED(ux, uy))
+  {
+    int oldx, oldy;
+    int sx, sy;
+    int horiz_move;
+    boolean cut_mode = NO_CUTTING;
+    int element_old, content_old;
+
+    Blocked2Moving(ux, uy, &oldx, &oldy);
+    sx = SCREENX(oldx);
+    sy = SCREENY(oldy);
+    horiz_move = (MovDir[oldx][oldy] == MV_LEFT ||
+                 MovDir[oldx][oldy] == MV_RIGHT);
+
+    element_old = Feld[oldx][oldy];
+    content_old = Store[oldx][oldy];
+
+    if (element_old == EL_QUICKSAND_EMPTYING ||
+       element_old == EL_MAGIC_WALL_EMPTYING ||
+       element_old == EL_MAGIC_WALL_BD_EMPTYING ||
+       element_old == EL_AMOEBA_DRIPPING)
+      cut_mode = CUT_ABOVE;
+
+    DrawNewScreenElement(x, y, EL_LEERRAUM);
+
+    if (horiz_move)
+      DrawNewScreenElementShifted(sx, sy, MovPos[oldx][oldy], 0, element_old,
+                              NO_CUTTING);
+    else if (cut_mode == NO_CUTTING)
+      DrawNewScreenElementShifted(sx, sy, 0, MovPos[oldx][oldy], element_old,
+                              cut_mode);
+    else
+      DrawNewScreenElementShifted(sx, sy, 0, MovPos[oldx][oldy], content_old,
+                              cut_mode);
+  }
+  else if (IS_DRAWABLE(element))
+    DrawNewScreenElement(x, y, element);
+  else
+    DrawNewScreenElement(x, y, EL_LEERRAUM);
+}
+
 void DrawLevelField(int x, int y)
 {
   if (IN_SCR_FIELD(SCREENX(x), SCREENY(y)))
@@ -1598,6 +2025,28 @@ void DrawLevelField(int x, int y)
   }
 }
 
+void DrawNewLevelField(int x, int y)
+{
+  if (IN_SCR_FIELD(SCREENX(x), SCREENY(y)))
+    DrawNewScreenField(SCREENX(x), SCREENY(y));
+  else if (IS_MOVING(x, y))
+  {
+    int newx,newy;
+
+    Moving2Blocked(x, y, &newx, &newy);
+    if (IN_SCR_FIELD(SCREENX(newx), SCREENY(newy)))
+      DrawNewScreenField(SCREENX(newx), SCREENY(newy));
+  }
+  else if (IS_BLOCKED(x, y))
+  {
+    int oldx, oldy;
+
+    Blocked2Moving(x, y, &oldx, &oldy);
+    if (IN_SCR_FIELD(SCREENX(oldx), SCREENY(oldy)))
+      DrawNewScreenField(SCREENX(oldx), SCREENY(oldy));
+  }
+}
+
 void DrawMiniElement(int x, int y, int element)
 {
   int graphic;
@@ -2853,3 +3302,25 @@ int el2gfx(int element)
 
   return graphic_NEW;
 }
+
+int el2img(int element)
+{
+  switch(element)
+  {
+    case EL_BUTTERFLY:         return IMG_BD_BUTTERFLY;
+    case EL_FIREFLY:           return IMG_BD_FIREFLY;
+
+    default:
+      break;
+  }
+
+  return IMG_EMPTY_SPACE;
+}
+
+int el_dir2img(int element, int direction)
+{
+  if (element_info[element].has_direction_graphic)
+    return element_info[element].direction_graphic[LOG_MV_DIR(direction)];
+  else
+    return el2img(element);
+}
index 2769015c2553744f2626a2429e6cc074a1d53cbe..abe5a40270660e0fc47f97e6166b13e487f49f4b 100644 (file)
@@ -87,19 +87,32 @@ void DrawMiniGraphic(int, int, int);
 void getMiniGraphicSource(int, Bitmap **, int *, int *);
 void DrawMiniGraphicExt(DrawBuffer *, int, int, int);
 void DrawGraphicShifted(int, int, int, int, int, int, int);
+void DrawNewGraphicShifted(int, int, int, int, int, int, int, int);
 void DrawGraphicShiftedThruMask(int, int, int, int, int, int);
+void DrawNewGraphicShiftedThruMask(int, int, int, int, int, int, int);
 void DrawScreenElementExt(int, int, int, int, int, int, int);
+void DrawNewScreenElementExt(int, int, int, int, int, int, int);
 void DrawLevelElementExt(int, int, int, int, int, int, int);
+void DrawNewLevelElementExt(int, int, int, int, int, int, int);
 void DrawScreenElementShifted(int, int, int, int, int, int);
+void DrawNewScreenElementShifted(int, int, int, int, int, int);
 void DrawLevelElementShifted(int, int, int, int, int, int);
+void DrawNewLevelElementShifted(int, int, int, int, int, int);
 void DrawScreenElementThruMask(int, int, int);
+void DrawNewScreenElementThruMask(int, int, int);
 void DrawLevelElementThruMask(int, int, int);
+void DrawNewLevelElementThruMask(int, int, int);
 void DrawLevelFieldThruMask(int, int);
+void DrawNewLevelFieldThruMask(int, int);
 void ErdreichAnbroeckeln(int, int);
 void DrawScreenElement(int, int, int);
+void DrawNewScreenElement(int, int, int);
 void DrawLevelElement(int, int, int);
+void DrawNewLevelElement(int, int, int);
 void DrawScreenField(int, int);
+void DrawNewScreenField(int, int);
 void DrawLevelField(int, int);
+void DrawNewLevelField(int, int);
 void DrawMiniElement(int, int, int);
 void DrawMiniElementOrWall(int, int, int, int);
 void DrawMicroElement(int, int, int);
@@ -120,5 +133,7 @@ void CreateToolButtons();
 
 int get_next_element(int);
 int el2gfx(int);
+int el2img(int);
+int el_dir2img(int, int);
 
 #endif /* TOOLS_H */