rnd-20021117-1-src
[rocksndiamonds.git] / src / main.c
index 23660fbd5f98dc942c7d28d4fb1bb8dd66252991..364cedcde6db75c423e4279e78e9d073e432f336 100644 (file)
@@ -151,13 +151,17 @@ int graphics_action_mapping[] =
   6,           /* GFX_ACTION_PUSHING           (7)  */
 
   7,           /* GFX_ACTION_PASSING           (8)  */
-  7,           /* GFX_ACTION_IMPACT            (9) */
+  7,           /* GFX_ACTION_IMPACT            (9)  */
   7,           /* GFX_ACTION_CRACKING          (10) */
-  7,           /* GFX_ACTION_ACTIVATING        (11) */
-  7,           /* GFX_ACTION_EATING            (12) */
-  7,           /* GFX_ACTION_ATTACKING         (13) */
-  7,           /* GFX_ACTION_GROWING           (14) */
-  7            /* GFX_ACTION_OTHER             (15) */
+  7,           /* GFX_ACTION_BREAKING          (11) */
+  7,           /* GFX_ACTION_ACTIVATING        (12) */
+  7,           /* GFX_ACTION_OPENING           (13) */
+  7,           /* GFX_ACTION_CLOSING           (14) */
+  7,           /* GFX_ACTION_EATING            (15) */
+  7,           /* GFX_ACTION_ATTACKING         (16) */
+  7,           /* GFX_ACTION_GROWING           (17) */
+  7,           /* GFX_ACTION_SHRINKING         (18) */
+  7            /* GFX_ACTION_OTHER             (19) */
 };
 
 struct ConfigInfo image_config_suffix[] =
@@ -167,16 +171,14 @@ struct ConfigInfo image_config_suffix[] =
   { ".offset",                         "32"                    },
   { ".vertical",                       "0"                     },
   { ".frames",                         "1"                     },
-#if 0
   { ".start_frame",                    "-1"                    },
-#endif
   { ".delay",                          "1"                     },
   { ".mode_loop",                      "0"                     },
   { ".mode_linear",                    "0"                     },
   { ".mode_pingpong",                  "0"                     },
   { ".mode_pingpong2",                 "0"                     },
   { ".mode_reverse",                   "0"                     },
-  { ".global_sync",                    "0"                     },
+  { ".global_sync",                    "-1"                    },
 
   { NULL,                              NULL                    }
 };
@@ -203,10 +205,18 @@ struct ConfigInfo image_config[] =
   { "bd_rock.falling.xpos",                    "4"                     },
   { "bd_rock.falling.ypos",                    "2"                     },
   { "bd_rock.falling.frames",                  "1"                     },
-  { "bd_rock.pushing",                         "RocksMore.pcx"         },
-  { "bd_rock.pushing.xpos",                    "4"                     },
-  { "bd_rock.pushing.ypos",                    "2"                     },
-  { "bd_rock.pushing.frames",                  "4"                     },
+  { "bd_rock.moving_left",                     "RocksMore.pcx"         },
+  { "bd_rock.moving_left.xpos",                        "4"                     },
+  { "bd_rock.moving_left.ypos",                        "2"                     },
+  { "bd_rock.moving_left.frames",              "4"                     },
+  { "bd_rock.moving_left.delay",               "2"                     },
+  { "bd_rock.moving_left.mode_reverse",                "1"                     },
+  { "bd_rock.moving_right",                    "RocksMore.pcx"         },
+  { "bd_rock.moving_right.xpos",               "4"                     },
+  { "bd_rock.moving_right.ypos",               "2"                     },
+  { "bd_rock.moving_right.frames",             "4"                     },
+  { "bd_rock.moving_right.start_frame",                "1"                     },
+  { "bd_rock.moving_right.delay",              "2"                     },
 
   { "bd_diamond",                              "RocksElements.pcx"     },
   { "bd_diamond.xpos",                         "0"                     },
@@ -214,10 +224,16 @@ struct ConfigInfo image_config[] =
   { "bd_diamond.frames",                       "4"                     },
   { "bd_diamond.delay",                                "4"                     },
   { "bd_diamond.mode_reverse",                 "1"                     },
