rnd-20030121-1-src
authorHolger Schemel <info@artsoft.org>
Mon, 20 Jan 2003 23:27:40 +0000 (00:27 +0100)
committerHolger Schemel <info@artsoft.org>
Sat, 30 Aug 2014 08:39:57 +0000 (10:39 +0200)
src/conf_e2g.c
src/conftime.h
src/init.c
src/libgame/image.c
src/libgame/image.h
src/libgame/misc.c
src/libgame/sound.c
src/libgame/sound.h
src/libgame/system.h

index 971d138fa89f7d3d1f612f961081c48bdbc3d4db..dffd639c397c137a398caf7c9cbc1aaf484cd9fd 100644 (file)
@@ -21,8 +21,8 @@
 static struct
 {
     int element;
-    int direction;
     int action;
+    int direction;
 
     int graphic;
 }
@@ -37,15 +37,15 @@ element_to_graphic[] =
     IMG_BD_ROCK
   },
   {
-    EL_BD_ROCK,                                        -1, ACTION_FALLING,
+    EL_BD_ROCK,                                        ACTION_FALLING, -1,
     IMG_BD_ROCK_FALLING
   },
   {
-    EL_BD_ROCK,                                        MV_LEFT, ACTION_MOVING,
+    EL_BD_ROCK,                                        ACTION_MOVING, MV_BIT_LEFT,
     IMG_BD_ROCK_MOVING_LEFT
   },
   {
-    EL_BD_ROCK,                                        MV_RIGHT, ACTION_MOVING,
+    EL_BD_ROCK,                                        ACTION_MOVING, MV_BIT_RIGHT,
     IMG_BD_ROCK_MOVING_RIGHT
   },
   {
@@ -53,11 +53,11 @@ element_to_graphic[] =
     IMG_BD_DIAMOND
   },
   {
-    EL_BD_DIAMOND,                             -1, ACTION_MOVING,
+    EL_BD_DIAMOND,                             ACTION_MOVING, -1,
     IMG_BD_DIAMOND_MOVING
   },
   {
-    EL_BD_DIAMOND,                             -1, ACTION_FALLING,
+    EL_BD_DIAMOND,                             ACTION_FALLING, -1,
     IMG_BD_DIAMOND_FALLING
   },
   {
@@ -109,7 +109,7 @@ element_to_graphic[] =
     IMG_BD_BUTTERFLY
   },
   {
-    EL_BD_BUTTERFLY,                           -1, ACTION_MOVING,
+    EL_BD_BUTTERFLY,                           ACTION_MOVING, -1,
     IMG_BD_BUTTERFLY_MOVING
   },
   {
@@ -117,7 +117,7 @@ element_to_graphic[] =
     IMG_BD_BUTTERFLY_RIGHT
   },
   {
-    EL_BD_BUTTERFLY,                           MV_RIGHT, -1,
+    EL_BD_BUTTERFLY,                           -1, MV_BIT_RIGHT,
     IMG_BD_BUTTERFLY_RIGHT
   },
   {
@@ -125,7 +125,7 @@ element_to_graphic[] =
     IMG_BD_BUTTERFLY_UP
   },
   {
-    EL_BD_BUTTERFLY,                           MV_UP, -1,
+    EL_BD_BUTTERFLY,                           -1, MV_BIT_UP,
     IMG_BD_BUTTERFLY_UP
   },
   {
@@ -133,7 +133,7 @@ element_to_graphic[] =
     IMG_BD_BUTTERFLY_LEFT
   },
   {
-    EL_BD_BUTTERFLY,                           MV_LEFT, -1,
+    EL_BD_BUTTERFLY,                           -1, MV_BIT_LEFT,
     IMG_BD_BUTTERFLY_LEFT
   },
   {
@@ -141,7 +141,7 @@ element_to_graphic[] =
     IMG_BD_BUTTERFLY_DOWN
   },
   {
-    EL_BD_BUTTERFLY,                           MV_DOWN, -1,
+    EL_BD_BUTTERFLY,                           -1, MV_BIT_DOWN,
     IMG_BD_BUTTERFLY_DOWN
   },
   {
@@ -149,7 +149,7 @@ element_to_graphic[] =
     IMG_BD_FIREFLY
   },
   {
-    EL_BD_FIREFLY,                             -1, ACTION_MOVING,
+    EL_BD_FIREFLY,                             ACTION_MOVING, -1,
     IMG_BD_FIREFLY_MOVING
   },
   {
@@ -157,7 +157,7 @@ element_to_graphic[] =
     IMG_BD_FIREFLY_RIGHT
   },
   {
-    EL_BD_FIREFLY,                             MV_RIGHT, -1,
+    EL_BD_FIREFLY,                             -1, MV_BIT_RIGHT,
     IMG_BD_FIREFLY_RIGHT
   },
   {
@@ -165,7 +165,7 @@ element_to_graphic[] =
     IMG_BD_FIREFLY_UP
   },
   {
-    EL_BD_FIREFLY,                             MV_UP, -1,
+    EL_BD_FIREFLY,                             -1, MV_BIT_UP,
     IMG_BD_FIREFLY_UP
   },
   {
@@ -173,7 +173,7 @@ element_to_graphic[] =
     IMG_BD_FIREFLY_LEFT
   },
   {
-    EL_BD_FIREFLY,                             MV_LEFT, -1,
+    EL_BD_FIREFLY,                             -1, MV_BIT_LEFT,
     IMG_BD_FIREFLY_LEFT
   },
   {
@@ -181,7 +181,7 @@ element_to_graphic[] =
     IMG_BD_FIREFLY_DOWN
   },
   {
-    EL_BD_FIREFLY,                             MV_DOWN, -1,
+    EL_BD_FIREFLY,                             -1, MV_BIT_DOWN,
     IMG_BD_FIREFLY_DOWN
   },
   {
@@ -193,15 +193,15 @@ element_to_graphic[] =
     IMG_SP_ZONK
   },
   {
-    EL_SP_ZONK,                                        -1, ACTION_FALLING,
+    EL_SP_ZONK,                                        ACTION_FALLING, -1,
     IMG_SP_ZONK_FALLING
   },
   {
-    EL_SP_ZONK,                                        MV_LEFT, ACTION_MOVING,
+    EL_SP_ZONK,                                        ACTION_MOVING, MV_BIT_LEFT,
     IMG_SP_ZONK_MOVING_LEFT
   },
   {
-    EL_SP_ZONK,                                        MV_RIGHT, ACTION_MOVING,
+    EL_SP_ZONK,                                        ACTION_MOVING, MV_BIT_RIGHT,
     IMG_SP_ZONK_MOVING_RIGHT
   },
   {
@@ -213,59 +213,59 @@ element_to_graphic[] =
     IMG_SP_MURPHY
   },
   {
-    EL_SP_MURPHY,                              MV_LEFT, -1,
+    EL_SP_MURPHY,                              -1, MV_BIT_LEFT,
     IMG_SP_MURPHY_LEFT
   },
   {
-    EL_SP_MURPHY,                              MV_LEFT, ACTION_MOVING,
+    EL_SP_MURPHY,                              ACTION_MOVING, MV_BIT_LEFT,
     IMG_SP_MURPHY_LEFT_MOVING
   },
   {
-    EL_SP_MURPHY,                              MV_LEFT, ACTION_DIGGING,
+    EL_SP_MURPHY,                              ACTION_DIGGING, MV_BIT_LEFT,
     IMG_SP_MURPHY_LEFT_DIGGING
   },
   {
-    EL_SP_MURPHY,                              MV_LEFT, ACTION_PUSHING,
+    EL_SP_MURPHY,                              ACTION_PUSHING, MV_BIT_LEFT,
     IMG_SP_MURPHY_LEFT_PUSHING
   },
   {
-    EL_SP_MURPHY,                              MV_LEFT, ACTION_SNAPPING,
+    EL_SP_MURPHY,                              ACTION_SNAPPING, MV_BIT_LEFT,
     IMG_SP_MURPHY_LEFT_SNAPPING
   },
   {
-    EL_SP_MURPHY,                              MV_RIGHT, -1,
+    EL_SP_MURPHY,                              -1, MV_BIT_RIGHT,
     IMG_SP_MURPHY_RIGHT
   },
   {
-    EL_SP_MURPHY,                              MV_RIGHT, ACTION_MOVING,
+    EL_SP_MURPHY,                              ACTION_MOVING, MV_BIT_RIGHT,
     IMG_SP_MURPHY_RIGHT_MOVING
   },
   {
-    EL_SP_MURPHY,                              MV_RIGHT, ACTION_DIGGING,
+    EL_SP_MURPHY,                              ACTION_DIGGING, MV_BIT_RIGHT,
     IMG_SP_MURPHY_RIGHT_DIGGING
   },
   {
-    EL_SP_MURPHY,                              MV_RIGHT, ACTION_PUSHING,
+    EL_SP_MURPHY,                              ACTION_PUSHING, MV_BIT_RIGHT,
     IMG_SP_MURPHY_RIGHT_PUSHING
   },
   {
-    EL_SP_MURPHY,                              MV_RIGHT, ACTION_SNAPPING,
+    EL_SP_MURPHY,                              ACTION_SNAPPING, MV_BIT_RIGHT,
     IMG_SP_MURPHY_RIGHT_SNAPPING
   },
   {
-    EL_SP_MURPHY,                              MV_UP, -1,
+    EL_SP_MURPHY,                              -1, MV_BIT_UP,
     IMG_SP_MURPHY_UP
   },
   {
-    EL_SP_MURPHY,                              MV_UP, ACTION_SNAPPING,
+    EL_SP_MURPHY,                              ACTION_SNAPPING, MV_BIT_UP,
     IMG_SP_MURPHY_UP_SNAPPING
   },
   {
-    EL_SP_MURPHY,                              MV_DOWN, -1,
+    EL_SP_MURPHY,                              -1, MV_BIT_DOWN,
     IMG_SP_MURPHY_DOWN
   },
   {
-    EL_SP_MURPHY,                              MV_DOWN, ACTION_SNAPPING,
+    EL_SP_MURPHY,                              ACTION_SNAPPING, MV_BIT_DOWN,
     IMG_SP_MURPHY_DOWN_SNAPPING
   },
   {
@@ -277,7 +277,7 @@ element_to_graphic[] =
     IMG_SP_INFOTRON
   },
   {
-    EL_SP_INFOTRON,                            -1, ACTION_FALLING,
+    EL_SP_INFOTRON,                            ACTION_FALLING, -1,
     IMG_SP_INFOTRON_FALLING
   },
   {
@@ -333,11 +333,11 @@ element_to_graphic[] =
     IMG_SP_DISK_ORANGE
   },
   {
-    EL_SP_DISK_ORANGE,                         -1, ACTION_FALLING,
+    EL_SP_DISK_ORANGE,                         ACTION_FALLING, -1,
     IMG_SP_DISK_ORANGE_FALLING
   },
   {
-    EL_SP_DISK_ORANGE,                         -1, ACTION_PUSHING,
+    EL_SP_DISK_ORANGE,                         ACTION_PUSHING, -1,
     IMG_SP_DISK_ORANGE_PUSHING
   },
   {
@@ -345,7 +345,7 @@ element_to_graphic[] =
     IMG_SP_DISK_YELLOW
   },
   {
-    EL_SP_DISK_YELLOW,                         -1, ACTION_PUSHING,
+    EL_SP_DISK_YELLOW,                         ACTION_PUSHING, -1,
     IMG_SP_DISK_YELLOW_PUSHING
   },
   {
@@ -353,7 +353,7 @@ element_to_graphic[] =
     IMG_SP_DISK_RED
   },
   {
-    EL_SP_DISK_RED,                            -1, ACTION_COLLECTING,
+    EL_SP_DISK_RED,                            ACTION_COLLECTING, -1,
     IMG_SP_DISK_RED_COLLECTING
   },
   {
@@ -405,19 +405,19 @@ element_to_graphic[] =
     IMG_SP_SNIKSNAK
   },
   {
-    EL_SP_SNIKSNAK,                            MV_LEFT, -1,
+    EL_SP_SNIKSNAK,                            -1, MV_BIT_LEFT,
     IMG_SP_SNIKSNAK_LEFT
   },
   {
-    EL_SP_SNIKSNAK,                            MV_RIGHT, -1,
+    EL_SP_SNIKSNAK,                            -1, MV_BIT_RIGHT,
     IMG_SP_SNIKSNAK_RIGHT
   },
   {
-    EL_SP_SNIKSNAK,                            MV_UP, -1,
+    EL_SP_SNIKSNAK,                            -1, MV_BIT_UP,
     IMG_SP_SNIKSNAK_UP
   },
   {
-    EL_SP_SNIKSNAK,                            MV_DOWN, -1,
+    EL_SP_SNIKSNAK,                            -1, MV_BIT_DOWN,
     IMG_SP_SNIKSNAK_DOWN
   },
   {
@@ -509,15 +509,15 @@ element_to_graphic[] =
     IMG_ROCK
   },
   {
-    EL_ROCK,                                   -1, ACTION_FALLING,
+    EL_ROCK,                                   ACTION_FALLING, -1,
     IMG_ROCK_FALLING
   },
   {
-    EL_ROCK,                                   MV_LEFT, ACTION_MOVING,
+    EL_ROCK,                                   ACTION_MOVING, MV_BIT_LEFT,
     IMG_ROCK_MOVING_LEFT
   },
   {
-    EL_ROCK,                                   MV_RIGHT, ACTION_MOVING,
+    EL_ROCK,                                   ACTION_MOVING, MV_BIT_RIGHT,
     IMG_ROCK_MOVING_RIGHT
   },
   {
@@ -525,11 +525,11 @@ element_to_graphic[] =
     IMG_EMERALD
   },
   {
-    EL_EMERALD,                                        -1, ACTION_MOVING,
+    EL_EMERALD,                                        ACTION_MOVING, -1,
     IMG_EMERALD_MOVING
   },
   {
-    EL_EMERALD,                                        -1, ACTION_FALLING,
+    EL_EMERALD,                                        ACTION_FALLING, -1,
     IMG_EMERALD_FALLING
   },
   {
@@ -537,11 +537,11 @@ element_to_graphic[] =
     IMG_DIAMOND
   },
   {
-    EL_DIAMOND,                                        -1, ACTION_MOVING,
+    EL_DIAMOND,                                        ACTION_MOVING, -1,
     IMG_DIAMOND_MOVING
   },
   {
-    EL_DIAMOND,                                        -1, ACTION_FALLING,
+    EL_DIAMOND,                                        ACTION_FALLING, -1,
     IMG_DIAMOND_FALLING
   },
   {
@@ -553,15 +553,15 @@ element_to_graphic[] =
     IMG_NUT
   },
   {
-    EL_NUT,                                    -1, ACTION_FALLING,
+    EL_NUT,                                    ACTION_FALLING, -1,
     IMG_NUT_FALLING
   },
   {
-    EL_NUT,                                    MV_LEFT, ACTION_MOVING,
+    EL_NUT,                                    ACTION_MOVING, MV_BIT_LEFT,
     IMG_NUT_MOVING_LEFT
   },
   {
-    EL_NUT,                                    MV_RIGHT, ACTION_MOVING,
+    EL_NUT,                                    ACTION_MOVING, MV_BIT_RIGHT,
     IMG_NUT_MOVING_RIGHT
   },
   {
@@ -589,7 +589,7 @@ element_to_graphic[] =
     IMG_BUG_RIGHT
   },
   {
-    EL_BUG,                                    MV_RIGHT, -1,
+    EL_BUG,                                    -1, MV_BIT_RIGHT,
     IMG_BUG_RIGHT
   },
   {
@@ -597,7 +597,7 @@ element_to_graphic[] =
     IMG_BUG_UP
   },
   {
-    EL_BUG,                                    MV_UP, -1,
+    EL_BUG,                                    -1, MV_BIT_UP,
     IMG_BUG_UP
   },
   {
@@ -605,7 +605,7 @@ element_to_graphic[] =
     IMG_BUG_LEFT
   },
   {
-    EL_BUG,                                    MV_LEFT, -1,
+    EL_BUG,                                    -1, MV_BIT_LEFT,
     IMG_BUG_LEFT
   },
   {
@@ -613,7 +613,7 @@ element_to_graphic[] =
     IMG_BUG_DOWN
   },
   {
-    EL_BUG,                                    MV_DOWN, -1,
+    EL_BUG,                                    -1, MV_BIT_DOWN,
     IMG_BUG_DOWN
   },
   {
@@ -621,7 +621,7 @@ element_to_graphic[] =
     IMG_SPACESHIP_RIGHT
   },
   {
-    EL_SPACESHIP,                              MV_RIGHT, -1,
+    EL_SPACESHIP,                              -1, MV_BIT_RIGHT,
     IMG_SPACESHIP_RIGHT
   },
   {
@@ -629,7 +629,7 @@ element_to_graphic[] =
     IMG_SPACESHIP_UP
   },
   {
-    EL_SPACESHIP,                              MV_UP, -1,
+    EL_SPACESHIP,                              -1, MV_BIT_UP,
     IMG_SPACESHIP_UP
   },
   {
@@ -637,7 +637,7 @@ element_to_graphic[] =
     IMG_SPACESHIP_LEFT
   },
   {
-    EL_SPACESHIP,                              MV_LEFT, -1,
+    EL_SPACESHIP,                              -1, MV_BIT_LEFT,
     IMG_SPACESHIP_LEFT
   },
   {
@@ -645,7 +645,7 @@ element_to_graphic[] =
     IMG_SPACESHIP_DOWN
   },
   {
-    EL_SPACESHIP,                              MV_DOWN, -1,
+    EL_SPACESHIP,                              -1, MV_BIT_DOWN,
     IMG_SPACESHIP_DOWN
   },
   {
@@ -653,7 +653,7 @@ element_to_graphic[] =
     IMG_YAMYAM
   },
   {
-    EL_YAMYAM,                                 -1, ACTION_MOVING,
+    EL_YAMYAM,                                 ACTION_MOVING, -1,
     IMG_YAMYAM_MOVING
   },
   {
@@ -661,7 +661,7 @@ element_to_graphic[] =
     IMG_ROBOT
   },
   {
-    EL_ROBOT,                                  -1, ACTION_MOVING,
+    EL_ROBOT,                                  ACTION_MOVING, -1,
     IMG_ROBOT_MOVING
   },
   {
@@ -801,19 +801,19 @@ element_to_graphic[] =
     IMG_AMOEBA_FULL
   },
   {
-    EL_AMOEBA_FULL,                            -1, ACTION_OTHER,
+    EL_AMOEBA_FULL,                            ACTION_OTHER, -1,
     IMG_AMOEBA_FULL_PART1
   },
   {
-    EL_AMOEBA_FULL,                            -1, ACTION_OTHER,
+    EL_AMOEBA_FULL,                            ACTION_OTHER, -1,
     IMG_AMOEBA_FULL_PART2
   },
   {
-    EL_AMOEBA_FULL,                            -1, ACTION_OTHER,
+    EL_AMOEBA_FULL,                            ACTION_OTHER, -1,
     IMG_AMOEBA_FULL_PART3
   },
   {
-    EL_AMOEBA_FULL,                            -1, ACTION_OTHER,
+    EL_AMOEBA_FULL,                            ACTION_OTHER, -1,
     IMG_AMOEBA_FULL_PART4
   },
   {
@@ -901,7 +901,7 @@ element_to_graphic[] =
     IMG_BALLOON
   },
   {
-    EL_BALLOON,                                        -1, ACTION_MOVING,
+    EL_BALLOON,                                        ACTION_MOVING, -1,
     IMG_BALLOON_MOVING
   },
   {
@@ -929,7 +929,7 @@ element_to_graphic[] =
     IMG_SPRING
   },
   {
-    EL_SPRING,                                 -1, ACTION_MOVING,
+    EL_SPRING,                                 ACTION_MOVING, -1,
     IMG_SPRING_MOVING
   },
   {
@@ -1381,7 +1381,7 @@ element_to_graphic[] =
     IMG_PACMAN_RIGHT
   },
   {
-    EL_PACMAN,                                 MV_RIGHT, -1,
+    EL_PACMAN,                                 -1, MV_BIT_RIGHT,
     IMG_PACMAN_RIGHT
   },
   {
@@ -1389,7 +1389,7 @@ element_to_graphic[] =
     IMG_PACMAN_UP
   },
   {
-    EL_PACMAN,                                 MV_UP, -1,
+    EL_PACMAN,                                 -1, MV_BIT_UP,
     IMG_PACMAN_UP
   },
   {
@@ -1397,7 +1397,7 @@ element_to_graphic[] =
     IMG_PACMAN_LEFT
   },
   {
-    EL_PACMAN,                                 MV_LEFT, -1,
+    EL_PACMAN,                                 -1, MV_BIT_LEFT,
     IMG_PACMAN_LEFT
   },
   {
@@ -1405,7 +1405,7 @@ element_to_graphic[] =
     IMG_PACMAN_DOWN
   },
   {
-    EL_PACMAN,                                 MV_DOWN, -1,
+    EL_PACMAN,                                 -1, MV_BIT_DOWN,
     IMG_PACMAN_DOWN
   },
   {
@@ -1429,11 +1429,11 @@ element_to_graphic[] =
     IMG_EMERALD_YELLOW
   },
   {
-    EL_EMERALD_YELLOW,                         -1, ACTION_MOVING,
+    EL_EMERALD_YELLOW,                         ACTION_MOVING, -1,
     IMG_EMERALD_YELLOW_MOVING
   },
   {
-    EL_EMERALD_YELLOW,                         -1, ACTION_FALLING,
+    EL_EMERALD_YELLOW,                         ACTION_FALLING, -1,
     IMG_EMERALD_YELLOW_FALLING
   },
   {
@@ -1441,11 +1441,11 @@ element_to_graphic[] =
     IMG_EMERALD_RED
   },
   {
-    EL_EMERALD_RED,                            -1, ACTION_MOVING,
+    EL_EMERALD_RED,                            ACTION_MOVING, -1,
     IMG_EMERALD_RED_MOVING
   },
   {
-    EL_EMERALD_RED,                            -1, ACTION_FALLING,
+    EL_EMERALD_RED,                            ACTION_FALLING, -1,
     IMG_EMERALD_RED_FALLING
   },
   {
@@ -1453,11 +1453,11 @@ element_to_graphic[] =
     IMG_EMERALD_PURPLE
   },
   {
-    EL_EMERALD_PURPLE,                         -1, ACTION_MOVING,
+    EL_EMERALD_PURPLE,                         ACTION_MOVING, -1,
     IMG_EMERALD_PURPLE_MOVING
   },
   {
-    EL_EMERALD_PURPLE,                         -1, ACTION_FALLING,
+    EL_EMERALD_PURPLE,                         ACTION_FALLING, -1,
     IMG_EMERALD_PURPLE_FALLING
   },
   {
@@ -1493,19 +1493,19 @@ element_to_graphic[] =
     IMG_WALL_GROWING_Y
   },
   {
-    EL_WALL_GROWING_ACTIVE,                    MV_LEFT, -1,
+    EL_WALL_GROWING_ACTIVE,                    -1, MV_BIT_LEFT,
     IMG_WALL_GROWING_ACTIVE_LEFT
   },
   {
-    EL_WALL_GROWING_ACTIVE,                    MV_RIGHT, -1,
+    EL_WALL_GROWING_ACTIVE,                    -1, MV_BIT_RIGHT,
     IMG_WALL_GROWING_ACTIVE_RIGHT
   },
   {
-    EL_WALL_GROWING_ACTIVE,                    MV_UP, -1,
+    EL_WALL_GROWING_ACTIVE,                    -1, MV_BIT_UP,
     IMG_WALL_GROWING_ACTIVE_UP
   },
   {
-    EL_WALL_GROWING_ACTIVE,                    MV_DOWN, -1,
+    EL_WALL_GROWING_ACTIVE,                    -1, MV_BIT_DOWN,
     IMG_WALL_GROWING_ACTIVE_DOWN
   },
   {
@@ -1557,51 +1557,51 @@ element_to_graphic[] =
     IMG_PIG
   },
   {
-    EL_PIG,                                    MV_DOWN, -1,
+    EL_PIG,                                    -1, MV_BIT_DOWN,
     IMG_PIG_DOWN
   },
   {
-    EL_PIG,                                    MV_DOWN, ACTION_MOVING,
+    EL_PIG,                                    ACTION_MOVING, MV_BIT_DOWN,
     IMG_PIG_DOWN_MOVING
   },
   {
-    EL_PIG,                                    MV_DOWN, ACTION_EATING,
+    EL_PIG,                                    ACTION_EATING, MV_BIT_DOWN,
     IMG_PIG_DOWN_EATING
   },
   {
-    EL_PIG,                                    MV_UP, -1,
+    EL_PIG,                                    -1, MV_BIT_UP,
     IMG_PIG_UP
   },
   {
-    EL_PIG,                                    MV_UP, ACTION_MOVING,
+    EL_PIG,                                    ACTION_MOVING, MV_BIT_UP,
     IMG_PIG_UP_MOVING
   },
   {
-    EL_PIG,                                    MV_UP, ACTION_EATING,
+    EL_PIG,                                    ACTION_EATING, MV_BIT_UP,
     IMG_PIG_UP_EATING
   },
   {
-    EL_PIG,                                    MV_LEFT, -1,
+    EL_PIG,                                    -1, MV_BIT_LEFT,
     IMG_PIG_LEFT
   },
   {
-    EL_PIG,                                    MV_LEFT, ACTION_MOVING,
+    EL_PIG,                                    ACTION_MOVING, MV_BIT_LEFT,
     IMG_PIG_LEFT_MOVING
   },
   {
-    EL_PIG,                                    MV_LEFT, ACTION_EATING,
+    EL_PIG,                                    ACTION_EATING, MV_BIT_LEFT,
     IMG_PIG_LEFT_EATING
   },
   {
-    EL_PIG,                                    MV_RIGHT, -1,
+    EL_PIG,                                    -1, MV_BIT_RIGHT,
     IMG_PIG_RIGHT
   },
   {
-    EL_PIG,                                    MV_RIGHT, ACTION_MOVING,
+    EL_PIG,                                    ACTION_MOVING, MV_BIT_RIGHT,
     IMG_PIG_RIGHT_MOVING
   },
   {
-    EL_PIG,                                    MV_RIGHT, ACTION_EATING,
+    EL_PIG,                                    ACTION_EATING, MV_BIT_RIGHT,
     IMG_PIG_RIGHT_EATING
   },
   {
@@ -1609,51 +1609,51 @@ element_to_graphic[] =
     IMG_DRAGON
   },
   {
-    EL_DRAGON,                                 MV_DOWN, -1,
+    EL_DRAGON,                                 -1, MV_BIT_DOWN,
     IMG_DRAGON_DOWN
   },
   {
-    EL_DRAGON,                                 MV_DOWN, ACTION_MOVING,
+    EL_DRAGON,                                 ACTION_MOVING, MV_BIT_DOWN,
     IMG_DRAGON_DOWN_MOVING
   },
   {
-    EL_DRAGON,                                 MV_DOWN, ACTION_ATTACKING,
+    EL_DRAGON,                                 ACTION_ATTACKING, MV_BIT_DOWN,
     IMG_DRAGON_DOWN_ATTACKING
   },
   {
-    EL_DRAGON,                                 MV_UP, -1,
+    EL_DRAGON,                                 -1, MV_BIT_UP,
     IMG_DRAGON_UP
   },
   {
-    EL_DRAGON,                                 MV_UP, ACTION_MOVING,
+    EL_DRAGON,                                 ACTION_MOVING, MV_BIT_UP,
     IMG_DRAGON_UP_MOVING
   },
   {
-    EL_DRAGON,                                 MV_UP, ACTION_ATTACKING,
+    EL_DRAGON,                                 ACTION_ATTACKING, MV_BIT_UP,
     IMG_DRAGON_UP_ATTACKING
   },
   {
-    EL_DRAGON,                                 MV_LEFT, -1,
+    EL_DRAGON,                                 -1, MV_BIT_LEFT,
     IMG_DRAGON_LEFT
   },
   {
-    EL_DRAGON,                                 MV_LEFT, ACTION_MOVING,
+    EL_DRAGON,                                 ACTION_MOVING, MV_BIT_LEFT,
     IMG_DRAGON_LEFT_MOVING
   },
   {
-    EL_DRAGON,                                 MV_LEFT, ACTION_ATTACKING,
+    EL_DRAGON,                                 ACTION_ATTACKING, MV_BIT_LEFT,
     IMG_DRAGON_LEFT_ATTACKING
   },
   {
-    EL_DRAGON,                                 MV_RIGHT, -1,
+    EL_DRAGON,                                 -1, MV_BIT_RIGHT,
     IMG_DRAGON_RIGHT
   },
   {
-    EL_DRAGON,                                 MV_RIGHT, ACTION_MOVING,
+    EL_DRAGON,                                 ACTION_MOVING, MV_BIT_RIGHT,
     IMG_DRAGON_RIGHT_MOVING
   },
   {
-    EL_DRAGON,                                 MV_RIGHT, ACTION_ATTACKING,
+    EL_DRAGON,                                 ACTION_ATTACKING, MV_BIT_RIGHT,
     IMG_DRAGON_RIGHT_ATTACKING
   },
   {
@@ -1665,23 +1665,23 @@ element_to_graphic[] =
     IMG_MOLE_DOWN
   },
   {
-    EL_MOLE,                                   MV_DOWN, -1,
+    EL_MOLE,                                   -1, MV_BIT_DOWN,
     IMG_MOLE_DOWN
   },
   {
-    EL_MOLE_DOWN,                              -1, ACTION_MOVING,
+    EL_MOLE_DOWN,                              ACTION_MOVING, -1,
     IMG_MOLE_DOWN_MOVING
   },
   {
-    EL_MOLE,                                   MV_DOWN, ACTION_MOVING,
+    EL_MOLE,                                   ACTION_MOVING, MV_BIT_DOWN,
     IMG_MOLE_DOWN_MOVING
   },
   {
-    EL_MOLE_DOWN,                              -1, ACTION_DIGGING,
+    EL_MOLE_DOWN,                              ACTION_DIGGING, -1,
     IMG_MOLE_DOWN_DIGGING
   },
   {
-    EL_MOLE,                                   MV_DOWN, ACTION_DIGGING,
+    EL_MOLE,                                   ACTION_DIGGING, MV_BIT_DOWN,
     IMG_MOLE_DOWN_DIGGING
   },
   {
@@ -1689,23 +1689,23 @@ element_to_graphic[] =
     IMG_MOLE_UP
   },
   {
-    EL_MOLE,                                   MV_UP, -1,
+    EL_MOLE,                                   -1, MV_BIT_UP,
     IMG_MOLE_UP
   },
   {
-    EL_MOLE_UP,                                        -1, ACTION_MOVING,
+    EL_MOLE_UP,                                        ACTION_MOVING, -1,
     IMG_MOLE_UP_MOVING
   },
   {
-    EL_MOLE,                                   MV_UP, ACTION_MOVING,
+    EL_MOLE,                                   ACTION_MOVING, MV_BIT_UP,
     IMG_MOLE_UP_MOVING
   },
   {
-    EL_MOLE_UP,                                        -1, ACTION_DIGGING,
+    EL_MOLE_UP,                                        ACTION_DIGGING, -1,
     IMG_MOLE_UP_DIGGING
   },
   {
-    EL_MOLE,                                   MV_UP, ACTION_DIGGING,
+    EL_MOLE,                                   ACTION_DIGGING, MV_BIT_UP,
     IMG_MOLE_UP_DIGGING
   },
   {
@@ -1713,23 +1713,23 @@ element_to_graphic[] =
     IMG_MOLE_LEFT
   },
   {
-    EL_MOLE,                                   MV_LEFT, -1,
+    EL_MOLE,                                   -1, MV_BIT_LEFT,
     IMG_MOLE_LEFT
   },
   {
-    EL_MOLE_LEFT,                              -1, ACTION_MOVING,
+    EL_MOLE_LEFT,                              ACTION_MOVING, -1,
     IMG_MOLE_LEFT_MOVING
   },
   {
-    EL_MOLE,                                   MV_LEFT, ACTION_MOVING,
+    EL_MOLE,                                   ACTION_MOVING, MV_BIT_LEFT,
     IMG_MOLE_LEFT_MOVING
   },
   {
-    EL_MOLE_LEFT,                              -1, ACTION_DIGGING,
+    EL_MOLE_LEFT,                              ACTION_DIGGING, -1,
     IMG_MOLE_LEFT_DIGGING
   },
   {
-    EL_MOLE,                                   MV_LEFT, ACTION_DIGGING,
+    EL_MOLE,                                   ACTION_DIGGING, MV_BIT_LEFT,
     IMG_MOLE_LEFT_DIGGING
   },
   {
@@ -1737,23 +1737,23 @@ element_to_graphic[] =
     IMG_MOLE_RIGHT
   },
   {
-    EL_MOLE,                                   MV_RIGHT, -1,
+    EL_MOLE,                                   -1, MV_BIT_RIGHT,
     IMG_MOLE_RIGHT
   },
   {
-    EL_MOLE_RIGHT,                             -1, ACTION_MOVING,
+    EL_MOLE_RIGHT,                             ACTION_MOVING, -1,
     IMG_MOLE_RIGHT_MOVING
   },
   {
-    EL_MOLE,                                   MV_RIGHT, ACTION_MOVING,
+    EL_MOLE,                                   ACTION_MOVING, MV_BIT_RIGHT,
     IMG_MOLE_RIGHT_MOVING
   },
   {
-    EL_MOLE_RIGHT,                             -1, ACTION_DIGGING,
+    EL_MOLE_RIGHT,                             ACTION_DIGGING, -1,
     IMG_MOLE_RIGHT_DIGGING
   },
   {
-    EL_MOLE,                                   MV_RIGHT, ACTION_DIGGING,
+    EL_MOLE,                                   ACTION_DIGGING, MV_BIT_RIGHT,
     IMG_MOLE_RIGHT_DIGGING
   },
   {
@@ -1761,35 +1761,35 @@ element_to_graphic[] =
     IMG_PENGUIN
   },
   {
-    EL_PENGUIN,                                        MV_DOWN, -1,
+    EL_PENGUIN,                                        -1, MV_BIT_DOWN,
     IMG_PENGUIN_DOWN
   },
   {
-    EL_PENGUIN,                                        MV_DOWN, ACTION_MOVING,
+    EL_PENGUIN,                                        ACTION_MOVING, MV_BIT_DOWN,
     IMG_PENGUIN_DOWN_MOVING
   },
   {
-    EL_PENGUIN,                                        MV_UP, -1,
+    EL_PENGUIN,                                        -1, MV_BIT_UP,
     IMG_PENGUIN_UP
   },
   {
-    EL_PENGUIN,                                        MV_UP, ACTION_MOVING,
+    EL_PENGUIN,                                        ACTION_MOVING, MV_BIT_UP,
     IMG_PENGUIN_UP_MOVING
   },
   {
-    EL_PENGUIN,                                        MV_LEFT, -1,
+    EL_PENGUIN,                                        -1, MV_BIT_LEFT,
     IMG_PENGUIN_LEFT
   },
   {
-    EL_PENGUIN,                                        MV_LEFT, ACTION_MOVING,
+    EL_PENGUIN,                                        ACTION_MOVING, MV_BIT_LEFT,
     IMG_PENGUIN_LEFT_MOVING
   },
   {
-    EL_PENGUIN,                                        MV_RIGHT, -1,
+    EL_PENGUIN,                                        -1, MV_BIT_RIGHT,
     IMG_PENGUIN_RIGHT
   },
   {
-    EL_PENGUIN,                                        MV_RIGHT, ACTION_MOVING,
+    EL_PENGUIN,                                        ACTION_MOVING, MV_BIT_RIGHT,
     IMG_PENGUIN_RIGHT_MOVING
   },
   {
@@ -1797,7 +1797,7 @@ element_to_graphic[] =
     IMG_SATELLITE
   },
   {
-    EL_SATELLITE,                              -1, ACTION_MOVING,
+    EL_SATELLITE,                              ACTION_MOVING, -1,
     IMG_SATELLITE_MOVING
   },
   {
@@ -1809,83 +1809,83 @@ element_to_graphic[] =
     IMG_PLAYER1
   },
   {
-    EL_PLAYER1,                                        MV_DOWN, -1,
+    EL_PLAYER1,                                        -1, MV_BIT_DOWN,
     IMG_PLAYER1_DOWN
   },
   {
-    EL_PLAYER1,                                        MV_DOWN, ACTION_MOVING,
+    EL_PLAYER1,                                        ACTION_MOVING, MV_BIT_DOWN,
     IMG_PLAYER1_DOWN_MOVING
   },
   {
-    EL_PLAYER1,                                        MV_DOWN, ACTION_DIGGING,
+    EL_PLAYER1,                                        ACTION_DIGGING, MV_BIT_DOWN,
     IMG_PLAYER1_DOWN_DIGGING
   },
   {
-    EL_PLAYER1,                                        MV_DOWN, ACTION_PUSHING,
+    EL_PLAYER1,                                        ACTION_PUSHING, MV_BIT_DOWN,
     IMG_PLAYER1_DOWN_PUSHING
   },
   {
-    EL_PLAYER1,                                        MV_DOWN, ACTION_SNAPPING,
+    EL_PLAYER1,                                        ACTION_SNAPPING, MV_BIT_DOWN,
     IMG_PLAYER1_DOWN_SNAPPING
   },
   {
-    EL_PLAYER1,                                        MV_UP, -1,
+    EL_PLAYER1,                                        -1, MV_BIT_UP,
     IMG_PLAYER1_UP
   },
   {
-    EL_PLAYER1,                                        MV_UP, ACTION_MOVING,
+    EL_PLAYER1,                                        ACTION_MOVING, MV_BIT_UP,
     IMG_PLAYER1_UP_MOVING
   },
   {
-    EL_PLAYER1,                                        MV_UP, ACTION_DIGGING,
+    EL_PLAYER1,                                        ACTION_DIGGING, MV_BIT_UP,
     IMG_PLAYER1_UP_DIGGING
   },
   {
-    EL_PLAYER1,                                        MV_UP, ACTION_PUSHING,
+    EL_PLAYER1,                                        ACTION_PUSHING, MV_BIT_UP,
     IMG_PLAYER1_UP_PUSHING
   },
   {
-    EL_PLAYER1,                                        MV_UP, ACTION_SNAPPING,
+    EL_PLAYER1,                                        ACTION_SNAPPING, MV_BIT_UP,
     IMG_PLAYER1_UP_SNAPPING
   },
   {
-    EL_PLAYER1,                                        MV_LEFT, -1,
+    EL_PLAYER1,                                        -1, MV_BIT_LEFT,
     IMG_PLAYER1_LEFT
   },
   {
-    EL_PLAYER1,                                        MV_LEFT, ACTION_MOVING,
+    EL_PLAYER1,                                        ACTION_MOVING, MV_BIT_LEFT,
     IMG_PLAYER1_LEFT_MOVING
   },
   {
-    EL_PLAYER1,                                        MV_LEFT, ACTION_DIGGING,
+    EL_PLAYER1,                                        ACTION_DIGGING, MV_BIT_LEFT,
     IMG_PLAYER1_LEFT_DIGGING
   },
   {
-    EL_PLAYER1,                                        MV_LEFT, ACTION_PUSHING,
+    EL_PLAYER1,                                        ACTION_PUSHING, MV_BIT_LEFT,
     IMG_PLAYER1_LEFT_PUSHING
   },
   {
-    EL_PLAYER1,                                        MV_LEFT, ACTION_SNAPPING,
+    EL_PLAYER1,                                        ACTION_SNAPPING, MV_BIT_LEFT,
     IMG_PLAYER1_LEFT_SNAPPING
   },
   {
-    EL_PLAYER1,                                        MV_RIGHT, -1,
+    EL_PLAYER1,                                        -1, MV_BIT_RIGHT,
     IMG_PLAYER1_RIGHT
   },
   {
-    EL_PLAYER1,                                        MV_RIGHT, ACTION_MOVING,
+    EL_PLAYER1,                                        ACTION_MOVING, MV_BIT_RIGHT,
     IMG_PLAYER1_RIGHT_MOVING
   },
   {
-    EL_PLAYER1,                                        MV_RIGHT, ACTION_DIGGING,
+    EL_PLAYER1,                                        ACTION_DIGGING, MV_BIT_RIGHT,
     IMG_PLAYER1_RIGHT_DIGGING
   },
   {
-    EL_PLAYER1,                                        MV_RIGHT, ACTION_PUSHING,
+    EL_PLAYER1,                                        ACTION_PUSHING, MV_BIT_RIGHT,
     IMG_PLAYER1_RIGHT_PUSHING
   },
   {
-    EL_PLAYER1,                                        MV_RIGHT, ACTION_SNAPPING,
+    EL_PLAYER1,                                        ACTION_SNAPPING, MV_BIT_RIGHT,
     IMG_PLAYER1_RIGHT_SNAPPING
   },
   {
@@ -1893,83 +1893,83 @@ element_to_graphic[] =
     IMG_PLAYER2
   },
   {
-    EL_PLAYER2,                                        MV_DOWN, -1,
+    EL_PLAYER2,                                        -1, MV_BIT_DOWN,
     IMG_PLAYER2_DOWN
   },
   {
-    EL_PLAYER2,                                        MV_DOWN, ACTION_MOVING,
+    EL_PLAYER2,                                        ACTION_MOVING, MV_BIT_DOWN,
     IMG_PLAYER2_DOWN_MOVING
   },
   {
-    EL_PLAYER2,                                        MV_DOWN, ACTION_DIGGING,
+    EL_PLAYER2,                                        ACTION_DIGGING, MV_BIT_DOWN,
     IMG_PLAYER2_DOWN_DIGGING
   },
   {
-    EL_PLAYER2,                                        MV_DOWN, ACTION_PUSHING,
+    EL_PLAYER2,                                        ACTION_PUSHING, MV_BIT_DOWN,
     IMG_PLAYER2_DOWN_PUSHING
   },
   {
-    EL_PLAYER2,                                        MV_DOWN, ACTION_SNAPPING,
+    EL_PLAYER2,                                        ACTION_SNAPPING, MV_BIT_DOWN,
     IMG_PLAYER2_DOWN_SNAPPING
   },
   {
-    EL_PLAYER2,                                        MV_UP, -1,
+    EL_PLAYER2,                                        -1, MV_BIT_UP,
     IMG_PLAYER2_UP
   },
   {
-    EL_PLAYER2,                                        MV_UP, ACTION_MOVING,
+    EL_PLAYER2,                                        ACTION_MOVING, MV_BIT_UP,
     IMG_PLAYER2_UP_MOVING
   },
   {
-    EL_PLAYER2,                                        MV_UP, ACTION_DIGGING,
+    EL_PLAYER2,                                        ACTION_DIGGING, MV_BIT_UP,
     IMG_PLAYER2_UP_DIGGING
   },
   {
-    EL_PLAYER2,                                        MV_UP, ACTION_PUSHING,
+    EL_PLAYER2,                                        ACTION_PUSHING, MV_BIT_UP,
     IMG_PLAYER2_UP_PUSHING
   },
   {
-    EL_PLAYER2,                                        MV_UP, ACTION_SNAPPING,
+    EL_PLAYER2,                                        ACTION_SNAPPING, MV_BIT_UP,
     IMG_PLAYER2_UP_SNAPPING
   },
   {
-    EL_PLAYER2,                                        MV_LEFT, -1,
+    EL_PLAYER2,                                        -1, MV_BIT_LEFT,
     IMG_PLAYER2_LEFT
   },
   {
-    EL_PLAYER2,                                        MV_LEFT, ACTION_MOVING,
+    EL_PLAYER2,                                        ACTION_MOVING, MV_BIT_LEFT,
     IMG_PLAYER2_LEFT_MOVING
   },
   {
-    EL_PLAYER2,                                        MV_LEFT, ACTION_DIGGING,
+    EL_PLAYER2,                                        ACTION_DIGGING, MV_BIT_LEFT,
     IMG_PLAYER2_LEFT_DIGGING
   },
   {
-    EL_PLAYER2,                                        MV_LEFT, ACTION_PUSHING,
+    EL_PLAYER2,                                        ACTION_PUSHING, MV_BIT_LEFT,
     IMG_PLAYER2_LEFT_PUSHING
   },
   {
-    EL_PLAYER2,                                        MV_LEFT, ACTION_SNAPPING,
+    EL_PLAYER2,                                        ACTION_SNAPPING, MV_BIT_LEFT,
     IMG_PLAYER2_LEFT_SNAPPING
   },
   {
-    EL_PLAYER2,                                        MV_RIGHT, -1,
+    EL_PLAYER2,                                        -1, MV_BIT_RIGHT,
     IMG_PLAYER2_RIGHT
   },
   {
-    EL_PLAYER2,                                        MV_RIGHT, ACTION_MOVING,
+    EL_PLAYER2,                                        ACTION_MOVING, MV_BIT_RIGHT,
     IMG_PLAYER2_RIGHT_MOVING
   },
   {
-    EL_PLAYER2,                                        MV_RIGHT, ACTION_DIGGING,
+    EL_PLAYER2,                                        ACTION_DIGGING, MV_BIT_RIGHT,
     IMG_PLAYER2_RIGHT_DIGGING
   },
   {
-    EL_PLAYER2,                                        MV_RIGHT, ACTION_PUSHING,
+    EL_PLAYER2,                                        ACTION_PUSHING, MV_BIT_RIGHT,
     IMG_PLAYER2_RIGHT_PUSHING
   },
   {
-    EL_PLAYER2,                                        MV_RIGHT, ACTION_SNAPPING,
+    EL_PLAYER2,                                        ACTION_SNAPPING, MV_BIT_RIGHT,
     IMG_PLAYER2_RIGHT_SNAPPING
   },
   {
@@ -1977,83 +1977,83 @@ element_to_graphic[] =
     IMG_PLAYER3
   },
   {
-    EL_PLAYER3,                                        MV_DOWN, -1,
+    EL_PLAYER3,                                        -1, MV_BIT_DOWN,
     IMG_PLAYER3_DOWN
   },
   {
-    EL_PLAYER3,                                        MV_DOWN, ACTION_MOVING,
+    EL_PLAYER3,                                        ACTION_MOVING, MV_BIT_DOWN,
     IMG_PLAYER3_DOWN_MOVING
   },
   {
-    EL_PLAYER3,                                        MV_DOWN, ACTION_DIGGING,
+    EL_PLAYER3,                                        ACTION_DIGGING, MV_BIT_DOWN,
     IMG_PLAYER3_DOWN_DIGGING
   },
   {
-    EL_PLAYER3,                                        MV_DOWN, ACTION_PUSHING,
+    EL_PLAYER3,                                        ACTION_PUSHING, MV_BIT_DOWN,
     IMG_PLAYER3_DOWN_PUSHING
   },
   {
-    EL_PLAYER3,                                        MV_DOWN, ACTION_SNAPPING,
+    EL_PLAYER3,                                        ACTION_SNAPPING, MV_BIT_DOWN,
     IMG_PLAYER3_DOWN_SNAPPING
   },
   {
-    EL_PLAYER3,                                        MV_UP, -1,
+    EL_PLAYER3,                                        -1, MV_BIT_UP,
     IMG_PLAYER3_UP
   },
   {
-    EL_PLAYER3,                                        MV_UP, ACTION_MOVING,
+    EL_PLAYER3,                                        ACTION_MOVING, MV_BIT_UP,
     IMG_PLAYER3_UP_MOVING
   },
   {
-    EL_PLAYER3,                                        MV_UP, ACTION_DIGGING,
+    EL_PLAYER3,                                        ACTION_DIGGING, MV_BIT_UP,
     IMG_PLAYER3_UP_DIGGING
   },
   {
-    EL_PLAYER3,                                        MV_UP, ACTION_PUSHING,
+    EL_PLAYER3,                                        ACTION_PUSHING, MV_BIT_UP,
     IMG_PLAYER3_UP_PUSHING
   },
   {
-    EL_PLAYER3,                                        MV_UP, ACTION_SNAPPING,
+    EL_PLAYER3,                                        ACTION_SNAPPING, MV_BIT_UP,
     IMG_PLAYER3_UP_SNAPPING
   },
   {
-    EL_PLAYER3,                                        MV_LEFT, -1,
+    EL_PLAYER3,                                        -1, MV_BIT_LEFT,
     IMG_PLAYER3_LEFT
   },
   {
-    EL_PLAYER3,                                        MV_LEFT, ACTION_MOVING,
+    EL_PLAYER3,                                        ACTION_MOVING, MV_BIT_LEFT,
     IMG_PLAYER3_LEFT_MOVING
   },
   {
-    EL_PLAYER3,                                        MV_LEFT, ACTION_DIGGING,
+    EL_PLAYER3,                                        ACTION_DIGGING, MV_BIT_LEFT,
     IMG_PLAYER3_LEFT_DIGGING
   },
   {
-    EL_PLAYER3,                                        MV_LEFT, ACTION_PUSHING,
+    EL_PLAYER3,                                        ACTION_PUSHING, MV_BIT_LEFT,
     IMG_PLAYER3_LEFT_PUSHING
   },
   {
-    EL_PLAYER3,                                        MV_LEFT, ACTION_SNAPPING,
+    EL_PLAYER3,                                        ACTION_SNAPPING, MV_BIT_LEFT,
     IMG_PLAYER3_LEFT_SNAPPING
   },
   {
-    EL_PLAYER3,                                        MV_RIGHT, -1,
+    EL_PLAYER3,                                        -1, MV_BIT_RIGHT,
     IMG_PLAYER3_RIGHT
   },
   {
-    EL_PLAYER3,                                        MV_RIGHT, ACTION_MOVING,
+    EL_PLAYER3,                                        ACTION_MOVING, MV_BIT_RIGHT,
     IMG_PLAYER3_RIGHT_MOVING
   },
   {
-    EL_PLAYER3,                                        MV_RIGHT, ACTION_DIGGING,
+    EL_PLAYER3,                                        ACTION_DIGGING, MV_BIT_RIGHT,
     IMG_PLAYER3_RIGHT_DIGGING
   },
   {
-    EL_PLAYER3,                                        MV_RIGHT, ACTION_PUSHING,
+    EL_PLAYER3,                                        ACTION_PUSHING, MV_BIT_RIGHT,
     IMG_PLAYER3_RIGHT_PUSHING
   },
   {
-    EL_PLAYER3,                                        MV_RIGHT, ACTION_SNAPPING,
+    EL_PLAYER3,                                        ACTION_SNAPPING, MV_BIT_RIGHT,
     IMG_PLAYER3_RIGHT_SNAPPING
   },
   {
@@ -2061,83 +2061,83 @@ element_to_graphic[] =
     IMG_PLAYER4
   },
   {
-    EL_PLAYER4,                                        MV_DOWN, -1,
+    EL_PLAYER4,                                        -1, MV_BIT_DOWN,
     IMG_PLAYER4_DOWN
   },
   {
-    EL_PLAYER4,                                        MV_DOWN, ACTION_MOVING,
+    EL_PLAYER4,                                        ACTION_MOVING, MV_BIT_DOWN,
     IMG_PLAYER4_DOWN_MOVING
   },
   {
-    EL_PLAYER4,                                        MV_DOWN, ACTION_DIGGING,
+    EL_PLAYER4,                                        ACTION_DIGGING, MV_BIT_DOWN,
     IMG_PLAYER4_DOWN_DIGGING
   },
   {
-    EL_PLAYER4,                                        MV_DOWN, ACTION_PUSHING,
+    EL_PLAYER4,                                        ACTION_PUSHING, MV_BIT_DOWN,
     IMG_PLAYER4_DOWN_PUSHING
   },
   {
-    EL_PLAYER4,                                        MV_DOWN, ACTION_SNAPPING,
+    EL_PLAYER4,                                        ACTION_SNAPPING, MV_BIT_DOWN,
     IMG_PLAYER4_DOWN_SNAPPING
   },
   {
-    EL_PLAYER4,                                        MV_UP, -1,
+    EL_PLAYER4,                                        -1, MV_BIT_UP,
     IMG_PLAYER4_UP
   },
   {
-    EL_PLAYER4,                                        MV_UP, ACTION_MOVING,
+    EL_PLAYER4,                                        ACTION_MOVING, MV_BIT_UP,
     IMG_PLAYER4_UP_MOVING
   },
   {
-    EL_PLAYER4,                                        MV_UP, ACTION_DIGGING,
+    EL_PLAYER4,                                        ACTION_DIGGING, MV_BIT_UP,
     IMG_PLAYER4_UP_DIGGING
   },
   {
-    EL_PLAYER4,                                        MV_UP, ACTION_PUSHING,
+    EL_PLAYER4,                                        ACTION_PUSHING, MV_BIT_UP,
     IMG_PLAYER4_UP_PUSHING
   },
   {
-    EL_PLAYER4,                                        MV_UP, ACTION_SNAPPING,
+    EL_PLAYER4,                                        ACTION_SNAPPING, MV_BIT_UP,
     IMG_PLAYER4_UP_SNAPPING
   },
   {
-    EL_PLAYER4,                                        MV_LEFT, -1,
+    EL_PLAYER4,                                        -1, MV_BIT_LEFT,
     IMG_PLAYER4_LEFT
   },
   {
-    EL_PLAYER4,                                        MV_LEFT, ACTION_MOVING,
+    EL_PLAYER4,                                        ACTION_MOVING, MV_BIT_LEFT,
     IMG_PLAYER4_LEFT_MOVING
   },
   {
-    EL_PLAYER4,                                        MV_LEFT, ACTION_DIGGING,
+    EL_PLAYER4,                                        ACTION_DIGGING, MV_BIT_LEFT,
     IMG_PLAYER4_LEFT_DIGGING
   },
   {
-    EL_PLAYER4,                                        MV_LEFT, ACTION_PUSHING,
+    EL_PLAYER4,                                        ACTION_PUSHING, MV_BIT_LEFT,
     IMG_PLAYER4_LEFT_PUSHING
   },
   {
-    EL_PLAYER4,                                        MV_LEFT, ACTION_SNAPPING,
+    EL_PLAYER4,                                        ACTION_SNAPPING, MV_BIT_LEFT,
     IMG_PLAYER4_LEFT_SNAPPING
   },
   {
-    EL_PLAYER4,                                        MV_RIGHT, -1,
+    EL_PLAYER4,                                        -1, MV_BIT_RIGHT,
     IMG_PLAYER4_RIGHT
   },
   {
-    EL_PLAYER4,                                        MV_RIGHT, ACTION_MOVING,
+    EL_PLAYER4,                                        ACTION_MOVING, MV_BIT_RIGHT,
     IMG_PLAYER4_RIGHT_MOVING
   },
   {
-    EL_PLAYER4,                                        MV_RIGHT, ACTION_DIGGING,
+    EL_PLAYER4,                                        ACTION_DIGGING, MV_BIT_RIGHT,
     IMG_PLAYER4_RIGHT_DIGGING
   },
   {
-    EL_PLAYER4,                                        MV_RIGHT, ACTION_PUSHING,
+    EL_PLAYER4,                                        ACTION_PUSHING, MV_BIT_RIGHT,
     IMG_PLAYER4_RIGHT_PUSHING
   },
   {
-    EL_PLAYER4,                                        MV_RIGHT, ACTION_SNAPPING,
+    EL_PLAYER4,                                        ACTION_SNAPPING, MV_BIT_RIGHT,
     IMG_PLAYER4_RIGHT_SNAPPING
   },
   {
index 939aaac0806c784d247a29816233ddfca07e2caa..5db99e5e9fa9351acac71c3251b38d38629b41c4 100644 (file)
@@ -1 +1 @@
-#define COMPILE_DATE_STRING "[2003-01-20 22:54]"
+#define COMPILE_DATE_STRING "[2003-01-21 00:27]"
index 61838c68232306d4dda9e3da361cd8e0e9c774dc..6365f42f26be32f947f1a7bb2029b3deac75c7f2 100644 (file)
@@ -73,7 +73,8 @@ static void InitGfx(void);
 static void InitGfxBackground(void);
 static void InitGadgets(void);
 static void InitElementProperties(void);
-static void InitElementInfo(void);
+static void InitElementGraphicInfo(void);
+static void InitElementSoundInfo(void);
 static void InitGraphicInfo(void);
 static void InitSoundInfo();
 static void Execute_Command(char *);
@@ -119,7 +120,6 @@ void OpenAll(void)
   InitEventFilter(FilterMouseMotionEvents);
 
   InitElementProperties();
-  InitElementInfo();
 
   InitGfx();
 
@@ -242,7 +242,8 @@ static void InitMixer()
 
 static void ReinitializeGraphics()
 {
-  InitGraphicInfo();   /* initialize graphic info from config file */
+  InitElementGraphicInfo();    /* initialize element/graphic config info */
+  InitGraphicInfo();           /* initialize graphic info from config file */
 
   InitFontInfo(bitmap_font_initial,
               graphic_info[IMG_FONT_BIG].bitmap,
@@ -259,9 +260,10 @@ static void ReinitializeGraphics()
 
 static void ReinitializeSounds()
 {
-  InitSoundInfo();     /* initialize sounds info from config file */
+  InitElementSoundInfo();      /* initialize element/sound config info */
+  InitSoundInfo();             /* initialize sounds info from config file */
 
-  InitPlaySoundLevel();
+  InitPlaySoundLevel();                /* initialize internal game sound values */
 }
 
 static void ReinitializeMusic()
@@ -698,8 +700,10 @@ void InitGadgets()
   gadgets_initialized = TRUE;
 }
 
-void InitElementInfo()
+void InitElementGraphicInfo()
 {
+  struct PropertyMapping *property_mapping = getImageListPropertyMapping();
+  int num_property_mappings = getImageListPropertyMappingSize();
   int i, act, dir;
 
   /* set values to -1 to identify later as "uninitialized" values */
@@ -722,27 +726,38 @@ void InitElementInfo()
     element_info[i].graphic[ACTION_DEFAULT] =
       IMG_CUSTOM_START + (i - EL_CUSTOM_START);
 
-  i = 0;
-  while (element_to_graphic[i].element > -1)
+  /* initialize element/graphic mapping from static configuration */
+  for (i=0; element_to_graphic[i].element > -1; i++)
   {
     int element   = element_to_graphic[i].element;
-    int direction = element_to_graphic[i].direction;
     int action    = element_to_graphic[i].action;
+    int direction = element_to_graphic[i].direction;
     int graphic   = element_to_graphic[i].graphic;
 
     if (action < 0)
       action = ACTION_DEFAULT;
 
     if (direction > -1)
-    {
-      direction = MV_DIR_BIT(direction);
-
       element_info[element].direction_graphic[action][direction] = graphic;
-    }
     else
       element_info[element].graphic[action] = graphic;
+  }
+
+  /* initialize element/graphic mapping from dynamic configuration */
+  for (i=0; i < num_property_mappings; i++)
+  {
+    int element   = property_mapping[i].base_index;
+    int action    = property_mapping[i].ext1_index;
+    int direction = property_mapping[i].ext2_index;
+    int graphic   = property_mapping[i].artwork_index;
+
+    if (action < 0)
+      action = ACTION_DEFAULT;
 
-    i++;
+    if (direction > -1)
+      element_info[element].direction_graphic[action][direction] = graphic;
+    else
+      element_info[element].graphic[action] = graphic;
   }
 
   /* now set all '-1' values to element specific default values */
@@ -785,6 +800,11 @@ void InitElementInfo()
   }
 }
 
+static void InitElementSoundInfo()
+{
+  /* soon to come */
+}
+
 static void set_graphic_parameters(int graphic, int *parameter)
 {
   Bitmap *src_bitmap = getBitmapFromImageID(graphic);
@@ -1015,14 +1035,11 @@ static void InitSoundInfo()
     struct FileInfo *sound = getSoundListEntry(i);
     int len_effect_text = strlen(sound->token);
 
-#if 1
     sound_effect_properties[i] = ACTION_OTHER;
     sound_info[i].loop = FALSE;
-#endif
 
     /* determine all loop sounds and identify certain sound classes */
 
-#if 1
     for (j=0; element_action_info[j].suffix; j++)
     {
       int len_action_text = strlen(element_action_info[j].suffix);
@@ -1037,11 +1054,9 @@ static void InitSoundInfo()
          sound_info[i].loop = TRUE;
       }
     }
-#endif
 
     /* associate elements and some selected sound actions */
 
-#if 1
     for (j=0; j<MAX_NUM_ELEMENTS; j++)
     {
       if (element_info[j].sound_class_name)
@@ -1059,7 +1074,6 @@ static void InitSoundInfo()
        }
       }
     }
