rnd-20030107-2-src
authorHolger Schemel <info@artsoft.org>
Tue, 7 Jan 2003 02:53:54 +0000 (03:53 +0100)
committerHolger Schemel <info@artsoft.org>
Sat, 30 Aug 2014 08:39:33 +0000 (10:39 +0200)
src/conf_gfx.c
src/conf_snd.c
src/conftime.h
src/libgame/misc.c
src/libgame/misc.h
src/libgame/setup.c
src/libgame/system.h

index fbfeae931c70948b1ad7ffd7365057102b4a3bf5..0a6beead20fd0fa68f11ca1f87e6a3bf39777b07 100644 (file)
 
 struct ConfigInfo image_config_suffix[] =
 {
-  { ".xpos",                           "0"                     },
-  { ".ypos",                           "0"                     },
-  { ".offset",                         "32"                    },
-  { ".vertical",                       "0"                     },
-  { ".xoffset",                                GFX_ARG_UNDEFINED       },
-  { ".yoffset",                                GFX_ARG_UNDEFINED       },
-  { ".frames",                         "1"                     },
-  { ".start_frame",                    GFX_ARG_UNDEFINED       },
-  { ".delay",                          "1"                     },
-  { ".mode_loop",                      "0"                     },
-  { ".mode_linear",                    "0"                     },
-  { ".mode_pingpong",                  "0"                     },
-  { ".mode_pingpong2",                 "0"                     },
-  { ".mode_reverse",                   "0"                     },
-  { ".global_sync",                    GFX_ARG_UNDEFINED       },
-
-  { NULL,                              NULL                    }
+  { ".xpos",                           "0",                    TYPE_INTEGER },
+  { ".ypos",                           "0",                    TYPE_INTEGER },
+  { ".offset",                         "32",                   TYPE_INTEGER },
+  { ".vertical",                       "false",                TYPE_BOOLEAN },
+  { ".xoffset",                                GFX_ARG_UNDEFINED,      TYPE_INTEGER },
+  { ".yoffset",                                GFX_ARG_UNDEFINED,      TYPE_INTEGER },
+  { ".frames",                         "1",                    TYPE_INTEGER },
+  { ".start_frame",                    GFX_ARG_UNDEFINED,      TYPE_INTEGER },
+  { ".delay",                          "1",                    TYPE_INTEGER },
+  { ".mode_loop",                      "false",                TYPE_BOOLEAN },
+  { ".mode_linear",                    "false",                TYPE_BOOLEAN },
+  { ".mode_pingpong",                  "false",                TYPE_BOOLEAN },
+  { ".mode_pingpong2",                 "false",                TYPE_BOOLEAN },
+  { ".mode_reverse",                   "false",                TYPE_BOOLEAN },
+  { ".global_sync",                    GFX_ARG_UNDEFINED,      TYPE_BOOLEAN },
+
+  { NULL,                              NULL,                   0            }
 };
 
 struct ConfigInfo image_config[] =
@@ -58,7 +58,7 @@ struct ConfigInfo image_config[] =
   { "bd_rock.moving_left.ypos",                        "10"                    },
   { "bd_rock.moving_left.frames",              "4"                     },
   { "bd_rock.moving_left.delay",               "2"                     },
-  { "bd_rock.moving_left.mode_reverse",                "1"                     },
+  { "bd_rock.moving_left.mode_reverse",                "true"                  },
   { "bd_rock.moving_right",                    "RocksDC.pcx"           },
   { "bd_rock.moving_right.xpos",               "12"                    },
   { "bd_rock.moving_right.ypos",               "10"                    },
@@ -71,7 +71,7 @@ struct ConfigInfo image_config[] =
   { "bd_diamond.ypos",                         "10"                    },
   { "bd_diamond.frames",                       "4"                     },
   { "bd_diamond.delay",                                "4"                     },
-  { "bd_diamond.mode_reverse",                 "1"                     },
+  { "bd_diamond.mode_reverse",                 "true"                  },
   { "bd_diamond.moving",                       "RocksElements.pcx"     },
   { "bd_diamond.moving.xpos",                  "3"                     },
   { "bd_diamond.moving.ypos",                  "10"                    },