+  { "bd_diamond.moving",                       "RocksElements.pcx"     },
+  { "bd_diamond.moving.xpos",                  "3"                     },
+  { "bd_diamond.moving.ypos",                  "10"                    },
+  { "bd_diamond.moving.frames",                        "2"                     },
+  { "bd_diamond.moving.delay",                 "4"                     },
   { "bd_diamond.falling",                      "RocksElements.pcx"     },
   { "bd_diamond.falling.xpos",                 "3"                     },
   { "bd_diamond.falling.ypos",                 "10"                    },
   { "bd_diamond.falling.frames",               "2"                     },
+  { "bd_diamond.falling.delay",                        "4"                     },
 
   { "bd_magic_wall",                           "RocksElements.pcx"     },
   { "bd_magic_wall.xpos",                      "12"                    },
@@ -346,10 +362,18 @@ struct ConfigInfo image_config[] =
   { "sp_zonk.falling.xpos",                    "1"                     },
   { "sp_zonk.falling.ypos",                    "0"                     },
   { "sp_zonk.falling.frames",                  "1"                     },
-  { "sp_zonk.pushing",                         "RocksSP.pcx"           },
-  { "sp_zonk.pushing.xpos",                    "0"                     },
-  { "sp_zonk.pushing.ypos",                    "6"                     },
-  { "sp_zonk.pushing.frames",                  "4"                     },
+  { "sp_zonk.moving_left",                     "RocksSP.pcx"           },
+  { "sp_zonk.moving_left.xpos",                        "0"                     },
+  { "sp_zonk.moving_left.ypos",                        "6"                     },
+  { "sp_zonk.moving_left.frames",              "4"                     },
+  { "sp_zonk.moving_left.delay",               "2"                     },
+  { "sp_zonk.moving_left.mode_reverse",                "1"                     },
+  { "sp_zonk.moving_right",                    "RocksSP.pcx"           },
+  { "sp_zonk.moving_right.xpos",               "0"                     },
+  { "sp_zonk.moving_right.ypos",               "6"                     },
+  { "sp_zonk.moving_right.frames",             "4"                     },
+  { "sp_zonk.moving_right.start_frame",                "1"                     },
+  { "sp_zonk.moving_right.delay",              "2"                     },
 
   { "sp_base",                                 "RocksSP.pcx"           },
   { "sp_base.xpos",                            "2"                     },
@@ -369,11 +393,13 @@ struct ConfigInfo image_config[] =
   { "sp_murphy_left.moving.ypos",              "0"                     },
   { "sp_murphy_left.moving.frames",            "3"                     },
   { "sp_murphy_left.moving.mode_pingpong",     "1"                     },
+  { "sp_murphy_left.moving.delay",             "2"                     },
   { "sp_murphy_left.digging",                  "RocksSP.pcx"           },
   { "sp_murphy_left.digging.xpos",             "8"                     },
   { "sp_murphy_left.digging.ypos",             "0"                     },
   { "sp_murphy_left.digging.frames",           "3"                     },
   { "sp_murphy_left.digging.mode_pingpong",    "1"                     },
+  { "sp_murphy_left.digging.delay",            "2"                     },
   { "sp_murphy_left.pushing",                  "RocksSP.pcx"           },
   { "sp_murphy_left.pushing.xpos",             "11"                    },
   { "sp_murphy_left.pushing.ypos",             "1"                     },
@@ -392,11 +418,13 @@ struct ConfigInfo image_config[] =
   { "sp_murphy_right.moving.ypos",             "0"                     },
   { "sp_murphy_right.moving.frames",           "3"                     },
   { "sp_murphy_right.moving.mode_pingpong",    "1"                     },
+  { "sp_murphy_right.moving.delay",            "2"                     },
   { "sp_murphy_right.digging",                 "RocksSP.pcx"           },
   { "sp_murphy_right.digging.xpos",            "11"                    },
   { "sp_murphy_right.digging.ypos",            "0"                     },
   { "sp_murphy_right.digging.frames",          "3"                     },
   { "sp_murphy_right.digging.mode_pingpong",   "1"                     },
+  { "sp_murphy_right.digging.delay",           "2"                     },
   { "sp_murphy_right.pushing",                 "RocksSP.pcx"           },
   { "sp_murphy_right.pushing.xpos",            "10"                    },
   { "sp_murphy_right.pushing.ypos",            "1"                     },