-#endif
 
     set_sound_parameters(i, sound->parameter);
   }
index ddec954a6dd3480e1469107eaa10aba67e4c5198..31975e04b29850fa988377c88f6ccfcec57e2cef 100644 (file)
@@ -734,6 +734,16 @@ char *getImageConfigFilename()
   return getCustomArtworkConfigFilename(image_info->type);
 }
 
+int getImageListPropertyMappingSize()
+{
+  return image_info->num_property_mapping_entries;
+}
+
+struct PropertyMapping *getImageListPropertyMapping()
+{
+  return image_info->property_mapping;
+}
+
 void InitImageList(struct ConfigInfo *config_list, int num_file_list_entries,
                   struct ConfigInfo *config_suffix_list,
                   char **base_prefixes,
@@ -750,15 +760,15 @@ void InitImageList(struct ConfigInfo *config_list, int num_file_list_entries,
   image_info->num_file_list_entries = num_file_list_entries;
   image_info->num_dynamic_file_list_entries = 0;
 
-  image_info->num_suffix_list_entries = 0;
-  for (i=0; config_suffix_list[i].token != NULL; i++)
-    image_info->num_suffix_list_entries++;
-
   image_info->file_list =
     getFileListFromConfigList(config_list, config_suffix_list,
                              num_file_list_entries);
   image_info->dynamic_file_list = NULL;
 
+  image_info->num_suffix_list_entries = 0;
+  for (i=0; config_suffix_list[i].token != NULL; i++)
+    image_info->num_suffix_list_entries++;
+
   image_info->suffix_list = config_suffix_list;
 
   /* ---------- initialize base prefix and suffixes lists ---------- */
@@ -779,6 +789,10 @@ void InitImageList(struct ConfigInfo *config_list, int num_file_list_entries,
   image_info->ext1_suffixes = ext1_suffixes;
   image_info->ext2_suffixes = ext2_suffixes;
 
+  image_info->num_property_mapping_entries = 0;
+
+  image_info->property_mapping = NULL;
+
   /* ---------- initialize artwork reference and content lists ---------- */
 
   image_info->sizeof_artwork_list_entry = sizeof(ImageInfo *);
index e8eaaca9e97bf5c850bea6702a1246be6235f9c5..6b9e6459fbb0784a09f67538fdf419eb157bd01b 100644 (file)
@@ -76,6 +76,8 @@ struct FileInfo *getImageListEntry(int);
 Bitmap *getBitmapFromImageID(int);
 char *getTokenFromImageID(int);
 char *getImageConfigFilename();
+int getImageListPropertyMappingSize();
+struct PropertyMapping *getImageListPropertyMapping();
 void InitImageList(struct ConfigInfo *, int, struct ConfigInfo *,
                   char **, char **, char **);
 void ReloadCustomImages();
index 31138a682a1f68677556bac20fdedf814af3a79d..42c7616c03257bef1e575160592782eb89870bdd 100644 (file)
@@ -1709,6 +1709,25 @@ static void add_dynamic_file_list_entry(struct FileInfo **list,
   read_token_parameters(extra_file_list, suffix_list, new_list_entry);
 }
 
+static void add_property_mapping(struct PropertyMapping **list,
+                                int *num_list_entries,
+                                int base_index, int ext1_index,int ext2_index,
+                                int artwork_index)
+{
+  struct PropertyMapping *new_list_entry;
+
+  (*num_list_entries)++;
+  *list = checked_realloc(*list,
+                         *num_list_entries * sizeof(struct PropertyMapping));
+  new_list_entry = &(*list)[*num_list_entries - 1];
+
+  new_list_entry->base_index = base_index;
+  new_list_entry->ext1_index = ext1_index;
+  new_list_entry->ext2_index = ext2_index;
+
+  new_list_entry->artwork_index = artwork_index;
+}
+
 void LoadArtworkConfig(struct ArtworkListInfo *artwork_info)
 {
   struct FileInfo *file_list = artwork_info->file_list;
@@ -1762,6 +1781,15 @@ void LoadArtworkConfig(struct ArtworkListInfo *artwork_info)
                          &artwork_info->num_dynamic_file_list_entries);
   }
 
+  /* free previous property mapping */
+  if (artwork_info->property_mapping != NULL)
+  {
+    free(artwork_info->property_mapping);
+
+    artwork_info->property_mapping = NULL;
+    artwork_info->num_property_mapping_entries = 0;
+  }
+
   if (filename == NULL)
     return;
 
@@ -1795,9 +1823,17 @@ void LoadArtworkConfig(struct ArtworkListInfo *artwork_info)
 
   for (list = extra_file_list; list != NULL; list = list->next)
   {
-    struct FileInfo **dynamic_file_list = &artwork_info->dynamic_file_list;
+    struct FileInfo **dynamic_file_list =
+      &artwork_info->dynamic_file_list;
     int *num_dynamic_file_list_entries =
       &artwork_info->num_dynamic_file_list_entries;
+    struct PropertyMapping **property_mapping =
+      &artwork_info->property_mapping;
+    int *num_property_mapping_entries =
+      &artwork_info->num_property_mapping_entries;
+    int current_summarized_file_list_entry =
+      artwork_info->num_file_list_entries +
+      artwork_info->num_dynamic_file_list_entries;
     char *token = list->token;
     int len_token = strlen(token);
     int start_pos;
@@ -1848,6 +1884,10 @@ void LoadArtworkConfig(struct ArtworkListInfo *artwork_info)
                                    suffix_list,
                                    num_suffix_list_entries,
                                    token);
+       add_property_mapping(property_mapping,
+                            num_property_mapping_entries,
+                            i, -1, -1,
+                            current_summarized_file_list_entry);
        continue;
       }
 
@@ -1878,6 +1918,10 @@ void LoadArtworkConfig(struct ArtworkListInfo *artwork_info)
                                      suffix_list,
                                      num_suffix_list_entries,
                                      token);