@@ -91,25 +91,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.mode_reverse",       "1"                     },
+  { "bd_magic_wall.active.mode_reverse",       "true"                  },
   { "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.mode_reverse",      "1"                     },
+  { "bd_magic_wall.filling.mode_reverse",      "true"                  },
   { "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.mode_reverse",         "1"                     },
+  { "bd_magic_wall.full.mode_reverse",         "true"                  },
   { "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.mode_reverse",     "1"                     },
+  { "bd_magic_wall.emptying.mode_reverse",     "true"                  },
   { "bd_magic_wall.emptying.delay",            "4"                     },
   { "bd_magic_wall.dead",                      "RocksElements.pcx"     },
   { "bd_magic_wall.dead.xpos",                 "12"                    },
@@ -141,13 +141,13 @@ struct ConfigInfo image_config[] =
   { "bd_butterfly.xpos",                       "4"                     },
   { "bd_butterfly.ypos",                       "12"                    },
   { "bd_butterfly.frames",                     "2"                     },
-  { "bd_butterfly.mode_pingpong",              "1"                     },
+  { "bd_butterfly.mode_pingpong",              "true"                  },
   { "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.mode_pingpong",       "1"                     },
+  { "bd_butterfly.moving.mode_pingpong",       "true"                  },
   { "bd_butterfly.moving.delay",               "4"                     },
   { "bd_butterfly_right",                      "RocksElements.pcx"     },
   { "bd_butterfly_right.xpos",                 "8"                     },
@@ -170,13 +170,13 @@ struct ConfigInfo image_config[] =
   { "bd_firefly.xpos",                         "6"                     },
   { "bd_firefly.ypos",                         "12"                    },
   { "bd_firefly.frames",                       "2"                     },
-  { "bd_firefly.mode_pingpong",                        "1"                     },
+  { "bd_firefly.mode_pingpong",                        "true"                  },
   { "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.mode_pingpong",         "1"                     },
+  { "bd_firefly.moving.mode_pingpong",         "true"                  },
   { "bd_firefly.moving.delay",                 "4"                     },
   { "bd_firefly_right",                                "RocksElements.pcx"     },
   { "bd_firefly_right.xpos",                   "12"                    },
@@ -215,7 +215,7 @@ struct ConfigInfo image_config[] =
   { "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_left.mode_reverse",                "true"                  },
   { "sp_zonk.moving_right",                    "RocksSP.pcx"           },
   { "sp_zonk.moving_right.xpos",               "0"                     },
   { "sp_zonk.moving_right.ypos",               "6"                     },
@@ -240,13 +240,13 @@ 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.mode_pingpong",     "1"                     },
+  { "sp_murphy_left.moving.mode_pingpong",     "true"                  },
   { "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.mode_pingpong",    "true"                  },
   { "sp_murphy_left.digging.delay",            "2"                     },
   { "sp_murphy_left.pushing",                  "RocksSP.pcx"           },
   { "sp_murphy_left.pushing.xpos",             "11"                    },
@@ -265,13 +265,13 @@ 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.mode_pingpong",    "1"                     },
+  { "sp_murphy_right.moving.mode_pingpong",    "true"                  },
   { "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.mode_pingpong",   "true"                  },
   { "sp_murphy_right.digging.delay",           "2"                     },
   { "sp_murphy_right.pushing",                 "RocksSP.pcx"           },
   { "sp_murphy_right.pushing.xpos",            "10"                    },
@@ -449,22 +449,22 @@ struct ConfigInfo image_config[] =
   { "sp_sniksnak_left.xpos",                   "8"                     },
   { "sp_sniksnak_left.ypos",                   "8"                     },
   { "sp_sniksnak_left.frames",                 "4"                     },
-  { "sp_sniksnak_left.mode_pingpong2",         "1"                     },
+  { "sp_sniksnak_left.mode_pingpong2",         "true"                  },
   { "sp_sniksnak_right",                       "RocksSP.pcx"           },
   { "sp_sniksnak_right.xpos",                  "12"                    },
   { "sp_sniksnak_right.ypos",                  "8"                     },
   { "sp_sniksnak_right.frames",                        "4"                     },