@@ -595,7 +623,6 @@ struct ConfigInfo image_config[] =
   { "sp_electron.ypos",                                "10"                    },
   { "sp_electron.frames",                      "8"                     },
   { "sp_electron.delay",                       "2"                     },
-  { "sp_electron.global_sync",                 "1"                     },
 
   { "sp_terminal",                             "RocksSP.pcx"           },
   { "sp_terminal.xpos",                                "8"                     },
@@ -706,28 +733,48 @@ struct ConfigInfo image_config[] =
   { "rock.falling.xpos",                       "12"                    },
   { "rock.falling.ypos",                       "0"                     },
   { "rock.falling.frames",                     "1"                     },
-  { "rock.pushing",                            "RocksElements.pcx"     },
-  { "rock.pushing.xpos",                       "12"                    },
-  { "rock.pushing.ypos",                       "0"                     },
-  { "rock.pushing.frames",                     "4"                     },
+  { "rock.moving_left",                                "RocksElements.pcx"     },
+  { "rock.moving_left.xpos",                   "12"                    },
+  { "rock.moving_left.ypos",                   "0"                     },
+  { "rock.moving_left.frames",                 "4"                     },
+  { "rock.moving_left.delay",                  "2"                     },
+  { "rock.moving_left.mode_reverse",           "1"                     },
+  { "rock.moving_right",                       "RocksElements.pcx"     },
+  { "rock.moving_right.xpos",                  "12"                    },
+  { "rock.moving_right.ypos",                  "0"                     },
+  { "rock.moving_right.frames",                        "4"                     },
+  { "rock.moving_right.start_frame",           "1"                     },
+  { "rock.moving_right.delay",                 "2"                     },
 
   { "emerald",                                 "RocksElements.pcx"     },
   { "emerald.xpos",                            "8"                     },
   { "emerald.ypos",                            "0"                     },
   { "emerald.frames",                          "1"                     },
+  { "emerald.moving",                          "RocksElements.pcx"     },
+  { "emerald.moving.xpos",                     "8"                     },
+  { "emerald.moving.ypos",                     "0"                     },
+  { "emerald.moving.frames",                   "2"                     },
+  { "emerald.moving.delay",                    "4"                     },
   { "emerald.falling",                         "RocksElements.pcx"     },
   { "emerald.falling.xpos",                    "8"                     },
   { "emerald.falling.ypos",                    "0"                     },
   { "emerald.falling.frames",                  "2"                     },
+  { "emerald.falling.delay",                   "4"                     },
 
   { "diamond",                                 "RocksElements.pcx"     },
   { "diamond.xpos",                            "10"                    },
   { "diamond.ypos",                            "0"                     },
   { "diamond.frames",                          "1"                     },
+  { "diamond.moving",                          "RocksElements.pcx"     },
+  { "diamond.moving.xpos",                     "10"                    },
+  { "diamond.moving.ypos",                     "0"                     },
+  { "diamond.moving.frames",                   "2"                     },
+  { "diamond.moving.delay",                    "4"                     },
   { "diamond.falling",                         "RocksElements.pcx"     },
   { "diamond.falling.xpos",                    "10"                    },
   { "diamond.falling.ypos",                    "0"                     },
   { "diamond.falling.frames",                  "2"                     },
+  { "diamond.falling.delay",                   "4"                     },
 
   { "bomb",                                    "RocksElements.pcx"     },
   { "bomb.xpos",                               "11"                    },
@@ -755,6 +802,7 @@ struct ConfigInfo image_config[] =
   { "dynamite.active.frames",                  "7"                     },
   { "dynamite.active.delay",                   "12"                    },
   { "dynamite.active.mode_linear",             "1"                     },
+  { "dynamite.active.global_sync",             "0"                     },
 
   { "wall_emerald",                            "RocksElements.pcx"     },
   { "wall_emerald.xpos",                       "4"                     },
@@ -823,6 +871,10 @@ struct ConfigInfo image_config[] =
   { "robot.ypos",                              "5"                     },
   { "robot.frames",                            "4"                     },
   { "robot.mode_pingpong2",                    "1"                     },
+  { "robot.moving",                            "RocksElements.pcx"     },
+  { "robot.moving.xpos",                       "4"                     },
+  { "robot.moving.ypos",                       "5"                     },
+  { "robot.moving.frames",                     "1"                     },
 
   { "robot_wheel",                             "RocksElements.pcx"     },
   { "robot_wheel.xpos",                                "0"                     },