+         add_property_mapping(property_mapping,
+                              num_property_mapping_entries,
+                              i, j, -1,
+                              current_summarized_file_list_entry);
          continue;
        }
 
@@ -1907,6 +1951,10 @@ void LoadArtworkConfig(struct ArtworkListInfo *artwork_info)
                                        suffix_list,
                                        num_suffix_list_entries,
                                        token);
+           add_property_mapping(property_mapping,
+                                num_property_mapping_entries,
+                                i, j, k,
+                                current_summarized_file_list_entry);
            continue;
          }
        }
index e5994e55c828346f3e8bdd380733d838ca27e8bc..ffb9925b47533b7106e55f672caae4b3c10c64ff 100644 (file)
@@ -1780,6 +1780,16 @@ struct FileInfo *getSoundListEntry(int pos)
          &sound_info->dynamic_file_list[list_pos]);
 }
 
+int getSoundListPropertyMappingSize()
+{
+  return sound_info->num_property_mapping_entries;
+}
+
+struct PropertyMapping *getSoundListPropertyMapping()
+{
+  return sound_info->property_mapping;
+}
+
 void InitSoundList(struct ConfigInfo *config_list, int num_file_list_entries,
                   struct ConfigInfo *config_suffix_list,
                   char **base_prefixes,
@@ -1796,15 +1806,15 @@ void InitSoundList(struct ConfigInfo *config_list, int num_file_list_entries,
   sound_info->num_file_list_entries = num_file_list_entries;
   sound_info->num_dynamic_file_list_entries = 0;
 
-  sound_info->num_suffix_list_entries = 0;
-  for (i=0; config_suffix_list[i].token != NULL; i++)
-    sound_info->num_suffix_list_entries++;
-
   sound_info->file_list =
     getFileListFromConfigList(config_list, config_suffix_list,
                              num_file_list_entries);
   sound_info->dynamic_file_list = NULL;
 
+  sound_info->num_suffix_list_entries = 0;
+  for (i=0; config_suffix_list[i].token != NULL; i++)
+    sound_info->num_suffix_list_entries++;
+
   sound_info->suffix_list = config_suffix_list;
 
   /* ---------- initialize base prefix and suffixes lists ---------- */
@@ -1825,6 +1835,10 @@ void InitSoundList(struct ConfigInfo *config_list, int num_file_list_entries,
   sound_info->ext1_suffixes = ext1_suffixes;
   sound_info->ext2_suffixes = ext2_suffixes;
 
+  sound_info->num_property_mapping_entries = 0;
+
+  sound_info->property_mapping = NULL;
+
   /* ---------- initialize artwork reference and content lists ---------- */
 
   sound_info->sizeof_artwork_list_entry = sizeof(SoundInfo *);
index f304e81233f278ba1fa83c02d573a5abe0b85c29..81d938f1f5aded89584e214c80c6a3f33b9c2ca7 100644 (file)
@@ -145,6 +145,8 @@ void StopSoundExt(int, int);
 
 int getSoundListSize();
 struct FileInfo *getSoundListEntry(int);
+int getSoundListPropertyMappingSize();
+struct PropertyMapping *getSoundListPropertyMapping();
 void InitSoundList(struct ConfigInfo *, int, struct ConfigInfo *,
                   char **, char **, char **);
 void InitReloadCustomSounds(char *);
index b932605be9231608c91c29988182081c232b1645..423f49c5d56f1540924991a660d5b679f153a887 100644 (file)
@@ -511,6 +511,15 @@ struct ListNodeInfo
   int num_references;
 };
 
+struct PropertyMapping
+{
+  int base_index;
+  int ext1_index;
+  int ext2_index;
+
+  int artwork_index;
+};
+
 struct ArtworkListInfo
 {
   int type;                                    /* type of artwork */
@@ -518,11 +527,11 @@ struct ArtworkListInfo
   int num_file_list_entries;
   int num_dynamic_file_list_entries;
 
-  int num_suffix_list_entries;
-
   struct FileInfo *file_list;                  /* static artwork file array */
   struct FileInfo *dynamic_file_list;          /* dynamic artwrk file array */
 
+  int num_suffix_list_entries;
+
   struct ConfigInfo *suffix_list;              /* parameter suffixes array */
 
   int num_base_prefixes;
@@ -533,6 +542,10 @@ struct ArtworkListInfo
   char **ext1_suffixes;                                /* property suffixes array 1 */
   char **ext2_suffixes;                                /* property suffixes array 2 */
 
+  int num_property_mapping_entries;
+
+  struct PropertyMapping *property_mapping;    /* mapping token -> artwork */
+
   int sizeof_artwork_list_entry;
 
   struct ListNodeInfo **artwork_list;          /* static artwork node array */