-  { "sp_sniksnak_right.mode_pingpong2",                "1"                     },
+  { "sp_sniksnak_right.mode_pingpong2",                "true"                  },
   { "sp_sniksnak_up",                          "RocksSP.pcx"           },
   { "sp_sniksnak_up.xpos",                     "8"                     },
   { "sp_sniksnak_up.ypos",                     "9"                     },
   { "sp_sniksnak_up.frames",                   "4"                     },
-  { "sp_sniksnak_up.mode_pingpong2",           "1"                     },
+  { "sp_sniksnak_up.mode_pingpong2",           "true"                  },
   { "sp_sniksnak_down",                                "RocksSP.pcx"           },
   { "sp_sniksnak_down.xpos",                   "12"                    },
   { "sp_sniksnak_down.ypos",                   "9"                     },
   { "sp_sniksnak_down.frames",                 "4"                     },
-  { "sp_sniksnak_down.mode_pingpong2",         "1"                     },
+  { "sp_sniksnak_down.mode_pingpong2",         "true"                  },
 
   { "sp_electron",                             "RocksSP.pcx"           },
   { "sp_electron.xpos",                                "8"                     },
@@ -586,7 +586,7 @@ struct ConfigInfo image_config[] =
   { "rock.moving_left.ypos",                   "0"                     },
   { "rock.moving_left.frames",                 "4"                     },
   { "rock.moving_left.delay",                  "2"                     },
-  { "rock.moving_left.mode_reverse",           "1"                     },
+  { "rock.moving_left.mode_reverse",           "true"                  },
   { "rock.moving_right",                       "RocksElements.pcx"     },
   { "rock.moving_right.xpos",                  "12"                    },
   { "rock.moving_right.ypos",                  "0"                     },
@@ -650,7 +650,7 @@ struct ConfigInfo image_config[] =
   { "nut.cracking.ypos",                       "1"                     },
   { "nut.cracking.frames",                     "3"                     },
   { "nut.cracking.delay",                      "2"                     },
-  { "nut.cracking.mode_linear",                        "1"                     },
+  { "nut.cracking.mode_linear",                        "true"                  },
 
   { "dynamite",                                        "RocksElements.pcx"     },
   { "dynamite.xpos",                           "0"                     },
@@ -661,7 +661,7 @@ struct ConfigInfo image_config[] =
   { "dynamite.active.ypos",                    "3"                     },
   { "dynamite.active.frames",                  "7"                     },
   { "dynamite.active.delay",                   "12"                    },
-  { "dynamite.active.mode_linear",             "1"                     },
+  { "dynamite.active.mode_linear",             "true"                  },
 
   { "wall_emerald",                            "RocksElements.pcx"     },
   { "wall_emerald.xpos",                       "4"                     },
@@ -727,7 +727,7 @@ struct ConfigInfo image_config[] =
   { "yamyam.xpos",                             "0"                     },
   { "yamyam.ypos",                             "5"                     },
   { "yamyam.frames",                           "4"                     },
-  { "yamyam.mode_pingpong2",                   "1"                     },
+  { "yamyam.mode_pingpong2",                   "true"                  },
   { "yamyam.moving",                           "RocksElements.pcx"     },
   { "yamyam.moving.xpos",                      "0"                     },
   { "yamyam.moving.ypos",                      "5"                     },
@@ -737,7 +737,7 @@ struct ConfigInfo image_config[] =
   { "robot.xpos",                              "4"                     },
   { "robot.ypos",                              "5"                     },
   { "robot.frames",                            "4"                     },
-  { "robot.mode_pingpong2",                    "1"                     },
+  { "robot.mode_pingpong2",                    "true"                  },
   { "robot.moving",                            "RocksElements.pcx"     },
   { "robot.moving.xpos",                       "4"                     },
   { "robot.moving.ypos",                       "5"                     },
@@ -760,25 +760,25 @@ struct ConfigInfo image_config[] =
   { "magic_wall.active.xpos",                  "0"                     },
   { "magic_wall.active.ypos",                  "8"                     },
   { "magic_wall.active.frames",                        "4"                     },
-  { "magic_wall.active.mode_reverse",          "1"                     },
+  { "magic_wall.active.mode_reverse",          "true"                  },
   { "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.mode_reverse",         "1"                     },
+  { "magic_wall.filling.mode_reverse",         "true"                  },
   { "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.mode_reverse",            "1"                     },
