rnd-20020930-2-src
[rocksndiamonds.git] / src / main.c
index 6cafa8eaa5a2942a2e9848e1373092a6550301fd..0a821b2f429afe78c144317da7a0923e79f3e43f 100644 (file)
@@ -42,6 +42,7 @@ short         Store[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
 short          Store2[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
 short          StorePlayer[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
 short          Frame[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+short          GfxAction[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
 boolean                Stop[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
 short          JustStopped[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
 short          AmoebaNr[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
@@ -168,9 +169,10 @@ struct ConfigInfo image_config_suffix[] =
   { ".start_frame",                    "-1"                    },
 #endif
   { ".delay",                          "1"                     },
-  { ".pingpong",                       "0"                     },
-  { ".pingpong2",                      "0"                     },
-  { ".reverse",                                "0"                     },
+  { ".mode_linear",                    "0"                     },
+  { ".mode_pingpong",                  "0"                     },
+  { ".mode_pingpong2",                 "0"                     },
+  { ".mode_reverse",                   "0"                     },
   { ".global_sync",                    "0"                     },
   { ".vertical",                       "0"                     },
 
@@ -221,25 +223,25 @@ struct ConfigInfo image_config[] =
   { "bd_magic_wall.active.xpos",               "12"                    },
   { "bd_magic_wall.active.ypos",               "10"                    },
   { "bd_magic_wall.active.frames",             "4"                     },
-  { "bd_magic_wall.active.reverse",            "1"                     },
+  { "bd_magic_wall.active.mode_reverse",       "1"                     },
   { "bd_magic_wall.active.delay",              "4"                     },
   { "bd_magic_wall.filling",                   "RocksElements.pcx"     },
   { "bd_magic_wall.filling.xpos",              "12"                    },
   { "bd_magic_wall.filling.ypos",              "10"                    },
   { "bd_magic_wall.filling.frames",            "4"                     },
-  { "bd_magic_wall.filling.reverse",           "1"                     },
+  { "bd_magic_wall.filling.mode_reverse",      "1"                     },
   { "bd_magic_wall.filling.delay",             "4"                     },
   { "bd_magic_wall.full",                      "RocksElements.pcx"     },
   { "bd_magic_wall.full.xpos",                 "12"                    },
   { "bd_magic_wall.full.ypos",                 "10"                    },
   { "bd_magic_wall.full.frames",               "4"                     },
-  { "bd_magic_wall.full.reverse",              "1"                     },
+  { "bd_magic_wall.full.mode_reverse",         "1"                     },
   { "bd_magic_wall.full.delay",                        "4"                     },
   { "bd_magic_wall.emptying",                  "RocksElements.pcx"     },
   { "bd_magic_wall.emptying.xpos",             "12"                    },
   { "bd_magic_wall.emptying.ypos",             "10"                    },
   { "bd_magic_wall.emptying.frames",           "4"                     },
-  { "bd_magic_wall.emptying.reverse",          "1"                     },
+  { "bd_magic_wall.emptying.mode_reverse",     "1"                     },
   { "bd_magic_wall.emptying.delay",            "4"                     },
   { "bd_magic_wall.dead",                      "RocksElements.pcx"     },
   { "bd_magic_wall.dead.xpos",                 "12"                    },
@@ -271,13 +273,13 @@ struct ConfigInfo image_config[] =
   { "bd_butterfly.xpos",                       "4"                     },
   { "bd_butterfly.ypos",                       "12"                    },
   { "bd_butterfly.frames",                     "2"                     },
-  { "bd_butterfly.pingpong",                   "1"                     },
+  { "bd_butterfly.mode_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.mode_pingpong",       "1"                     },
   { "bd_butterfly.moving.delay",               "4"                     },
   { "bd_butterfly_right",                      "RocksElements.pcx"     },
   { "bd_butterfly_right.xpos",                 "8"                     },
@@ -300,13 +302,13 @@ struct ConfigInfo image_config[] =
   { "bd_firefly.xpos",                         "6"                     },
   { "bd_firefly.ypos",                         "12"                    },
   { "bd_firefly.frames",                       "2"                     },
-  { "bd_firefly.pingpong",                     "1"                     },
+  { "bd_firefly.mode_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.mode_pingpong",         "1"                     },
   { "bd_firefly.moving.delay",                 "4"                     },
   { "bd_firefly_right",                                "RocksElements.pcx"     },
   { "bd_firefly_right.xpos",                   "12"                    },
@@ -362,12 +364,12 @@ struct ConfigInfo image_config[] =
   { "sp_murphy_left.moving.xpos",              "8"                     },
   { "sp_murphy_left.moving.ypos",              "0"                     },
   { "sp_murphy_left.moving.frames",            "3"                     },
-  { "sp_murphy_left.moving.pingpong",          "1"                     },
+  { "sp_murphy_left.moving.mode_pingpong",     "1"                     },
   { "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.pingpong",         "1"                     },
+  { "sp_murphy_left.digging.mode_pingpong",    "1"                     },
   { "sp_murphy_left.pushing",                  "RocksSP.pcx"           },
   { "sp_murphy_left.pushing.xpos",             "11"                    },
   { "sp_murphy_left.pushing.ypos",             "1"                     },
@@ -385,12 +387,12 @@ struct ConfigInfo image_config[] =
   { "sp_murphy_right.moving.xpos",             "11"                    },
   { "sp_murphy_right.moving.ypos",             "0"                     },
   { "sp_murphy_right.moving.frames",           "3"                     },
-  { "sp_murphy_right.moving.pingpong",         "1"                     },
+  { "sp_murphy_right.moving.mode_pingpong",    "1"                     },
   { "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.pingpong",                "1"                     },
+  { "sp_murphy_right.digging.mode_pingpong",   "1"                     },
   { "sp_murphy_right.pushing",                 "RocksSP.pcx"           },
   { "sp_murphy_right.pushing.xpos",            "10"                    },
   { "sp_murphy_right.pushing.ypos",            "1"                     },
@@ -567,22 +569,22 @@ struct ConfigInfo image_config[] =
   { "sp_sniksnak_left.xpos",                   "8"                     },
   { "sp_sniksnak_left.ypos",                   "8"                     },
   { "sp_sniksnak_left.frames",                 "4"                     },
-  { "sp_sniksnak_left.pingpong2",              "1"                     },
+  { "sp_sniksnak_left.mode_pingpong2",         "1"                     },
   { "sp_sniksnak_right",                       "RocksSP.pcx"           },
   { "sp_sniksnak_right.xpos",                  "12"                    },
   { "sp_sniksnak_right.ypos",                  "8"                     },
   { "sp_sniksnak_right.frames",                        "4"                     },
-  { "sp_sniksnak_right.pingpong2",             "1"                     },
+  { "sp_sniksnak_right.mode_pingpong2",                "1"                     },
   { "sp_sniksnak_up",                          "RocksSP.pcx"           },
   { "sp_sniksnak_up.xpos",                     "8"                     },
   { "sp_sniksnak_up.ypos",                     "9"                     },
   { "sp_sniksnak_up.frames",                   "4"                     },
-  { "sp_sniksnak_up.pingpong2",                        "1"                     },
+  { "sp_sniksnak_up.mode_pingpong2",           "1"                     },
   { "sp_sniksnak_down",                                "RocksSP.pcx"           },
   { "sp_sniksnak_down.xpos",                   "12"                    },
   { "sp_sniksnak_down.ypos",                   "9"                     },
   { "sp_sniksnak_down.frames",                 "4"                     },
-  { "sp_sniksnak_down.pingpong2",              "1"                     },
+  { "sp_sniksnak_down.mode_pingpong2",         "1"                     },
 
   { "sp_electron",                             "RocksSP.pcx"           },
   { "sp_electron.xpos",                                "8"                     },
@@ -734,6 +736,7 @@ struct ConfigInfo image_config[] =
   { "nut.cracking.xpos",                       "13"                    },
   { "nut.cracking.ypos",                       "1"                     },
   { "nut.cracking.frames",                     "3"                     },
+  { "nut.cracking.mode_linear",                        "1"                     },
 
   { "dynamite",                                        "RocksElements.pcx"     },
   { "dynamite.xpos",                           "0"                     },
@@ -743,6 +746,8 @@ struct ConfigInfo image_config[] =
   { "dynamite.active.xpos",                    "1"                     },
   { "dynamite.active.ypos",                    "3"                     },
   { "dynamite.active.frames",                  "7"                     },
+  { "dynamite.active.delay",                   "12"                    },
+  { "dynamite.active.mode_linear",             "1"                     },
 
   { "wall_emerald",                            "RocksElements.pcx"     },
   { "wall_emerald.xpos",                       "4"                     },
@@ -800,7 +805,7 @@ struct ConfigInfo image_config[] =
   { "yamyam.xpos",                             "0"                     },
   { "yamyam.ypos",                             "5"                     },
   { "yamyam.frames",                           "4"                     },
-  { "yamyam.pingpong",                         "1"                     },
+  { "yamyam.mode_pingpong",                    "1"                     },
   { "yamyam.moving",                           "RocksElements.pcx"     },
   { "yamyam.moving.xpos",                      "0"                     },
   { "yamyam.moving.ypos",                      "5"                     },
@@ -810,7 +815,7 @@ struct ConfigInfo image_config[] =
   { "robot.xpos",                              "4"                     },
   { "robot.ypos",                              "5"                     },
   { "robot.frames",                            "4"                     },
-  { "robot.pingpong",                          "1"                     },
+  { "robot.mode_pingpong",                     "1"                     },
 
   { "robot_wheel",                             "RocksElements.pcx"     },
   { "robot_wheel.xpos",                                "0"                     },
@@ -829,25 +834,25 @@ struct ConfigInfo image_config[] =
   { "magic_wall.active.xpos",                  "0"                     },
   { "magic_wall.active.ypos",                  "8"                     },
   { "magic_wall.active.frames",                        "4"                     },
-  { "magic_wall.active.reverse",               "1"                     },
+  { "magic_wall.active.mode_reverse",          "1"                     },
   { "magic_wall.active.delay",                 "4"                     },
   { "magic_wall.filling",                      "RocksElements.pcx"     },
   { "magic_wall.filling.xpos",                 "0"                     },
   { "magic_wall.filling.ypos",                 "8"                     },
   { "magic_wall.filling.frames",               "4"                     },
-  { "magic_wall.filling.reverse",              "1"                     },
+  { "magic_wall.filling.mode_reverse",         "1"                     },
   { "magic_wall.filling.delay",                        "4"                     },
   { "magic_wall.full",                         "RocksElements.pcx"     },
   { "magic_wall.full.xpos",                    "0"                     },
   { "magic_wall.full.ypos",                    "8"                     },
   { "magic_wall.full.frames",                  "4"                     },
-  { "magic_wall.full.reverse",                 "1"                     },
+  { "magic_wall.full.mode_reverse",            "1"                     },
   { "magic_wall.full.delay",                   "4"                     },
   { "magic_wall.emptying",                     "RocksElements.pcx"     },
   { "magic_wall.emptying.xpos",                        "0"                     },
   { "magic_wall.emptying.ypos",                        "8"                     },
   { "magic_wall.emptying.frames",              "4"                     },
-  { "magic_wall.emptying.reverse",             "1"                     },
+  { "magic_wall.emptying.mode_reverse",                "1"                     },
   { "magic_wall.emptying.delay",               "4"                     },
   { "magic_wall.dead",                         "RocksElements.pcx"     },
   { "magic_wall.dead.xpos",                    "0"                     },
@@ -1010,7 +1015,7 @@ struct ConfigInfo image_config[] =
   { "exit_open.xpos",                          "4"                     },
   { "exit_open.ypos",                          "11"                    },
   { "exit_open.frames",                                "4"                     },
-  { "exit_open.pingpong",                      "1"                     },
+  { "exit_open.mode_pingpong",                 "1"                     },
 
   /* images for Emerald Mine Club style elements and actions */
 
@@ -1022,7 +1027,7 @@ struct ConfigInfo image_config[] =
   { "balloon.moving.xpos",                     "12"                    },
   { "balloon.moving.ypos",                     "7"                     },
   { "balloon.moving.frames",                   "4"                     },
-  { "balloon.moving.pingpong",                 "1"                     },
+  { "balloon.moving.mode_pingpong",            "1"                     },
   { "balloon.moving.delay",                    "2"                     },
 
   { "balloon_send_left",                       "RocksDC.pcx"           },
@@ -1354,13 +1359,13 @@ struct ConfigInfo image_config[] =
   { "shield_normal.active.xpos",               "1"                     },
   { "shield_normal.active.ypos",               "13"                    },
   { "shield_normal.active.frames",             "3"                     },
-  { "shield_normal.active.pingpong",           "1"                     },
+  { "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.pingpong",           "1"                     },
+  { "shield_deadly.active.mode_pingpong",      "1"                     },
 
   { "switchgate_closed",                       "RocksDC.pcx"           },
   { "switchgate_closed.xpos",                  "8"                     },
@@ -1378,7 +1383,7 @@ struct ConfigInfo image_config[] =
   { "switchgate.closing.xpos",                 "8"                     },
   { "switchgate.closing.ypos",                 "5"                     },
   { "switchgate.closing.frames",               "5"                     },
-  { "switchgate.closing.reverse",              "1"                     },
+  { "switchgate.closing.mode_reverse",         "1"                     },
 
   { "timegate_closed",                         "RocksDC.pcx"           },
   { "timegate_closed.xpos",                    "8"                     },
@@ -1396,7 +1401,7 @@ struct ConfigInfo image_config[] =
   { "timegate.closing.xpos",                   "8"                     },
   { "timegate.closing.ypos",                   "6"                     },
   { "timegate.closing.frames",                 "5"                     },
-  { "timegate.closing.reverse",                        "1"                     },
+  { "timegate.closing.mode_reverse",           "1"                     },
 
   { "pearl",                                   "RocksMore.pcx"         },
   { "pearl.xpos",                              "0"                     },
@@ -1406,6 +1411,7 @@ struct ConfigInfo image_config[] =
   { "pearl.breaking.xpos",                     "0"                     },
   { "pearl.breaking.ypos",                     "4"                     },
   { "pearl.breaking.frames",                   "4"                     },
+  { "pearl.breaking.mode_linear",              "4"                     },
 
   { "crystal",                                 "RocksMore.pcx"         },
   { "crystal.xpos",                            "1"                     },
@@ -1559,25 +1565,25 @@ struct ConfigInfo image_config[] =
   { "pacman_right.xpos",                       "8"                     },
   { "pacman_right.ypos",                       "5"                     },
   { "pacman_right.frames",                     "2"                     },
-  { "pacman_right.reverse",                    "1"                     },
+  { "pacman_right.mode_reverse",               "1"                     },
   { "pacman_right.delay",                      "4"                     },
   { "pacman_up",                               "RocksElements.pcx"     },
   { "pacman_up.xpos",                          "10"                    },
   { "pacman_up.ypos",                          "5"                     },
   { "pacman_up.frames",                                "2"                     },
-  { "pacman_up.reverse",                       "1"                     },
+  { "pacman_up.mode_reverse",                  "1"                     },
   { "pacman_up.delay",                         "4"                     },
   { "pacman_left",                             "RocksElements.pcx"     },
   { "pacman_left.xpos",                                "12"                    },
   { "pacman_left.ypos",                                "5"                     },
   { "pacman_left.frames",                      "2"                     },
-  { "pacman_left.reverse",                     "1"                     },
+  { "pacman_left.mode_reverse",                        "1"                     },
   { "pacman_left.delay",                       "4"                     },
   { "pacman_down",                             "RocksElements.pcx"     },
   { "pacman_down.xpos",                                "14"                    },
   { "pacman_down.ypos",                                "5"                     },
   { "pacman_down.frames",                      "2"                     },
-  { "pacman_down.reverse",                     "1"                     },
+  { "pacman_down.mode_reverse",                        "1"                     },
   { "pacman_down.delay",                       "4"                     },
 
   { "lamp",                                    "RocksElements.pcx"     },
@@ -1684,33 +1690,38 @@ struct ConfigInfo image_config[] =
   { "dark_yamyam.xpos",                                "8"                     },
   { "dark_yamyam.ypos",                                "11"                    },
   { "dark_yamyam.frames",                      "4"                     },
-  { "dark_yamyam.pingpong",                    "1"                     },
+  { "dark_yamyam.mode_pingpong",               "1"                     },
 
   { "dynabomb.active",                         "RocksElements.pcx"     },
   { "dynabomb.active.xpos",                    "12"                    },
   { "dynabomb.active.ypos",                    "11"                    },
   { "dynabomb.active.frames",                  "4"                     },
-  { "dynabomb.active.pingpong",                        "1"                     },
+  { "dynabomb.active.delay",                   "6"                     },
+  { "dynabomb.active.mode_pingpong",           "1"                     },
   { "dynabomb_player1.active",                 "RocksElements.pcx"     },
   { "dynabomb_player1.active.xpos",            "12"                    },
   { "dynabomb_player1.active.ypos",            "11"                    },
   { "dynabomb_player1.active.frames",          "4"                     },
-  { "dynabomb_player1.active.pingpong",                "1"                     },
+  { "dynabomb_player1.active.delay",           "6"                     },
+  { "dynabomb_player1.active.mode_pingpong",   "1"                     },
   { "dynabomb_player2.active",                 "RocksElements.pcx"     },
   { "dynabomb_player2.active.xpos",            "12"                    },
   { "dynabomb_player2.active.ypos",            "11"                    },
   { "dynabomb_player2.active.frames",          "4"                     },
-  { "dynabomb_player2.active.pingpong",                "1"                     },
+  { "dynabomb_player2.active.delay",           "6"                     },
+  { "dynabomb_player2.active.mode_pingpong",   "1"                     },
   { "dynabomb_player3.active",                 "RocksElements.pcx"     },
   { "dynabomb_player3.active.xpos",            "12"                    },
   { "dynabomb_player3.active.ypos",            "11"                    },
   { "dynabomb_player3.active.frames",          "4"                     },
-  { "dynabomb_player3.active.pingpong",                "1"                     },
+  { "dynabomb_player3.active.delay",           "6"                     },
+  { "dynabomb_player3.active.mode_pingpong",   "1"                     },
   { "dynabomb_player4.active",                 "RocksElements.pcx"     },
   { "dynabomb_player4.active.xpos",            "12"                    },
   { "dynabomb_player4.active.ypos",            "11"                    },
   { "dynabomb_player4.active.frames",          "4"                     },
-  { "dynabomb_player4.active.pingpong",                "1"                     },
+  { "dynabomb_player4.active.delay",           "6"                     },
+  { "dynabomb_player4.active.mode_pingpong",   "1"                     },
   { "dynabomb_nr",                             "RocksElements.pcx"     },
   { "dynabomb_nr.xpos",                                "12"                    },
   { "dynabomb_nr.ypos",                                "11"                    },
@@ -2347,12 +2358,12 @@ struct ConfigInfo image_config[] =
   { "twinkle_blue.xpos",                       "8"                     },
   { "twinkle_blue.ypos",                       "11"                    },
   { "twinkle_blue.frames",                     "3"                     },
-  { "twinkle_blue.pingpong",                   "1"                     },
+  { "twinkle_blue.mode_pingpong",              "1"                     },
   { "twinkle_white",                           "RocksHeroes.pcx"       },
   { "twinkle_white.xpos",                      "8"                     },
   { "twinkle_white.ypos",                      "11"                    },
   { "twinkle_white.frames",                    "3"                     },
-  { "twinkle_white.pingpong",                  "1"                     },
+  { "twinkle_white.mode_pingpong",             "1"                     },
 
   { "steelwall_topleft",                       "RocksElements.pcx"     },
   { "steelwall_topleft.xpos",                  "0"                     },