@@ -910,16 +962,18 @@ struct ConfigInfo image_config[] =
   { "acid.frames",                             "4"                     },
   { "acid.delay",                              "10"                    },
 
-  { "acid.splashing_left",                     "RocksHeroes.pcx"       },
-  { "acid.splashing_left.xpos",                        "8"                     },
-  { "acid.splashing_left.ypos",                        "10"                    },
-  { "acid.splashing_left.frames",              "4"                     },
-  { "acid.splashing_left.delay",               "2"                     },
-  { "acid.splashing_right",                    "RocksHeroes.pcx"       },
-  { "acid.splashing_right.xpos",               "12"                    },
-  { "acid.splashing_right.ypos",               "10"                    },
-  { "acid.splashing_right.frames",             "4"                     },
-  { "acid.splashing_right.delay",              "2"                     },
+  { "acid_splash_left",                                "RocksHeroes.pcx"       },
+  { "acid_splash_left.xpos",                   "8"                     },
+  { "acid_splash_left.ypos",                   "10"                    },
+  { "acid_splash_left.frames",                 "4"                     },
+  { "acid_splash_left.delay",                  "2"                     },
+  { "acid_splash_left.global_sync",            "0"                     },
+  { "acid_splash_right",                       "RocksHeroes.pcx"       },
+  { "acid_splash_right.xpos",                  "12"                    },
+  { "acid_splash_right.ypos",                  "10"                    },
+  { "acid_splash_right.frames",                        "4"                     },
+  { "acid_splash_right.delay",                 "2"                     },
+  { "acid_splash_right.global_sync",           "0"                     },
 
   { "amoeba_drop",                             "RocksElements.pcx"     },
   { "amoeba_drop.xpos",                                "5"                     },
@@ -1446,12 +1500,14 @@ struct ConfigInfo image_config[] =
   { "shield_normal.active.xpos",               "1"                     },
   { "shield_normal.active.ypos",               "13"                    },
   { "shield_normal.active.frames",             "3"                     },
+  { "shield_normal.active.delay",              "8"                     },
   { "shield_normal.active.mode_pingpong",      "1"                     },
 
   { "shield_deadly.active",                    "RocksHeroes.pcx"       },
   { "shield_deadly.active.xpos",               "5"                     },
   { "shield_deadly.active.ypos",               "13"                    },
   { "shield_deadly.active.frames",             "3"                     },
+  { "shield_deadly.active.delay",              "8"                     },
   { "shield_deadly.active.mode_pingpong",      "1"                     },
 
   { "switchgate_closed",                       "RocksDC.pcx"           },
@@ -1762,21 +1818,25 @@ struct ConfigInfo image_config[] =
   { "wall_growing_active_left.ypos",           "10"                    },
   { "wall_growing_active_left.frames",         "3"                     },
   { "wall_growing_active_left.delay",          "6"                     },
+  { "wall_growing_active_left.global_sync",    "0"                     },
   { "wall_growing_active_right",               "RocksElements.pcx"     },
   { "wall_growing_active_right.xpos",          "5"                     },
   { "wall_growing_active_right.ypos",          "10"                    },
   { "wall_growing_active_right.frames",                "3"                     },
   { "wall_growing_active_right.delay",         "6"                     },
+  { "wall_growing_active_right.global_sync",   "0"                     },
   { "wall_growing_active_up",                  "RocksHeroes.pcx"       },
   { "wall_growing_active_up.xpos",             "3"                     },
   { "wall_growing_active_up.ypos",             "12"                    },
   { "wall_growing_active_up.frames",           "3"                     },
   { "wall_growing_active_up.delay",            "6"                     },
+  { "wall_growing_active_up.global_sync",      "0"                     },
   { "wall_growing_active_down",                        "RocksHeroes.pcx"       },
   { "wall_growing_active_down.xpos",           "0"                     },
   { "wall_growing_active_down.ypos",           "12"                    },
   { "wall_growing_active_down.frames",         "3"                     },
   { "wall_growing_active_down.delay",          "6"                     },
+  { "wall_growing_active_down.global_sync",    "0"                     },
 
   { "black_orb",                               "RocksElements.pcx"     },
   { "black_orb.xpos",                          "13"                    },