+  { "magic_wall.full.mode_reverse",            "true"                  },
   { "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.mode_reverse",                "1"                     },
+  { "magic_wall.emptying.mode_reverse",                "true"                  },
   { "magic_wall.emptying.delay",               "4"                     },
   { "magic_wall.dead",                         "RocksElements.pcx"     },
   { "magic_wall.dead.xpos",                    "0"                     },
@@ -834,13 +834,13 @@ struct ConfigInfo image_config[] =
   { "acid_splash_left.ypos",                   "10"                    },
   { "acid_splash_left.frames",                 "4"                     },
   { "acid_splash_left.delay",                  "2"                     },
-  { "acid_splash_left.mode_linear",            "1"                     },
+  { "acid_splash_left.mode_linear",            "true"                  },
   { "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.mode_linear",           "1"                     },
+  { "acid_splash_right.mode_linear",           "true"                  },
 
   { "amoeba_drop",                             "RocksElements.pcx"     },
   { "amoeba_drop.xpos",                                "5"                     },
@@ -851,14 +851,14 @@ struct ConfigInfo image_config[] =
   { "amoeba.creating.ypos",                    "6"                     },
   { "amoeba.creating.frames",                  "3"                     },
   { "amoeba.creating.delay",                   "2"                     },
-  { "amoeba.creating.mode_linear",             "1"                     },
+  { "amoeba.creating.mode_linear",             "true"                  },
   { "amoeba.shrinking",                                "RocksElements.pcx"     },
   { "amoeba.shrinking.xpos",                   "5"                     },
   { "amoeba.shrinking.ypos",                   "6"                     },
   { "amoeba.shrinking.frames",                 "3"                     },
   { "amoeba.shrinking.delay",                  "2"                     },
-  { "amoeba.shrinking.mode_linear",            "1"                     },
-  { "amoeba.shrinking.mode_reverse",           "1"                     },
+  { "amoeba.shrinking.mode_linear",            "true"                  },
+  { "amoeba.shrinking.mode_reverse",           "true"                  },
   { "amoeba_wet",                              "RocksElements.pcx"     },
   { "amoeba_wet.xpos",                         "8"                     },
   { "amoeba_wet.ypos",                         "6"                     },
@@ -999,13 +999,13 @@ struct ConfigInfo image_config[] =
   { "exit.opening.ypos",                       "11"                    },
   { "exit.opening.frames",                     "5"                     },
   { "exit.opening.delay",                      "6"                     },
-  { "exit.opening.mode_linear",                        "1"                     },
+  { "exit.opening.mode_linear",                        "true"                  },
   { "exit_open",                               "RocksElements.pcx"     },
   { "exit_open.xpos",                          "4"                     },
   { "exit_open.ypos",                          "11"                    },
   { "exit_open.frames",                                "4"                     },
   { "exit_open.delay",                         "4"                     },
-  { "exit_open.mode_pingpong",                 "1"                     },
+  { "exit_open.mode_pingpong",                 "true"                  },
 
   /* images for Emerald Mine Club style elements and actions */
 
@@ -1017,7 +1017,7 @@ struct ConfigInfo image_config[] =
   { "balloon.moving.xpos",                     "12"                    },
   { "balloon.moving.ypos",                     "7"                     },
   { "balloon.moving.frames",                   "4"                     },
-  { "balloon.moving.mode_pingpong",            "1"                     },
+  { "balloon.moving.mode_pingpong",            "true"                  },
   { "balloon.moving.delay",                    "2"                     },
 
   { "balloon_send_left",                       "RocksDC.pcx"           },
@@ -1365,14 +1365,14 @@ struct ConfigInfo image_config[] =
   { "shield_normal.active.ypos",               "13"                    },
   { "shield_normal.active.frames",             "3"                     },
   { "shield_normal.active.delay",              "8"                     },
-  { "shield_normal.active.mode_pingpong",      "1"                     },
+  { "shield_normal.active.mode_pingpong",      "true"                  },
 
   { "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"                     },
+  { "shield_deadly.active.mode_pingpong",      "true"                  },
 
   { "switchgate_closed",                       "RocksDC.pcx"           },
   { "switchgate_closed.xpos",                  "8"                     },