@@ -2151,14 +2211,17 @@ struct ConfigInfo image_config[] =
   { "player1_down.moving.xpos",                        "0"                     },
   { "player1_down.moving.ypos",                        "0"                     },
   { "player1_down.moving.frames",              "4"                     },
+  { "player1_down.moving.start_frame",         "1"                     },
+  { "player1_down.moving.delay",               "4"                     },
   { "player1_down.digging",                    "RocksHeroes.pcx"       },
   { "player1_down.digging.xpos",               "0"                     },
   { "player1_down.digging.ypos",               "0"                     },
   { "player1_down.digging.frames",             "4"                     },
   { "player1_down.pushing",                    "RocksHeroes.pcx"       },
   { "player1_down.pushing.xpos",               "0"                     },
-  { "player1_down.pushing.ypos",               "2"                     },
+  { "player1_down.pushing.ypos",               "0"                     },
   { "player1_down.pushing.frames",             "4"                     },
+  { "player1_down.pushing.delay",              "2"                     },
   { "player1_down.snapping",                   "RocksHeroes.pcx"       },
   { "player1_down.snapping.xpos",              "0"                     },
   { "player1_down.snapping.ypos",              "0"                     },
@@ -2171,6 +2234,8 @@ struct ConfigInfo image_config[] =
   { "player1_up.moving.xpos",                  "4"                     },
   { "player1_up.moving.ypos",                  "0"                     },
   { "player1_up.moving.frames",                        "4"                     },
+  { "player1_up.moving.start_frame",           "1"                     },
+  { "player1_up.moving.delay",                 "4"                     },
   { "player1_up.digging",                      "RocksHeroes.pcx"       },
   { "player1_up.digging.xpos",                 "4"                     },
   { "player1_up.digging.ypos",                 "0"                     },
@@ -2179,6 +2244,7 @@ struct ConfigInfo image_config[] =
   { "player1_up.pushing.xpos",                 "4"                     },
   { "player1_up.pushing.ypos",                 "0"                     },
   { "player1_up.pushing.frames",               "4"                     },
+  { "player1_up.pushing.delay",                        "2"                     },
   { "player1_up.snapping",                     "RocksHeroes.pcx"       },
   { "player1_up.snapping.xpos",                        "4"                     },
   { "player1_up.snapping.ypos",                        "0"                     },
@@ -2191,6 +2257,8 @@ struct ConfigInfo image_config[] =
   { "player1_left.moving.xpos",                        "0"                     },
   { "player1_left.moving.ypos",                        "1"                     },
   { "player1_left.moving.frames",              "4"                     },
+  { "player1_left.moving.start_frame",         "1"                     },
+  { "player1_left.moving.delay",               "4"                     },
   { "player1_left.digging",                    "RocksHeroes.pcx"       },
   { "player1_left.digging.xpos",               "0"                     },
   { "player1_left.digging.ypos",               "1"                     },
@@ -2199,6 +2267,7 @@ struct ConfigInfo image_config[] =
   { "player1_left.pushing.xpos",               "4"                     },
   { "player1_left.pushing.ypos",               "2"                     },
   { "player1_left.pushing.frames",             "4"                     },
+  { "player1_left.pushing.delay",              "2"                     },
   { "player1_left.snapping",                   "RocksHeroes.pcx"       },
   { "player1_left.snapping.xpos",              "0"                     },
   { "player1_left.snapping.ypos",              "1"                     },
@@ -2211,6 +2280,8 @@ struct ConfigInfo image_config[] =
   { "player1_right.moving.xpos",               "4"                     },
   { "player1_right.moving.ypos",               "1"                     },
   { "player1_right.moving.frames",             "4"                     },
+  { "player1_right.moving.delay",              "4"                     },
+  { "player1_right.moving.start_frame",                "1"                     },
   { "player1_right.digging",                   "RocksHeroes.pcx"       },
   { "player1_right.digging.xpos",              "4"                     },
   { "player1_right.digging.ypos",              "1"                     },
@@ -2219,6 +2290,7 @@ struct ConfigInfo image_config[] =
   { "player1_right.pushing.xpos",              "0"                     },
   { "player1_right.pushing.ypos",              "2"                     },
   { "player1_right.pushing.frames",            "4"                     },