@@ -1392,7 +1392,7 @@ struct ConfigInfo image_config[] =
   { "switchgate.closing.ypos",                 "5"                     },
   { "switchgate.closing.frames",               "5"                     },
   { "switchgate.closing.delay",                        "6"                     },
-  { "switchgate.closing.mode_reverse",         "1"                     },
+  { "switchgate.closing.mode_reverse",         "true"                  },
 
   { "timegate_closed",                         "RocksDC.pcx"           },
   { "timegate_closed.xpos",                    "8"                     },
@@ -1412,7 +1412,7 @@ struct ConfigInfo image_config[] =
   { "timegate.closing.ypos",                   "6"                     },
   { "timegate.closing.frames",                 "5"                     },
   { "timegate.closing.delay",                  "6"                     },
-  { "timegate.closing.mode_reverse",           "1"                     },
+  { "timegate.closing.mode_reverse",           "true"                  },
 
   { "pearl",                                   "RocksDC.pcx"           },
   { "pearl.xpos",                              "8"                     },
@@ -1506,7 +1506,7 @@ struct ConfigInfo image_config[] =
   { "trap.active.ypos",                                "8"                     },
   { "trap.active.frames",                      "4"                     },
   { "trap.active.delay",                       "4"                     },
-  { "trap.active.mode_pingpong2",              "1"                     },
+  { "trap.active.mode_pingpong2",              "true"                  },
 
   { "dx_supabomb",                             "RocksDC.pcx"           },
   { "dx_supabomb.xpos",                                "15"                    },
@@ -1579,28 +1579,28 @@ struct ConfigInfo image_config[] =
   { "pacman_right.xpos",                       "8"                     },
   { "pacman_right.ypos",                       "5"                     },
   { "pacman_right.frames",                     "2"                     },
-  { "pacman_right.mode_reverse",               "1"                     },
+  { "pacman_right.mode_reverse",               "true"                  },
   { "pacman_right.delay",                      "4"                     },
   { "pacman_right.offset",                     "128"                   },
   { "pacman_up",                               "RocksElements.pcx"     },
   { "pacman_up.xpos",                          "9"                     },
   { "pacman_up.ypos",                          "5"                     },
   { "pacman_up.frames",                                "2"                     },
-  { "pacman_up.mode_reverse",                  "1"                     },
+  { "pacman_up.mode_reverse",                  "true"                  },
   { "pacman_up.delay",                         "4"                     },
   { "pacman_up.offset",                                "128"                   },
   { "pacman_left",                             "RocksElements.pcx"     },
   { "pacman_left.xpos",                                "10"                    },
   { "pacman_left.ypos",                                "5"                     },
   { "pacman_left.frames",                      "2"                     },
-  { "pacman_left.mode_reverse",                        "1"                     },
+  { "pacman_left.mode_reverse",                        "true"                  },
   { "pacman_left.delay",                       "4"                     },
   { "pacman_left.offset",                      "128"                   },
   { "pacman_down",                             "RocksElements.pcx"     },
   { "pacman_down.xpos",                                "11"                    },
   { "pacman_down.ypos",                                "5"                     },
   { "pacman_down.frames",                      "2"                     },
-  { "pacman_down.mode_reverse",                        "1"                     },
+  { "pacman_down.mode_reverse",                        "true"                  },
   { "pacman_down.delay",                       "4"                     },
   { "pacman_down.offset",                      "128"                   },
 
@@ -1704,25 +1704,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.mode_linear",    "1"                     },
+  { "wall_growing_active_left.mode_linear",    "true"                  },
   { "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.mode_linear",   "1"                     },
+  { "wall_growing_active_right.mode_linear",   "true"                  },
   { "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.mode_linear",      "1"                     },
+  { "wall_growing_active_up.mode_linear",      "true"                  },
   { "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.mode_linear",    "1"                     },
+  { "wall_growing_active_down.mode_linear",    "true"                  },
 
   { "black_orb",                               "RocksElements.pcx"     },
   { "black_orb.xpos",                          "13"                    },
@@ -1738,38 +1738,38 @@ struct ConfigInfo image_config[] =
   { "dark_yamyam.xpos",                                "8"                     },
   { "dark_yamyam.ypos",                                "11"                    },
   { "dark_yamyam.frames",                      "4"                     },