+  { "player1_right.pushing.delay",             "2"                     },
   { "player1_right.snapping",                  "RocksHeroes.pcx"       },
   { "player1_right.snapping.xpos",             "4"                     },
   { "player1_right.snapping.ypos",             "1"                     },
@@ -2242,7 +2314,7 @@ struct ConfigInfo image_config[] =
   { "player2_down.digging.frames",             "4"                     },
   { "player2_down.pushing",                    "RocksHeroes.pcx"       },
   { "player2_down.pushing.xpos",               "0"                     },
-  { "player2_down.pushing.ypos",               "5"                     },
+  { "player2_down.pushing.ypos",               "3"                     },
   { "player2_down.pushing.frames",             "4"                     },
   { "player2_down.snapping",                   "RocksHeroes.pcx"       },
   { "player2_down.snapping.xpos",              "0"                     },
@@ -2327,7 +2399,7 @@ struct ConfigInfo image_config[] =
   { "player3_down.digging.frames",             "4"                     },
   { "player3_down.pushing",                    "RocksHeroes.pcx"       },
   { "player3_down.pushing.xpos",               "0"                     },
-  { "player3_down.pushing.ypos",               "8"                     },
+  { "player3_down.pushing.ypos",               "6"                     },
   { "player3_down.pushing.frames",             "4"                     },
   { "player3_down.snapping",                   "RocksHeroes.pcx"       },
   { "player3_down.snapping.xpos",              "0"                     },
@@ -2412,7 +2484,7 @@ struct ConfigInfo image_config[] =
   { "player4_down.digging.frames",             "4"                     },
   { "player4_down.pushing",                    "RocksHeroes.pcx"       },
   { "player4_down.pushing.xpos",               "0"                     },
-  { "player4_down.pushing.ypos",               "11"                    },
+  { "player4_down.pushing.ypos",               "9"                     },
   { "player4_down.pushing.frames",             "4"                     },
   { "player4_down.snapping",                   "RocksHeroes.pcx"       },
   { "player4_down.snapping.xpos",              "0"                     },
@@ -2490,12 +2562,14 @@ struct ConfigInfo image_config[] =
   { "twinkle_blue.frames",                     "3"                     },
   { "twinkle_blue.delay",                      "2"                     },
   { "twinkle_blue.mode_pingpong",              "1"                     },
+  { "twinkle_blue.global_sync",                        "0"                     },
   { "twinkle_white",                           "RocksHeroes.pcx"       },
   { "twinkle_white.xpos",                      "13"                    },
   { "twinkle_white.ypos",                      "11"                    },
   { "twinkle_white.frames",                    "3"                     },
   { "twinkle_white.delay",                     "2"                     },
   { "twinkle_white.mode_pingpong",             "1"                     },
+  { "twinkle_white.global_sync",               "0"                     },
 
   { "steelwall_topleft",                       "RocksElements.pcx"     },
   { "steelwall_topleft.xpos",                  "0"                     },
@@ -2581,6 +2655,23 @@ struct ConfigInfo image_config[] =
   { "arrow_red_down.ypos",                     "1"                     },
   { "arrow_red_down.frames",                   "1"                     },
 
+  { "ball_red",                                        "RocksElements.pcx"     },
+  { "ball_red.xpos",                           "12"                    },
+  { "ball_red.ypos",                           "8"                     },
+  { "ball_red.frames",                         "1"                     },
+  { "ball_blue",                               "RocksElements.pcx"     },
+  { "ball_blue.xpos",                          "13"                    },
+  { "ball_blue.ypos",                          "8"                     },
+  { "ball_blue.frames",                                "1"                     },
+  { "ball_yellow",                             "RocksElements.pcx"     },
+  { "ball_yellow.xpos",                                "14"                    },
+  { "ball_yellow.ypos",                                "8"                     },
+  { "ball_yellow.frames",                      "1"                     },
+  { "ball_gray",                               "RocksElements.pcx"     },
+  { "ball_gray.xpos",                          "15"                    },
+  { "ball_gray.ypos",                          "8"                     },
+  { "ball_gray.frames",                                "1"                     },
+
   { "scrollbar_blue",                          "RocksMore.pcx"         },
   { "scrollbar_blue.xpos",                     "0"                     },
   { "scrollbar_blue.ypos",                     "2"                     },