-  { "dark_yamyam.mode_pingpong2",              "1"                     },
+  { "dark_yamyam.mode_pingpong2",              "true"                  },
 
   { "dynabomb.active",                         "RocksElements.pcx"     },
   { "dynabomb.active.xpos",                    "12"                    },
   { "dynabomb.active.ypos",                    "11"                    },
   { "dynabomb.active.frames",                  "4"                     },
   { "dynabomb.active.delay",                   "6"                     },
-  { "dynabomb.active.mode_pingpong",           "1"                     },
+  { "dynabomb.active.mode_pingpong",           "true"                  },
   { "dynabomb_player1.active",                 "RocksElements.pcx"     },
   { "dynabomb_player1.active.xpos",            "12"                    },
   { "dynabomb_player1.active.ypos",            "11"                    },
   { "dynabomb_player1.active.frames",          "4"                     },
   { "dynabomb_player1.active.delay",           "6"                     },
-  { "dynabomb_player1.active.mode_pingpong",   "1"                     },
+  { "dynabomb_player1.active.mode_pingpong",   "true"                  },
   { "dynabomb_player2.active",                 "RocksElements.pcx"     },
   { "dynabomb_player2.active.xpos",            "12"                    },
   { "dynabomb_player2.active.ypos",            "11"                    },
   { "dynabomb_player2.active.frames",          "4"                     },
   { "dynabomb_player2.active.delay",           "6"                     },
-  { "dynabomb_player2.active.mode_pingpong",   "1"                     },
+  { "dynabomb_player2.active.mode_pingpong",   "true"                  },
   { "dynabomb_player3.active",                 "RocksElements.pcx"     },
   { "dynabomb_player3.active.xpos",            "12"                    },
   { "dynabomb_player3.active.ypos",            "11"                    },
   { "dynabomb_player3.active.frames",          "4"                     },
   { "dynabomb_player3.active.delay",           "6"                     },
-  { "dynabomb_player3.active.mode_pingpong",   "1"                     },
+  { "dynabomb_player3.active.mode_pingpong",   "true"                  },
   { "dynabomb_player4.active",                 "RocksElements.pcx"     },
   { "dynabomb_player4.active.xpos",            "12"                    },
   { "dynabomb_player4.active.ypos",            "11"                    },
   { "dynabomb_player4.active.frames",          "4"                     },
   { "dynabomb_player4.active.delay",           "6"                     },
-  { "dynabomb_player4.active.mode_pingpong",   "1"                     },
+  { "dynabomb_player4.active.mode_pingpong",   "true"                  },
   { "dynabomb_nr",                             "RocksElements.pcx"     },
   { "dynabomb_nr.xpos",                                "12"                    },
   { "dynabomb_nr.ypos",                                "11"                    },
@@ -2013,7 +2013,7 @@ struct ConfigInfo image_config[] =
   { "satellite.moving.ypos",                   "9"                     },
   { "satellite.moving.frames",                 "8"                     },
   { "satellite.moving.delay",                  "2"                     },
-  { "satellite.moving.global_sync",            "1"                     },
+  { "satellite.moving.global_sync",            "true"                  },
 
   { "flames_left1",                            "RocksHeroes.pcx"       },
   { "flames_left1.xpos",                       "8"                     },
@@ -2443,22 +2443,22 @@ struct ConfigInfo image_config[] =
   { "explosion.ypos",                          "4"                     },
   { "explosion.frames",                                "8"                     },
   { "explosion.delay",                         "2"                     },
-  { "explosion.mode_linear",                   "1"                     },
+  { "explosion.mode_linear",                   "true"                  },
 
   { "twinkle_blue",                            "RocksHeroes.pcx"       },
   { "twinkle_blue.xpos",                       "9"                     },
   { "twinkle_blue.ypos",                       "11"                    },
   { "twinkle_blue.frames",                     "3"                     },
   { "twinkle_blue.delay",                      "2"                     },
-  { "twinkle_blue.mode_pingpong",              "1"                     },
-  { "twinkle_blue.global_sync",                        "0"                     },
+  { "twinkle_blue.mode_pingpong",              "true"                  },
+  { "twinkle_blue.global_sync",                        "false"                 },
   { "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"                     },
+  { "twinkle_white.mode_pingpong",             "true"                  },
+  { "twinkle_white.global_sync",               "false"                 },
 
   { "steelwall_topleft",                       "RocksElements.pcx"     },
   { "steelwall_topleft.xpos",                  "0"                     },
index 642c96cfa497a3fb89a57ea1069b42f42a7da5c9..c402cf8a4ffd7a20790fa915f136dfcf235fbece 100644 (file)
@@ -16,7 +16,9 @@
 
 struct ConfigInfo sound_config_suffix[] =
 {
-  { NULL,                              NULL                    }
+  { ".mode_loop",                      "0",                    TYPE_BOOLEAN },
+
+  { NULL,                              NULL,                   0            }
 };
 
 struct ConfigInfo sound_config[] =
index d8042ce77ea7c3df6fd7e16dc4fce378627291dc..cbe7bb3ef792bb774cc713bdc03820f7074dd240 100644 (file)
@@ -1 +1 @@
-#define COMPILE_DATE_STRING "[2003-01-07 02:39]"
+#define COMPILE_DATE_STRING "[2003-01-07 03:52]"
index bde3ea638ccc744881a3d393fdf50190adf174bf..7caaa3af88251b1601ff0abe0864058c6fe31c7c 100644 (file)
@@ -1234,6 +1234,63 @@ char getCharFromKey(Key key)
 }
 
 
+/* ------------------------------------------------------------------------- */
+/* functions to translate string identifiers to integer or boolean value     */
+/* ------------------------------------------------------------------------- */
+
+int get_integer_from_string(char *s)
+{
+  static char *number_text[][3] =
+  {
+    { "0", "zero", "null", },
+    { "1", "one", "first" },
+    { "2", "two", "second" },
+    { "3", "three", "third" },
+    { "4", "four", "fourth" },
+    { "5", "five", "fifth" },
+    { "6", "six", "sixth" },
+    { "7", "seven", "seventh" },
+    { "8", "eight", "eighth" },
+    { "9", "nine", "ninth" },
+    { "10", "ten", "tenth" },
+    { "11", "eleven", "eleventh" },
+    { "12", "twelve", "twelfth" },
+  };
+
+  int i, j;
+  char *s_lower = getStringToLower(s);
+  int result = -1;
+
+  for (i=0; i<13; i++)
+    for (j=0; j<3; j++)
+      if (strcmp(s_lower, number_text[i][j]) == 0)
+       result = i;
+
+  if (result == -1)
+    result = atoi(s);
+
+  free(s_lower);
+
+  return result;
+}
+
+boolean get_boolean_from_string(char *s)
+{
+  char *s_lower = getStringToLower(s);
+  boolean result = FALSE;
+
+  if (strcmp(s_lower, "true") == 0 ||
+      strcmp(s_lower, "yes") == 0 ||
+      strcmp(s_lower, "on") == 0 ||
+      get_integer_from_string(s) == 1)
+    result = TRUE;
+
+  free(s_lower);
+
+  return result;
+}
+
+
 /* ========================================================================= */
 /* functions for generic lists                                               */
 /* ========================================================================= */
@@ -1369,6 +1426,13 @@ boolean FileIsArtworkType(char *basename, int type)
 /* functions for loading artwork configuration information                   */
 /* ========================================================================= */
 
+static int get_parameter_value(int type, char *value)
+{
+  return (type == TYPE_INTEGER ? get_integer_from_string(value) :
+         type == TYPE_BOOLEAN ? get_boolean_from_string(value) :
+         -1);
+}
+
 struct FileInfo *getFileListFromConfigList(struct ConfigInfo *config_list,
                                           struct ConfigInfo *suffix_list,
                                           int num_file_list_entries)
@@ -1400,7 +1464,8 @@ struct FileInfo *getFileListFromConfigList(struct ConfigInfo *config_list,
 
       for (j=0; j<num_suffix_list_entries; j++)
       {
-       int default_parameter = atoi(suffix_list[j].value);
+       int default_parameter =
+         get_parameter_value(suffix_list[j].type, suffix_list[j].value);
 
        file_list[i].default_parameter[j] = default_parameter;
        file_list[i].parameter[j] = default_parameter;
@@ -1422,7 +1487,8 @@ struct FileInfo *getFileListFromConfigList(struct ConfigInfo *config_list,
          strcmp(&config_list[i].token[len_config_token - len_suffix],
                 suffix_list[j].token) == 0)
       {
-       file_list[list_pos].default_parameter[j] = atoi(config_list[i].value);
+       file_list[list_pos].default_parameter[j] =
+         get_parameter_value(suffix_list[j].type, config_list[i].value);
 
        is_file_entry = FALSE;
        break;
@@ -1510,7 +1576,8 @@ static void LoadArtworkConfig(struct ArtworkListInfo *artwork_info)
        char *value = getTokenValue(setup_file_list, token);
 
        if (value != NULL)
-         file_list[i].parameter[j] = atoi(value);
+         file_list[i].parameter[j] =
+           get_parameter_value(suffix_list[j].type, value);
 
        free(token);
       }
index 429a7bac4050025d9924bdb1f99028ae001be3c7..27838aa7a82cfe22db9571315173b56bce9cfe03 100644 (file)
@@ -113,6 +113,9 @@ Key getKeyFromKeyName(char *);
 Key getKeyFromX11KeyName(char *);
 char getCharFromKey(Key);
 
+int get_integer_from_string(char *);
+boolean get_boolean_from_string(char *);
+
 
 ListNode *newListNode(void);
 void addNodeToList(ListNode **, char *, void *);
index 083b9c895f50b552859ac9407c6bf12755fab356..5cd8c700fc1925bf4d5b5a4051c908a35db4e79a 100644 (file)
@@ -1013,58 +1013,6 @@ boolean checkCookieString(const char *cookie, const char *template)
 /* setup file list handling functions                                        */
 /* ------------------------------------------------------------------------- */
 
-int get_string_integer_value(char *s)
-{
-  static char *number_text[][3] =
-  {
-    { "0", "zero", "null", },
-    { "1", "one", "first" },
-    { "2", "two", "second" },
-    { "3", "three", "third" },
-    { "4", "four", "fourth" },
-    { "5", "five", "fifth" },
-    { "6", "six", "sixth" },
-    { "7", "seven", "seventh" },
-    { "8", "eight", "eighth" },
-    { "9", "nine", "ninth" },
-    { "10", "ten", "tenth" },
-    { "11", "eleven", "eleventh" },
-    { "12", "twelve", "twelfth" },
-  };
-
-  int i, j;
-  char *s_lower = getStringToLower(s);
-  int result = -1;
-
-  for (i=0; i<13; i++)
-    for (j=0; j<3; j++)
-      if (strcmp(s_lower, number_text[i][j]) == 0)
-       result = i;
-
-  if (result == -1)
-    result = atoi(s);
-
-  free(s_lower);
-
-  return result;
-}
-
-boolean get_string_boolean_value(char *s)
-{
-  char *s_lower = getStringToLower(s);
-  boolean result = FALSE;
-
-  if (strcmp(s_lower, "true") == 0 ||
-      strcmp(s_lower, "yes") == 0 ||
-      strcmp(s_lower, "on") == 0 ||
-      get_string_integer_value(s) == 1)
-    result = TRUE;
-
-  free(s_lower);
-
-  return result;
-}
-
 char *getFormattedSetupEntry(char *token, char *value)
 {
   int i;
@@ -1411,7 +1359,7 @@ void setSetupInfo(struct TokenInfo *token_info,
   {
     case TYPE_BOOLEAN:
     case TYPE_SWITCH:
-      *(boolean *)setup_value = get_string_boolean_value(token_value);
+      *(boolean *)setup_value = get_boolean_from_string(token_value);
       break;
 
     case TYPE_KEY:
@@ -1423,7 +1371,7 @@ void setSetupInfo(struct TokenInfo *token_info,
       break;
 
     case TYPE_INTEGER:
-      *(int *)setup_value = get_string_integer_value(token_value);
+      *(int *)setup_value = get_integer_from_string(token_value);
       break;
 
     case TYPE_STRING:
index 754ecc3be7397eb7be3f2a9026149f37f2bacbdc..03429157c7fc327273ae3da60046d424b631eb88 100644 (file)
@@ -479,6 +479,7 @@ struct ConfigInfo
 {
   char *token;
   char *value;
+  int type;
 };
 
 struct FileInfo