rnd-20031128-1-src
authorHolger Schemel <info@artsoft.org>
Fri, 28 Nov 2003 02:03:37 +0000 (03:03 +0100)
committerHolger Schemel <info@artsoft.org>
Sat, 30 Aug 2014 08:44:45 +0000 (10:44 +0200)
* added configurable "bored" and "sleeping" animations for the player

14 files changed:
ChangeLog
src/Makefile
src/conf_dem.c [new file with mode: 0644]
src/conf_inf.c [deleted file]
src/conftime.h
src/files.c
src/files.h
src/libgame/setup.c
src/libgame/setup.h
src/libgame/system.h
src/main.c
src/main.h
src/screens.c
src/screens.h

index f9943b3612fc9682c2d56e8cd9bc38b55138c137..37d8c79dd46506b8643f4a46bc2a01d8d92c06cf 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,7 @@
 
+2003-11-25
+       * added configurable "bored" and "sleeping" animations for the player
+
 2003-11-22
        * added "copy" and "exchange" functions for custom elements to editor
 
index f4ffbc8a9894fe9e3a3b173c229236f81276a41c..16c6cd6ac003387bca848dd9a580404d65d77a88 100644 (file)
@@ -136,7 +136,7 @@ SRCS =      main.c          \
        conf_gfx.c      \
        conf_snd.c      \
        conf_mus.c      \
-       conf_inf.c      \
+       conf_dem.c      \
        init.c          \
        config.c        \
        events.c        \
@@ -154,7 +154,7 @@ OBJS =      main.o          \
        conf_gfx.o      \
        conf_snd.o      \
        conf_mus.o      \
-       conf_inf.o      \
+       conf_dem.o      \
        init.o          \
        config.o        \
        events.o        \
diff --git a/src/conf_dem.c b/src/conf_dem.c
new file mode 100644 (file)
index 0000000..0204e1c
--- /dev/null
@@ -0,0 +1,617 @@
+/***********************************************************
+* Rocks'n'Diamonds -- McDuffin Strikes Back!               *
+*----------------------------------------------------------*
+* (c) 1995-2002 Artsoft Entertainment                      *
+*               Holger Schemel                             *
+*               Detmolder Strasse 189                      *
+*               33604 Bielefeld                            *
+*               Germany                                    *
+*               e-mail: info@artsoft.org                   *
+*----------------------------------------------------------*
+* conf_inf.c                                               *
+***********************************************************/
+
+#include "libgame/libgame.h"
+#include "main.h"
+
+
+/* List values that are not defined in the configuration file are set to
+   reliable default values. If that value is GFX_ARG_UNDEFINED, it will
+   be dynamically determined, using some of the other list values. */
+
+struct ConfigInfo demo_anim_info_config[] =
+{
+  { "player_1.moving.down",                    "16"                    },
+  { "player_1.moving.up",                      "16"                    },
+  { "player_1.moving.left",                    "16"                    },
+  { "player_1.moving.right",                   "16"                    },
+  { "player_1.pushing.left",                   "16"                    },
+  { "player_1.pushing.right",                  "16"                    },
+  { "end",                                     ""                      },
+
+  { "sand",                                    "-1"                    },
+  { "end",                                     ""                      },
+
+  { "empty_space",                             "-1"                    },
+  { "end",                                     ""                      },
+
+  { "quicksand_empty",                         "-1"                    },
+  { "end",                                     ""                      },
+
+  { "steelwall",                               "-1"                    },
+  { "end",                                     ""                      },
+
+  { "wall",                                    "-1"                    },
+  { "end",                                     ""                      },
+
+  { "expandable_wall.growing.left",            "20"                    },
+  { "wall",                                    "50"                    },
+  { "expandable_wall.growing.right",           "20"                    },
+  { "wall",                                    "50"                    },
+  { "expandable_wall.growing.up",              "20"                    },
+  { "wall",                                    "50"                    },
+  { "expandable_wall.growing.down",            "20"                    },
+  { "wall",                                    "50"                    },
+  { "empty_space",                             "20"                    },
+  { "end",                                     ""                      },
+
+  { "invisible_wall",                          "-1"                    },
+  { "end",                                     ""                      },
+
+  { "wall_slippery",                           "-1"                    },
+  { "end",                                     ""                      },
+
+  { "char_space",                              "10"                    },
+  { "char_exclam",                             "10"                    },
+  { "char_quotedbl",                           "10"                    },
+  { "char_numbersign",                         "10"                    },
+  { "char_dollar",                             "10"                    },
+  { "char_procent",                            "10"                    },
+  { "char_ampersand",                          "10"                    },
+  { "char_apostrophe",                         "10"                    },
+  { "char_parenleft",                          "10"                    },
+  { "char_parenright",                         "10"                    },
+  { "char_asterisk",                           "10"                    },
+  { "char_plus",                               "10"                    },
+  { "char_comma",                              "10"                    },
+  { "char_minus",                              "10"                    },
+  { "char_period",                             "10"                    },
+  { "char_slash",                              "10"                    },
+  { "char_0",                                  "10"                    },
+  { "char_1",                                  "10"                    },
+  { "char_2",                                  "10"                    },
+  { "char_3",                                  "10"                    },
+  { "char_4",                                  "10"                    },
+  { "char_5",                                  "10"                    },
+  { "char_6",                                  "10"                    },
+  { "char_7",                                  "10"                    },
+  { "char_8",                                  "10"                    },
+  { "char_9",                                  "10"                    },
+  { "char_colon",                              "10"                    },
+  { "char_semicolon",                          "10"                    },
+  { "char_less",                               "10"                    },
+  { "char_equal",                              "10"                    },
+  { "char_greater",                            "10"                    },
+  { "char_question",                           "10"                    },
+  { "char_at",                                 "10"                    },
+  { "char_a",                                  "10"                    },
+  { "char_b",                                  "10"                    },
+  { "char_c",                                  "10"                    },
+  { "char_d",                                  "10"                    },
+  { "char_e",                                  "10"                    },
+  { "char_f",                                  "10"                    },
+  { "char_g",                                  "10"                    },
+  { "char_h",                                  "10"                    },
+  { "char_i",                                  "10"                    },
+  { "char_j",                                  "10"                    },
+  { "char_k",                                  "10"                    },
+  { "char_l",                                  "10"                    },
+  { "char_m",                                  "10"                    },
+  { "char_n",                                  "10"                    },
+  { "char_o",                                  "10"                    },
+  { "char_p",                                  "10"                    },
+  { "char_q",                                  "10"                    },
+  { "char_r",                                  "10"                    },
+  { "char_s",                                  "10"                    },
+  { "char_t",                                  "10"                    },
+  { "char_u",                                  "10"                    },
+  { "char_v",                                  "10"                    },
+  { "char_w",                                  "10"                    },
+  { "char_x",                                  "10"                    },
+  { "char_y",                                  "10"                    },
+  { "char_z",                                  "10"                    },
+  { "char_bracketleft",                                "10"                    },
+  { "char_backslash",                          "10"                    },
+  { "char_bracketright",                       "10"                    },
+  { "char_asciicircum",                                "10"                    },
+  { "char_underscore",                         "10"                    },
+  { "char_copyright",                          "10"                    },
+  { "char_aumlaut",                            "10"                    },
+  { "char_oumlaut",                            "10"                    },
+  { "char_uumlaut",                            "10"                    },
+  { "char_degree",                             "10"                    },
+  { "char_trademark",                          "10"                    },
+  { "char_cursor",                             "10"                    },
+  { "end",                                     ""                      },
+
+  { "emerald",                                 "-1"                    },
+  { "end",                                     ""                      },
+
+  { "diamond",                                 "-1"                    },
+  { "end",                                     ""                      },
+
+  { "bd_diamond",                              "-1"                    },
+  { "end",                                     ""                      },
+
+  { "emerald_yellow",                          "50"                    },
+  { "emerald_red",                             "50"                    },
+  { "emerald_purple",                          "50"                    },
+  { "end",                                     ""                      },
+
+  { "bd_rock",                                 "-1"                    },
+  { "end",                                     ""                      },
+
+  { "bomb",                                    "100"                   },
+  { "bomb.exploding",                          "16"                    },
+  { "empty_space",                             "10"                    },
+  { "end",                                     ""                      },
+
+  { "nut",                                     "100"                   },
+  { "nut.breaking",                            "6"                     },
+  { "emerald",                                 "20"                    },
+  { "end",                                     ""                      },
+
+  { "wall_emerald",                            "100"                   },
+  { "wall_emerald.exploding",                  "16"                    },
+  { "emerald",                                 "20"                    },
+  { "end",                                     ""                      },
+
+  { "wall_diamond",                            "100"                   },
+  { "wall_diamond.exploding",                  "16"                    },
+  { "diamond",                                 "20"                    },
+  { "end",                                     ""                      },
+
+  { "wall_bd_diamond",                         "100"                   },
+  { "wall_bd_diamond.exploding",               "16"                    },
+  { "bd_diamond",                              "20"                    },
+  { "end",                                     ""                      },
+
+  { "wall_emerald_yellow",                     "100"                   },
+  { "wall_emerald_yellow.exploding",           "16"                    },
+  { "emerald_yellow",                          "20"                    },
+  { "wall_emerald_red",                                "100"                   },
+  { "wall_emerald_red.exploding",              "16"                    },
+  { "emerald_red",                             "20"                    },
+  { "wall_emerald_purple",                     "100"                   },
+  { "wall_emerald_purple.exploding",           "16"                    },
+  { "emerald_purple",                          "20"                    },
+  { "end",                                     ""                      },
+
+  { "acid",                                    "-1"                    },
+  { "end",                                     ""                      },
+
+  { "key_1",                                   "50"                    },
+  { "key_2",                                   "50"                    },
+  { "key_3",                                   "50"                    },
+  { "key_4",                                   "50"                    },
+  { "end",                                     ""                      },
+
+  { "gate_1",                                  "50"                    },
+  { "gate_2",                                  "50"                    },
+  { "gate_3",                                  "50"                    },
+  { "gate_4",                                  "50"                    },
+  { "end",                                     ""                      },
+
+  { "gate_1_gray",                             "50"                    },
+  { "gate_2_gray",                             "50"                    },
+  { "gate_3_gray",                             "50"                    },
+  { "gate_4_gray",                             "50"                    },
+  { "end",                                     ""                      },
+
+  { "dynamite",                                        "-1"                    },
+  { "end",                                     ""                      },
+
+  { "dynamite.active",                         "96"                    },
+  { "dynamite.exploding",                      "16"                    },
+  { "empty_space",                             "20"                    },
+  { "end",                                     ""                      },
+
+  { "dynabomb.active",                         "100"                   },
+  { "dynabomb.exploding",                      "16"                    },
+  { "empty_space",                             "20"                    },
+  { "end",                                     ""                      },
+
+  { "dynabomb_increase_number",                        "-1"                    },
+  { "end",                                     ""                      },
+
+  { "dynabomb_increase_size",                  "-1"                    },
+  { "end",                                     ""                      },
+
+  { "dynabomb_increase_power",                 "-1"                    },
+  { "end",                                     ""                      },
+
+  { "spaceship.turning_from_right.up",         "8"                     },
+  { "spaceship.turning_from_up.left",          "8"                     },
+  { "spaceship.turning_from_left.down",                "8"                     },
+  { "spaceship.turning_from_down.right",       "8"                     },
+  { "end",                                     ""                      },
+
+  { "bug.turning_from_right.up",               "8"                     },
+  { "bug.turning_from_up.left",                        "8"                     },
+  { "bug.turning_from_left.down",              "8"                     },
+  { "bug.turning_from_down.right",             "8"                     },
+  { "end",                                     ""                      },
+
+  { "bd_butterfly",                            "-1"                    },
+  { "end",                                     ""                      },
+
+  { "bd_firefly",                              "-1"                    },
+  { "end",                                     ""                      },
+
+  { "pacman.right",                            "16"                    },
+  { "pacman.up",                               "16"                    },
+  { "pacman.left",                             "16"                    },
+  { "pacman.down",                             "16"                    },
+  { "end",                                     ""                      },
+
+  { "yamyam",                                  "-1"                    },
+  { "end",                                     ""                      },
+
+  { "dark_yamyam",                             "-1"                    },
+  { "end",                                     ""                      },
+
+  { "robot",                                   "-1"                    },
+  { "end",                                     ""                      },
+
+  { "mole.moving.right",                       "16"                    },
+  { "mole.moving.up",                          "16"                    },
+  { "mole.moving.left",                                "16"                    },
+  { "mole.moving.down",                                "16"                    },
+  { "end",                                     ""                      },
+
+  { "penguin.moving.right",                    "16"                    },
+  { "penguin.moving.up",                       "16"                    },
+  { "penguin.moving.left",                     "16"                    },
+  { "penguin.moving.down",                     "16"                    },
+  { "end",                                     ""                      },
+
+  { "pig.moving.right",                                "16"                    },
+  { "pig.moving.up",                           "16"                    },
+  { "pig.moving.left",                         "16"                    },
+  { "pig.moving.down",                         "16"                    },
+  { "end",                                     ""                      },
+
+  { "dragon.moving.right",                     "16"                    },
+  { "dragon.moving.up",                                "16"                    },
+  { "dragon.moving.left",                      "16"                    },
+  { "dragon.moving.down",                      "16"                    },
+  { "end",                                     ""                      },
+
+  { "satellite",                               "-1"                    },
+  { "end",                                     ""                      },
+
+  { "robot_wheel",                             "50"                    },
+  { "robot_wheel.active",                      "100"                   },
+  { "end",                                     ""                      },
+
+  { "lamp",                                    "50"                    },
+  { "lamp.active",                             "50"                    },
+  { "end",                                     ""                      },
+
+  { "time_orb_full",                           "50"                    },
+  { "time_orb_empty",                          "50"                    },
+  { "end",                                     ""                      },
+
+  { "amoeba_drop",                             "50"                    },
+  { "amoeba.growing",                          "6"                     },
+  { "amoeba_wet",                              "20"                    },
+  { "end",                                     ""                      },
+
+  { "amoeba_dead",                             "-1"                    },
+  { "end",                                     ""                      },
+
+  { "amoeba_wet",                              "-1"                    },
+  { "end",                                     ""                      },
+
+  { "amoeba_wet",                              "100"                   },
+  { "amoeba.growing",                          "6"                     },
+  { "end",                                     ""                      },
+
+  { "amoeba_full",                             "50"                    },
+  { "amoeba_dead",                             "50"                    },
+  { "amoeba.exploding",                                "16"                    },
+  { "diamond",                                 "20"                    },
+  { "end",                                     ""                      },
+
+  { "game_of_life",                            "-1"                    },
+  { "end",                                     ""                      },
+
+  { "biomaze",                                 "-1"                    },
+  { "end",                                     ""                      },
+
+  { "magic_wall.active",                       "-1"                    },
+  { "end",                                     ""                      },
+
+  { "bd_magic_wall.active",                    "-1"                    },
+  { "end",                                     ""                      },
+
+  { "exit_closed",                             "200"                   },
+  { "exit.opening",                            "30"                    },
+  { "exit_open",                               "100"                   },
+  { "exit.closing",                            "30"                    },
+  { "end",                                     ""                      },
+
+  { "exit_open",                               "-1"                    },
+  { "end",                                     ""                      },
+
+  { "sokoban_object",                          "-1"                    },
+  { "end",                                     ""                      },
+
+  { "sokoban_field_empty",                     "-1"                    },
+  { "end",                                     ""                      },
+
+  { "sokoban_field_full",                      "-1"                    },
+  { "end",                                     ""                      },
+
+  { "speed_pill",                              "-1"                    },
+  { "end",                                     ""                      },
+
+  { NULL,                                      NULL                    }
+};
+
+struct ConfigInfo demo_anim_text_config[] =
+{
+  {
+    "player_1.moving.down",
+    "THE HERO: (Is _this_ guy good old Rockford?)"
+  },
+  {
+    "sand",
+    "Normal sand: You can dig through it"
+  },
+  {
+    "empty_space",
+    "Empty field: You can walk through it"
+  },
+  {
+    "quicksand_empty",
+    "Quicksand: You cannot pass it, but rocks can fall through it"
+  },
+  {
+    "steelwall",
+    "Massive Wall: Nothing can go through it"
+  },
+  {
+    "wall",
+    "Normal Wall: You can't go through it, but you can bomb it away"
+  },
+  {
+    "expandable_wall.growing.left",
+    "Growing Wall: Grows in several directions if there is an empty field"
+  },
+  {
+    "invisible_wall",
+    "Invisible Wall: Behaves like normal wall, but is invisible"
+  },
+  {
+    "wall_slippery",
+    "Old Wall: Like normal wall, but some things can fall down from it"
+  },
+  {
+    "char_space",
+    "Letter Wall: Looks like a letter, behaves like a normal wall"
+  },
+  {
+    "emerald",
+    "Emerald: You must collect enough of them to finish a level"
+  },
+  {
+    "diamond",
+    "Diamond: Counts as 3 emeralds, but can be destroyed by rocks"
+  },
+  {
+    "bd_diamond",
+    "Diamond (BD style): Counts like one emerald and behaves a bit different"
+  },
+  {
+    "emerald_yellow",
+    "Colorful Gems: Seem to behave like Emeralds"
+  },
+  {
+    "bd_rock",
+    "Rock: Smashes several things; Can be moved by the player"
+  },
+  {
+    "bomb",
+    "Bomb: You can move it, but be careful when dropping it"
+  },
+  {
+    "nut",
+    "Nut: Throw a rock on it to open it; Each nut contains an emerald"
+  },
+  {
+    "wall_emerald",
+    "Wall with an emerald inside: Bomb the wall away to get it"
+  },
+  {
+    "wall_diamond",
+    "Wall with a diamond inside: Bomb the wall away to get it"
+  },
+  {
+    "wall_bd_diamond",
+    "Wall with BD style diamond inside: Bomb the wall away to get it"
+  },
+  {
+    "wall_emerald_yellow",
+    "Wall with colorful gem inside: Bomb the wall away to get it"
+  },
+  {
+    "acid",
+    "Acid: Things that fall in are gone forever (including our hero)"
+  },
+  {
+    "key_1",
+    "Key: Opens the door that has the same color (red/yellow/green/blue)"
+  },
+  {
+    "gate_1",
+    "Door: Can be opened by the key with the same color"
+  },
+  {
+    "gate_1_gray",
+    "Door: You have to find out the right color of the key for it"
+  },
+  {
+    "dynamite",
+    "Dynamite: Collect it and use it to destroy walls or kill enemies"
+  },
+  {
+    "dynamite.active",
+    "Dynamite: This one explodes after a few seconds"
+  },
+  {
+    "dynabomb.active",
+    "Dyna Bomb: Explodes in 4 directions with variable explosion size"
+  },
+  {
+    "dynabomb_increase_number",
+    "Dyna Bomb: Increases the number of dyna bombs available at a time"
+  },
+  {
+    "dynabomb_increase_size",
+    "Dyna Bomb: Increases the size of explosion of dyna bombs"
+  },
+  {
+    "dynabomb_increase_power",
+    "Dyna Bomb: Increases the power of explosion of dyna bombs"
+  },
+  {
+    "spaceship.right",
+    "Spaceship: Moves at the left side of walls; don't touch it!"
+  },
+  {
+    "bug.right",
+    "Bug: Moves at the right side of walls; don't touch it!"
+  },
+  {
+    "bd_butterfly",
+    "Butterfly: Moves at the right side of walls; don't touch it!"
+  },
+  {
+    "bd_firefly",
+    "Firefly: Moves at the left side of walls; don't touch it!"
+  },
+  {
+    "pacman.right",
+    "Pacman: Eats the amoeba and you, if you're not careful"
+  },
+  {
+    "yamyam",
+    "Cruncher: Eats diamonds and you, if you're not careful"
+  },
+  {
+    "dark_yamyam",
+    "Cruncher (BD style): Eats almost everything"
+  },
+  {
+    "robot",
+    "Robot: Tries to kill the player"
+  },
+  {
+    "mole.moving.right",
+    "The mole: Eats the amoeba and turns empty space into normal sand"
+  },
+  {
+    "penguin.moving.right",
+    "The penguin: Guide him to the exit, but keep him away from monsters!"
+  },
+  {
+    "pig.moving.right",
+    "The Pig: Harmless, but eats all gems it can get"
+  },
+  {
+    "dragon.moving.right",
+    "The Dragon: Breathes fire, especially to some monsters"
+  },
+  {
+    "satellite",
+    "Sonde: Follows you everywhere; harmless, but may block your way"
+  },
+  {
+    "robot_wheel",
+    "Magic Wheel: Touch it to get rid of the robots for some seconds"
+  },
+  {
+    "lamp",
+    "Light Bulb: All of them must be switched on to finish a level"
+  },
+  {
+    "time_orb_full",
+    "Extra Time Orb: Adds some seconds to the time available for the level"
+  },
+  {
+    "amoeba_drop",
+    "Amoeba Drop: Grows to an amoeba on the ground - don't touch it"
+  },
+  {
+    "amoeba_dead",
+    "Dead Amoeba: Does not grow, but can still kill bugs and spaceships"
+  },
+  {
+    "amoeba_wet",
+    "Normal Amoeba: Grows through empty fields, sand and quicksand"
+  },
+  {
+    "amoeba_wet",
+    "Dropping Amoeba: This one makes drops that grow to a new amoeba"
+  },
+  {
+    "amoeba_full",
+    "Living Amoeba (BD style): Contains other element, when surrounded"
+  },
+  {
+    "game_of_life",
+    "Game Of Life: Behaves like the well known 'Game Of Life' (2333 style)"
+  },
+  {
+    "biomaze",
+    "Biomaze: A bit like the 'Game Of Life', but builds crazy mazes"
+  },
+  {
+    "magic_wall.active",
+    "Magic Wall: Changes rocks, emeralds and diamonds when they pass it"
+  },
+  {
+    "bd_magic_wall.active",
+    "Magic Wall (BD style): Changes rocks and BD style diamonds"
+  },
+  {
+    "exit_closed",
+    "Exit door: Opens if you have enough emeralds to finish the level"
+  },
+  {
+    "exit_open",
+    "Open exit door: Enter here to leave the level and exit the actual game"
+  },
+  {
+    "sokoban_object",
+    "Sokoban element: Object which must be pushed to an empty field"
+  },
+  {
+    "sokoban_field_empty",
+    "Sokoban element: Empty field where a Sokoban object can be placed on"
+  },
+  {
+    "sokoban_field_full",
+    "Sokoban element: Field with object which can be pushed away"
+  },
+  {
+    "speed_pill",
+    "Speed pill: Lets the player run twice as fast as normally"
+  },
+
+  {
+    NULL,
+    NULL
+  }
+};
diff --git a/src/conf_inf.c b/src/conf_inf.c
deleted file mode 100644 (file)
index 07b6375..0000000
+++ /dev/null
@@ -1,360 +0,0 @@
-/***********************************************************
-* Rocks'n'Diamonds -- McDuffin Strikes Back!               *
-*----------------------------------------------------------*
-* (c) 1995-2002 Artsoft Entertainment                      *
-*               Holger Schemel                             *
-*               Detmolder Strasse 189                      *
-*               33604 Bielefeld                            *
-*               Germany                                    *
-*               e-mail: info@artsoft.org                   *
-*----------------------------------------------------------*
-* conf_inf.c                                               *
-***********************************************************/
-
-#include "libgame/libgame.h"
-#include "main.h"
-
-
-/* List values that are not defined in the configuration file are set to
-   reliable default values. If that value is GFX_ARG_UNDEFINED, it will
-   be dynamically determined, using some of the other list values. */
-
-struct ConfigInfo info_animation_config[] =
-{
-  { "player_1.moving.down",                    "16"                    },
-  { "player_1.moving.up",                      "16"                    },
-  { "player_1.moving.left",                    "16"                    },
-  { "player_1.moving.right",                   "16"                    },
-  { "player_1.pushing.left",                   "16"                    },
-  { "player_1.pushing.right",                  "16"                    },
-  { "end",                                     ""                      },
-
-  { "sand",                                    "-1"                    },
-  { "end",                                     ""                      },
-
-  { "empty_space",                             "-1"                    },
-  { "end",                                     ""                      },
-
-  { "quicksand_empty",                         "-1"                    },
-  { "end",                                     ""                      },
-
-  { "steelwall",                               "-1"                    },
-  { "end",                                     ""                      },
-
-  { "wall",                                    "-1"                    },
-  { "end",                                     ""                      },
-
-  { "expandable_wall.growing.left",            "20"                    },
-  { "wall",                                    "50"                    },
-  { "expandable_wall.growing.right",           "20"                    },
-  { "wall",                                    "50"                    },
-  { "expandable_wall.growing.up",              "20"                    },
-  { "wall",                                    "50"                    },
-  { "expandable_wall.growing.down",            "20"                    },
-  { "wall",                                    "50"                    },
-  { "empty_space",                             "20"                    },
-  { "end",                                     ""                      },
-
-  { "invisible_wall",                          "-1"                    },
-  { "end",                                     ""                      },
-
-  { "wall_slippery",                           "-1"                    },
-  { "end",                                     ""                      },
-
-  { "char_space",                              "10"                    },
-  { "char_exclam",                             "10"                    },
-  { "char_quotedbl",                           "10"                    },
-  { "char_numbersign",                         "10"                    },
-  { "char_dollar",                             "10"                    },
-  { "char_procent",                            "10"                    },
-  { "char_ampersand",                          "10"                    },
-  { "char_apostrophe",                         "10"                    },
-  { "char_parenleft",                          "10"                    },
-  { "char_parenright",                         "10"                    },
-  { "char_asterisk",                           "10"                    },
-  { "char_plus",                               "10"                    },
-  { "char_comma",                              "10"                    },
-  { "char_minus",                              "10"                    },
-  { "char_period",                             "10"                    },
-  { "char_slash",                              "10"                    },
-  { "char_0",                                  "10"                    },
-  { "char_1",                                  "10"                    },
-  { "char_2",                                  "10"                    },
-  { "char_3",                                  "10"                    },
-  { "char_4",                                  "10"                    },
-  { "char_5",                                  "10"                    },
-  { "char_6",                                  "10"                    },
-  { "char_7",                                  "10"                    },
-  { "char_8",                                  "10"                    },
-  { "char_9",                                  "10"                    },
-  { "char_colon",                              "10"                    },
-  { "char_semicolon",                          "10"                    },
-  { "char_less",                               "10"                    },
-  { "char_equal",                              "10"                    },
-  { "char_greater",                            "10"                    },
-  { "char_question",                           "10"                    },
-  { "char_at",                                 "10"                    },
-  { "char_a",                                  "10"                    },
-  { "char_b",                                  "10"                    },
-  { "char_c",                                  "10"                    },
-  { "char_d",                                  "10"                    },
-  { "char_e",                                  "10"                    },
-  { "char_f",                                  "10"                    },
-  { "char_g",                                  "10"                    },
-  { "char_h",                                  "10"                    },
-  { "char_i",                                  "10"                    },
-  { "char_j",                                  "10"                    },
-  { "char_k",                                  "10"                    },
-  { "char_l",                                  "10"                    },
-  { "char_m",                                  "10"                    },
-  { "char_n",                                  "10"                    },
-  { "char_o",                                  "10"                    },
-  { "char_p",                                  "10"                    },
-  { "char_q",                                  "10"                    },
-  { "char_r",                                  "10"                    },
-  { "char_s",                                  "10"                    },
-  { "char_t",                                  "10"                    },
-  { "char_u",                                  "10"                    },
-  { "char_v",                                  "10"                    },
-  { "char_w",                                  "10"                    },
-  { "char_x",                                  "10"                    },
-  { "char_y",                                  "10"                    },
-  { "char_z",                                  "10"                    },
-  { "char_bracketleft",                                "10"                    },
-  { "char_backslash",                          "10"                    },
-  { "char_bracketright",                       "10"                    },
-  { "char_asciicircum",                                "10"                    },
-  { "char_underscore",                         "10"                    },
-  { "char_copyright",                          "10"                    },
-  { "char_aumlaut",                            "10"                    },
-  { "char_oumlaut",                            "10"                    },
-  { "char_uumlaut",                            "10"                    },
-  { "char_degree",                             "10"                    },
-  { "char_trademark",                          "10"                    },
-  { "char_cursor",                             "10"                    },
-  { "end",                                     ""                      },
-
-  { "emerald",                                 "-1"                    },
-  { "end",                                     ""                      },
-
-  { "diamond",                                 "-1"                    },
-  { "end",                                     ""                      },
-
-  { "bd_diamond",                              "-1"                    },
-  { "end",                                     ""                      },
-
-  { "emerald_yellow",                          "50"                    },
-  { "emerald_red",                             "50"                    },
-  { "emerald_purple",                          "50"                    },
-  { "end",                                     ""                      },
-
-  { "bd_rock",                                 "-1"                    },
-  { "end",                                     ""                      },
-
-  { "bomb",                                    "100"                   },
-  { "bomb.exploding",                          "16"                    },
-  { "empty_space",                             "10"                    },
-  { "end",                                     ""                      },
-
-  { "nut",                                     "100"                   },
-  { "nut.breaking",                            "6"                     },
-  { "emerald",                                 "20"                    },
-  { "end",                                     ""                      },
-
-  { "wall_emerald",                            "100"                   },
-  { "wall_emerald.exploding",                  "16"                    },
-  { "emerald",                                 "20"                    },
-  { "end",                                     ""                      },
-
-  { "wall_diamond",                            "100"                   },
-  { "wall_diamond.exploding",                  "16"                    },
-  { "diamond",                                 "20"                    },
-  { "end",                                     ""                      },
-
-  { "wall_bd_diamond",                         "100"                   },
-  { "wall_bd_diamond.exploding",               "16"                    },
-  { "bd_diamond",                              "20"                    },
-  { "end",                                     ""                      },
-
-  { "wall_emerald_yellow",                     "100"                   },
-  { "wall_emerald_yellow.exploding",           "16"                    },
-  { "emerald_yellow",                          "20"                    },
-  { "wall_emerald_red",                                "100"                   },
-  { "wall_emerald_red.exploding",              "16"                    },
-  { "emerald_red",                             "20"                    },
-  { "wall_emerald_purple",                     "100"                   },
-  { "wall_emerald_purple.exploding",           "16"                    },
-  { "emerald_purple",                          "20"                    },
-  { "end",                                     ""                      },
-
-  { "acid",                                    "-1"                    },
-  { "end",                                     ""                      },
-
-  { "key_1",                                   "50"                    },
-  { "key_2",                                   "50"                    },
-  { "key_3",                                   "50"                    },
-  { "key_4",                                   "50"                    },
-  { "end",                                     ""                      },
-
-  { "gate_1",                                  "50"                    },
-  { "gate_2",                                  "50"                    },
-  { "gate_3",                                  "50"                    },
-  { "gate_4",                                  "50"                    },
-  { "end",                                     ""                      },
-
-  { "gate_1_gray",                             "50"                    },
-  { "gate_2_gray",                             "50"                    },
-  { "gate_3_gray",                             "50"                    },
-  { "gate_4_gray",                             "50"                    },
-  { "end",                                     ""                      },
-
-  { "dynamite",                                        "-1"                    },
-  { "end",                                     ""                      },
-
-  { "dynamite.active",                         "96"                    },
-  { "dynamite.exploding",                      "16"                    },
-  { "empty_space",                             "20"                    },
-  { "end",                                     ""                      },
-
-  { "dynabomb.active",                         "100"                   },
-  { "dynabomb.exploding",                      "16"                    },
-  { "empty_space",                             "20"                    },
-  { "end",                                     ""                      },
-
-  { "dynabomb_increase_number",                        "-1"                    },
-  { "end",                                     ""                      },
-
-  { "dynabomb_increase_size",                  "-1"                    },
-  { "end",                                     ""                      },
-
-  { "dynabomb_increase_power",                 "-1"                    },
-  { "end",                                     ""                      },
-
-  { "spaceship.turning_from_right.up",         "8"                     },
-  { "spaceship.turning_from_up.left",          "8"                     },
-  { "spaceship.turning_from_left.down",                "8"                     },
-  { "spaceship.turning_from_down.right",       "8"                     },
-  { "end",                                     ""                      },
-
-  { "bug.turning_from_right.up",               "8"                     },
-  { "bug.turning_from_up.left",                        "8"                     },
-  { "bug.turning_from_left.down",              "8"                     },
-  { "bug.turning_from_down.right",             "8"                     },
-  { "end",                                     ""                      },
-
-  { "bd_butterfly",                            "-1"                    },
-  { "end",                                     ""                      },
-
-  { "bd_firefly",                              "-1"                    },
-  { "end",                                     ""                      },
-
-  { "pacman.right",                            "16"                    },
-  { "pacman.up",                               "16"                    },
-  { "pacman.left",                             "16"                    },
-  { "pacman.down",                             "16"                    },
-  { "end",                                     ""                      },
-
-  { "yamyam",                                  "-1"                    },
-  { "end",                                     ""                      },
-
-  { "dark_yamyam",                             "-1"                    },
-  { "end",                                     ""                      },
-
-  { "robot",                                   "-1"                    },
-  { "end",                                     ""                      },
-
-  { "mole.moving.right",                       "16"                    },
-  { "mole.moving.up",                          "16"                    },
-  { "mole.moving.left",                                "16"                    },
-  { "mole.moving.down",                                "16"                    },
-  { "end",                                     ""                      },
-
-  { "penguin.moving.right",                    "16"                    },
-  { "penguin.moving.up",                       "16"                    },
-  { "penguin.moving.left",                     "16"                    },
-  { "penguin.moving.down",                     "16"                    },
-  { "end",                                     ""                      },
-
-  { "pig.moving.right",                                "16"                    },
-  { "pig.moving.up",                           "16"                    },
-  { "pig.moving.left",                         "16"                    },
-  { "pig.moving.down",                         "16"                    },
-  { "end",                                     ""                      },
-
-  { "dragon.moving.right",                     "16"                    },
-  { "dragon.moving.up",                                "16"                    },
-  { "dragon.moving.left",                      "16"                    },
-  { "dragon.moving.down",                      "16"                    },
-  { "end",                                     ""                      },
-
-  { "satellite",                               "-1"                    },
-  { "end",                                     ""                      },
-
-  { "robot_wheel",                             "50"                    },
-  { "robot_wheel.active",                      "100"                   },
-  { "end",                                     ""                      },
-
-  { "lamp",                                    "50"                    },
-  { "lamp.active",                             "50"                    },
-  { "end",                                     ""                      },
-
-  { "time_orb_full",                           "50"                    },
-  { "time_orb_empty",                          "50"                    },
-  { "end",                                     ""                      },
-
-  { "amoeba_drop",                             "50"                    },
-  { "amoeba.growing",                          "6"                     },
-  { "amoeba_wet",                              "20"                    },
-  { "end",                                     ""                      },
-
-  { "amoeba_dead",                             "-1"                    },
-  { "end",                                     ""                      },
-
-  { "amoeba_wet",                              "-1"                    },
-  { "end",                                     ""                      },
-
-  { "amoeba_wet",                              "100"                   },
-  { "amoeba.growing",                          "6"                     },
-  { "end",                                     ""                      },
-
-  { "amoeba_full",                             "50"                    },
-  { "amoeba_dead",                             "50"                    },
-  { "amoeba.exploding",                                "16"                    },
-  { "diamond",                                 "20"                    },
-  { "end",                                     ""                      },
-
-  { "game_of_life",                            "-1"                    },
-  { "end",                                     ""                      },
-
-  { "biomaze",                                 "-1"                    },
-  { "end",                                     ""                      },
-
-  { "magic_wall.active",                       "-1"                    },
-  { "end",                                     ""                      },
-
-  { "bd_magic_wall.active",                    "-1"                    },
-  { "end",                                     ""                      },
-
-  { "exit_closed",                             "200"                   },
-  { "exit.opening",                            "30"                    },
-  { "exit_open",                               "100"                   },
-  { "exit.closing",                            "30"                    },
-  { "end",                                     ""                      },
-
-  { "exit_open",                               "-1"                    },
-  { "end",                                     ""                      },
-
-  { "sokoban_object",                          "-1"                    },
-  { "end",                                     ""                      },
-
-  { "sokoban_field_empty",                     "-1"                    },
-  { "end",                                     ""                      },
-
-  { "sokoban_field_full",                      "-1"                    },
-  { "end",                                     ""                      },
-
-  { "speed_pill",                              "-1"                    },
-  { "end",                                     ""                      },
-
-  { NULL,                                      NULL                    }
-};
index b0cc969be418713bcf515dc1638712cb50e0148d..21932cea47f71ec21b6f60760bef3eff14d81eb3 100644 (file)
@@ -1 +1 @@
-#define COMPILE_DATE_STRING "[2003-11-27 02:21]"
+#define COMPILE_DATE_STRING "[2003-11-28 03:02]"
index a2f7cf69faf45be632ac96a07d0e6b4c20832ca9..e65f387a3c461528dcd31064b5eaf06cf1d620bc 100644 (file)
@@ -3019,16 +3019,16 @@ void LoadMusicInfo()
 #endif
 }
 
-void add_info_animation(int element, int action, int direction, int delay,
-                       int *num_list_entries)
+void add_demo_anim(int element, int action, int direction, int delay,
+                  int *num_list_entries)
 {
-  struct InfoAnimationInfo *new_list_entry;
+  struct DemoAnimInfo *new_list_entry;
   (*num_list_entries)++;
 
-  info_animation_info =
-    checked_realloc(info_animation_info,
-                   *num_list_entries * sizeof(struct InfoAnimationInfo));
-  new_list_entry = &info_animation_info[*num_list_entries - 1];
+  demo_anim_info =
+    checked_realloc(demo_anim_info,
+                   *num_list_entries * sizeof(struct DemoAnimInfo));
+  new_list_entry = &demo_anim_info[*num_list_entries - 1];
 
   new_list_entry->element = element;
   new_list_entry->action = action;
@@ -3054,9 +3054,9 @@ void print_unknown_token_end(int token_nr)
     Error(ERR_RETURN_LINE, "-");
 }
 
-void LoadInfoAnimations()
+void LoadDemoAnimInfo()
 {
-  char *filename = getElementInfoFilename();
+  char *filename = getDemoAnimInfoFilename();
   SetupFileList *setup_file_list, *list;
   SetupFileHash *element_hash, *action_hash, *direction_hash;
   int num_list_entries = 0;
@@ -3069,13 +3069,13 @@ void LoadInfoAnimations()
     SetupFileList *insert_ptr;
 
     insert_ptr = setup_file_list =
-      newSetupFileList(info_animation_config[0].token,
-                      info_animation_config[0].value);
+      newSetupFileList(demo_anim_info_config[0].token,
+                      demo_anim_info_config[0].value);
 
-    for (i=1; info_animation_config[i].token; i++)
-       insert_ptr = addListEntry(insert_ptr,
-                                 info_animation_config[i].token,
-                                 info_animation_config[i].value);
+    for (i=1; demo_anim_info_config[i].token; i++)
+      insert_ptr = addListEntry(insert_ptr,
+                               demo_anim_info_config[i].token,
+                               demo_anim_info_config[i].value);
   }
 
   element_hash   = newSetupFileHash();
@@ -3102,7 +3102,7 @@ void LoadInfoAnimations()
 
     if (strcmp(list->token, "end") == 0)
     {
-      add_info_animation(-1, -1, -1, -1, &num_list_entries);
+      add_demo_anim(-1, -1, -1, -1, &num_list_entries);
 
       continue;
     }
@@ -3113,8 +3113,7 @@ void LoadInfoAnimations()
     if (element_value != NULL)
     {
       /* element found */
-      add_info_animation(atoi(element_value), -1, -1,
-                        delay, &num_list_entries);
+      add_demo_anim(atoi(element_value), -1, -1, delay, &num_list_entries);
 
       continue;
     }
@@ -3147,8 +3146,8 @@ void LoadInfoAnimations()
     if (action_value != NULL)
     {
       /* action found */
-      add_info_animation(atoi(element_value), atoi(action_value), -1,
-                        delay, &num_list_entries);
+      add_demo_anim(atoi(element_value), atoi(action_value), -1, delay,
+                   &num_list_entries);
       free(element_token);
 
       continue;
@@ -3160,8 +3159,8 @@ void LoadInfoAnimations()
     if (direction_value != NULL)
     {
       /* direction found */
-      add_info_animation(atoi(element_value), -1, atoi(direction_value),
-                        delay, &num_list_entries);
+      add_demo_anim(atoi(element_value), -1, atoi(direction_value), delay,
+                   &num_list_entries);
       free(element_token);
 
       continue;
@@ -3197,9 +3196,8 @@ void LoadInfoAnimations()
     if (direction_value != NULL)
     {
       /* direction found */
-      add_info_animation(atoi(element_value), atoi(action_value),
-                        atoi(direction_value),
-                        delay, &num_list_entries);
+      add_demo_anim(atoi(element_value), atoi(action_value),
+                   atoi(direction_value), delay, &num_list_entries);
       free(element_token);
       free(action_token);
 
@@ -3214,7 +3212,7 @@ void LoadInfoAnimations()
 
   print_unknown_token_end(num_unknown_tokens);
 
-  add_info_animation(-999, -999, -999, -999, &num_list_entries);
+  add_demo_anim(-999, -999, -999, -999, &num_list_entries);
 
   freeSetupFileList(setup_file_list);
   freeSetupFileHash(element_hash);
@@ -3225,9 +3223,43 @@ void LoadInfoAnimations()
   /* TEST ONLY */
   for (i=0; i < num_list_entries; i++)
     printf("::: %d, %d, %d => %d\n",
-          info_animation_info[i].element,
-          info_animation_info[i].action,
-          info_animation_info[i].direction,
-          info_animation_info[i].delay);
+          demo_anim_info[i].element,
+          demo_anim_info[i].action,
+          demo_anim_info[i].direction,
+          demo_anim_info[i].delay);
+#endif
+}
+
+void LoadDemoAnimText()
+{
+  char *filename = getDemoAnimTextFilename();
+  int i;
+
+  if (demo_anim_text != NULL)
+    freeSetupFileList(demo_anim_text);
+
+  if ((demo_anim_text = loadSetupFileList(filename)) == NULL)
+  {
+    /* use reliable default values from static configuration */
+    SetupFileList *insert_ptr;
+
+    insert_ptr = demo_anim_text =
+      newSetupFileList(demo_anim_text_config[0].token,
+                      demo_anim_text_config[0].value);
+
+    for (i=1; demo_anim_text_config[i].token; i++)
+      insert_ptr = addListEntry(insert_ptr,
+                               demo_anim_text_config[i].token,
+                               demo_anim_text_config[i].value);
+  }
+
+#if 0
+  /* TEST ONLY */
+  {
+    SetupFileList *list;
+
+    for (list = demo_anim_text; list != NULL; list = list->next)
+      printf("::: '%s' => '%s'\n", list->token, list->value);
+  }
 #endif
 }
index 844503a00a5e8ba6d78c1bf51631c6fe616ae297..28158de55f1432c0353b6052db27271abb0803ea 100644 (file)
@@ -42,6 +42,7 @@ void LoadCustomElementDescriptions();
 void LoadSpecialMenuDesignSettings();
 void LoadUserDefinedEditorElementList(int **, int *);
 void LoadMusicInfo();
-void LoadInfoAnimations();
+void LoadDemoAnimInfo();
+void LoadDemoAnimText();
 
 #endif /* FILES_H */
index 00168642fb95fb9665f46805699c6194a560f7ea..dd36e29a684e44a29c7252e86830c2da7ea30a82 100644 (file)
@@ -417,14 +417,26 @@ char *getEditorSetupFilename()
   return filename;
 }
 
-char *getElementInfoFilename()
+char *getDemoAnimInfoFilename()
 {
   static char *filename = NULL;
 
   if (filename != NULL)
     free(filename);
 
-  filename = getPath2(getCurrentLevelDir(), ELEMENTINFO_FILENAME);
+  filename = getPath2(getCurrentLevelDir(), DEMOANIMINFO_FILENAME);
+
+  return filename;
+}
+
+char *getDemoAnimTextFilename()
+{
+  static char *filename = NULL;
+
+  if (filename != NULL)
+    free(filename);
+
+  filename = getPath2(getCurrentLevelDir(), DEMOANIMTEXT_FILENAME);
 
   return filename;
 }
@@ -1364,9 +1376,10 @@ static void printSetupFileHash(SetupFileHash *hash)
 static void *loadSetupFileData(char *filename, boolean use_hash)
 {
   int line_len;
-  char line[MAX_LINE_LEN];
+  char line[MAX_LINE_LEN], previous_line[MAX_LINE_LEN];
   char *token, *value, *line_ptr;
   void *setup_file_data, *insert_ptr = NULL;
+  boolean read_continued_line = FALSE;
   FILE *file;
 
   if (use_hash)
@@ -1386,10 +1399,42 @@ static void *loadSetupFileData(char *filename, boolean use_hash)
     if (!fgets(line, MAX_LINE_LEN, file))
       break;
 
-    /* cut trailing comment or whitespace from input line */
+    /* cut trailing newline or carriage return */
+    for (line_ptr = &line[strlen(line)]; line_ptr >= line; line_ptr--)
+      if ((*line_ptr == '\n' || *line_ptr == '\r') && *(line_ptr + 1) == '\0')
+       *line_ptr = '\0';
+
+    if (read_continued_line)
+    {
+      /* cut leading whitespaces from input line */
+      for (line_ptr = line; *line_ptr; line_ptr++)
+       if (*line_ptr != ' ' && *line_ptr != '\t')
+         break;
+
+      /* append new line to existing line, if there is enough space */
+      if (strlen(previous_line) + strlen(line_ptr) < MAX_LINE_LEN)
+       strcat(previous_line, line_ptr);
+
+      strcpy(line, previous_line);     /* copy storage buffer to line */
+
+      read_continued_line = FALSE;
+    }
+
+    /* if the last character is '\', continue at next line */
+    if (strlen(line) > 0 && line[strlen(line) - 1] == '\\')
+    {
+      line[strlen(line) - 1] = '\0';   /* cut off trailing backslash */
+      strcpy(previous_line, line);     /* copy line to storage buffer */
+
+      read_continued_line = TRUE;
+
+      continue;
+    }
+
+    /* cut trailing comment from input line */
     for (line_ptr = line; *line_ptr; line_ptr++)
     {
-      if (*line_ptr == '#' || *line_ptr == '\n' || *line_ptr == '\r')
+      if (*line_ptr == '#')
       {
        *line_ptr = '\0';
        break;
@@ -1397,8 +1442,8 @@ static void *loadSetupFileData(char *filename, boolean use_hash)
     }
 
     /* cut trailing whitespaces from input line */
-    for (line_ptr = &line[strlen(line)]; line_ptr > line; line_ptr--)
-      if ((*line_ptr == ' ' || *line_ptr == '\t') && line_ptr[1] == '\0')
+    for (line_ptr = &line[strlen(line)]; line_ptr >= line; line_ptr--)
+      if ((*line_ptr == ' ' || *line_ptr == '\t') && *(line_ptr + 1) == '\0')
        *line_ptr = '\0';
 
     /* ignore empty lines */
index 8f1bffef92816a56f9d9e9c00b879bf0d64b0206..dcbc5eeaa54d83e939d3a146d11bebbec277a2d1 100644 (file)
@@ -197,7 +197,8 @@ char *getTapeFilename(int);
 char *getScoreFilename(int);
 char *getSetupFilename(void);
 char *getEditorSetupFilename(void);
-char *getElementInfoFilename(void);
+char *getDemoAnimInfoFilename(void);
+char *getDemoAnimTextFilename(void);
 char *getImageFilename(char *);
 char *getCustomImageFilename(char *);
 char *getCustomSoundFilename(char *);
index 3abbbd7602cb849b7946fe02a520ab6eadcaae9c..0449fcae0d11f8195fa6b20b004a3c156726e8a6 100644 (file)
 #define SETUP_FILENAME         "setup.conf"
 #define LEVELSETUP_FILENAME    "levelsetup.conf"
 #define EDITORSETUP_FILENAME   "editorsetup.conf"
-#define ELEMENTINFO_FILENAME   "elementinfo.conf"
+#define DEMOANIMINFO_FILENAME  "demoaniminfo.conf"
+#define DEMOANIMTEXT_FILENAME  "demoanimtext.conf"
 #define LEVELINFO_FILENAME     "levelinfo.conf"
 #define GRAPHICSINFO_FILENAME  "graphicsinfo.conf"
 #define SOUNDSINFO_FILENAME    "soundsinfo.conf"
 #define LEVELSETUP_DIRECTORY   "lvlsetup"
 #define SETUP_FILENAME         "setup.cnf"
 #define LEVELSETUP_FILENAME    "lvlsetup.cnf"
-#define EDITORSETUP_FILENAME   "edsetup.conf"
-#define ELEMENTINFO_FILENAME   "eleminfo.conf"
+#define EDITORSETUP_FILENAME   "edsetup.cnf"
+#define DEMOANIMINFO_FILENAME  "demoainf.cnf"
+#define DEMOANIMTEXT_FILENAME  "demoatxt.cnf"
 #define LEVELINFO_FILENAME     "lvlinfo.cnf"
 #define GRAPHICSINFO_FILENAME  "gfxinfo.cnf"
 #define SOUNDSINFO_FILENAME    "sndinfo.cnf"
index 84697de8fc61c16b39bcf2c4c400fc291a4fb391..ef5d4b9910dbe967e238d5229ebb24d6b735ba8f 100644 (file)
@@ -105,7 +105,8 @@ struct GraphicInfo     *graphic_info = NULL;
 struct SoundInfo       *sound_info = NULL;
 struct MusicInfo       *music_info = NULL;
 struct MusicFileInfo   *music_file_info = NULL;
-struct InfoAnimationInfo *info_animation_info = NULL;
+struct DemoAnimInfo    *demo_anim_info = NULL;
+struct SetupFileList   *demo_anim_text = NULL;
 
 
 /* ------------------------------------------------------------------------- */
index 620167e6278abdf73d6f9f603f2a32c4863e194a..9f028d1d6855b814ce4f6ff143b852ec7a9f4292 100644 (file)
@@ -1564,7 +1564,7 @@ struct SpecialSuffixInfo
   int value;
 };
 
-struct InfoAnimationInfo
+struct DemoAnimInfo
 {
   int element;
   int action;
@@ -1667,13 +1667,15 @@ extern struct GraphicInfo      *graphic_info;
 extern struct SoundInfo               *sound_info;
 extern struct MusicInfo               *music_info;
 extern struct MusicFileInfo    *music_file_info;
-extern struct InfoAnimationInfo *info_animation_info;
+extern struct DemoAnimInfo     *demo_anim_info;
+extern struct SetupFileList    *demo_anim_text;
 extern struct ConfigInfo       image_config[];
 extern struct ConfigInfo       sound_config[];
 extern struct ConfigInfo       music_config[];
 extern struct ConfigInfo       image_config_suffix[];
 extern struct ConfigInfo       sound_config_suffix[];
 extern struct ConfigInfo       music_config_suffix[];
-extern struct ConfigInfo       info_animation_config[];
+extern struct ConfigInfo       demo_anim_info_config[];
+extern struct ConfigInfo       demo_anim_text_config[];
 
 #endif /* MAIN_H */
index 078ebb236fe0afc5783224ddde75149e41fb2382..e47e922b58225dfecc853c235af9df667b40acbc 100644 (file)
@@ -812,7 +812,7 @@ static int num_helpscreen_music = 7;
 static int helpscreen_musicpos;
 
 #if 1
-void DrawHelpScreenElAction(int start)
+void DrawHelpScreenElAction(int start, boolean init)
 {
   int i = 0, j = 0;
   int xstart = mSX + 16;
@@ -823,13 +823,25 @@ void DrawHelpScreenElAction(int start)
   int delay;
   int sync_frame;
 
-  while (info_animation_info[j].element != -999)
+  if (init)
+  {
+    SetMainBackgroundImage(IMG_BACKGROUND_INFO);
+    ClearWindow();
+    DrawHeadline();
+
+    DrawTextSCentered(100, FONT_TEXT_1, "The game elements:");
+
+    DrawTextSCentered(SYSIZE - 20, FONT_TEXT_4,
+                     "Press any key or button for next page");
+  }
+
+  while (demo_anim_info[j].element != -999)
   {
     if (i >= start + MAX_HELPSCREEN_ELS || i >= num_helpscreen_els)
       break;
     else if (i < start)
     {
-      while (info_animation_info[j].element != -1)
+      while (demo_anim_info[j].element != -1)
        j++;
 
       j++;
@@ -840,9 +852,9 @@ void DrawHelpScreenElAction(int start)
 
     j += helpscreen_step[i - start];
 
-    element = info_animation_info[j].element;
-    action = info_animation_info[j].action;
-    direction = info_animation_info[j].direction;
+    element = demo_anim_info[j].element;
+    action = demo_anim_info[j].action;
+    direction = demo_anim_info[j].direction;
 
     if (action != -1 && direction != -1)
       graphic = el_act_dir2img(element, action, direction);
@@ -853,7 +865,7 @@ void DrawHelpScreenElAction(int start)
     else
       graphic = el2img(element);
 
-    delay = info_animation_info[j++].delay;
+    delay = demo_anim_info[j++].delay;
 
     if (delay == -1)
       delay = 1000000;
@@ -869,7 +881,7 @@ void DrawHelpScreenElAction(int start)
       helpscreen_frame[i - start]--;
     }
 
-    if (info_animation_info[j].element == -1)
+    if (demo_anim_info[j].element == -1)
     {
       if (!helpscreen_frame[i - start])
        helpscreen_step[i - start] = 0;
@@ -878,7 +890,7 @@ void DrawHelpScreenElAction(int start)
     {
       if (!helpscreen_frame[i - start])
        helpscreen_step[i - start]++;
-      while(info_animation_info[j].element != -1)
+      while(demo_anim_info[j].element != -1)
        j++;
     }
 
@@ -889,6 +901,9 @@ void DrawHelpScreenElAction(int start)
     DrawGraphicAnimationExt(drawto, xstart, ystart + (i - start) * ystep,
                            graphic, sync_frame, USE_MASKING);
 
+    if (init)
+      DrawHelpScreenElText(element, action, direction, i - start);
+
     i++;
   }
 
@@ -984,6 +999,46 @@ void DrawHelpScreenElAction(int start)
 }
 #endif
 
+#if 1
+void DrawHelpScreenElText(int element, int action, int direction, int ypos)
+{
+  int xstart = mSX + 56;
+  int ystart = mSY + 65 + 2 * 32;
+  int ystep = TILEY + 4;
+  char *text;
+
+  text = getListEntry(demo_anim_text, element_info[element].token_name);
+  if (text == NULL)
+  {
+    char token[MAX_LINE_LEN];
+
+    strcpy(token, element_info[element].token_name);
+
+    if (action != -1)
+      strcat(token, element_action_info[action].suffix);
+
+    if (direction != -1)
+      strcat(token, element_direction_info[MV_DIR_BIT(direction)].suffix);
+
+    text = getListEntry(demo_anim_text, token);
+
+    if (text == NULL)
+      text = "[Oops! No Text found!]";
+  }
+
+#if 1
+  DrawTextToTextArea(xstart, ystart + ypos * ystep, text, FONT_TEXT_2, 34,
+                    34, 2, BLIT_ON_BACKGROUND);
+#else
+  if (strlen(text) > 25)
+    text[25] = '\0';
+
+  DrawText(xstart, ystart + ypos * ystep + 8, text, FONT_TEXT_2);
+#endif
+}
+
+#else
+
 void DrawHelpScreenElText(int start)
 {
   int i;
@@ -1008,6 +1063,7 @@ void DrawHelpScreenElText(int start)
   DrawTextSCentered(ybottom, FONT_TEXT_4,
                    "Press any key or button for next page");
 }
+#endif
 
 void DrawHelpScreenMusicText(int num)
 {
@@ -1125,20 +1181,23 @@ void DrawHelpScreen()
   helpscreen_musicpos = 0;
   helpscreen_state = 0;
 
-  LoadInfoAnimations();
+  LoadDemoAnimInfo();
+  LoadDemoAnimText();
   LoadMusicInfo();
 
   num_helpscreen_els = 0;
-  for (i=0; info_animation_info[i].element != -999; i++)
-    if (info_animation_info[i].element == -1)
+  for (i=0; demo_anim_info[i].element != -999; i++)
+    if (demo_anim_info[i].element == -1)
       num_helpscreen_els++;
 
   num_helpscreen_music = 0;
   for (list = music_file_info; list != NULL; list = list->next)
     num_helpscreen_music++;
 
+  DrawHelpScreenElAction(0, TRUE);
+#if 0
   DrawHelpScreenElText(0);
-  DrawHelpScreenElAction(0);
+#endif
 
   FadeToFront();
   InitAnimation();
@@ -1164,8 +1223,10 @@ void HandleHelpScreen(int button)
       helpscreen_state++;
 
       FrameCounter = 0;
+      DrawHelpScreenElAction(helpscreen_state * MAX_HELPSCREEN_ELS, TRUE);
+#if 0
       DrawHelpScreenElText(helpscreen_state * MAX_HELPSCREEN_ELS);
-      DrawHelpScreenElAction(helpscreen_state * MAX_HELPSCREEN_ELS);
+#endif
     }
     else if (helpscreen_state <
             num_helpscreen_els_pages + num_helpscreen_music - 1)
@@ -1198,7 +1259,7 @@ void HandleHelpScreen(int button)
     if (DelayReached(&hs_delay, GAME_FRAME_DELAY))
     {
       if (helpscreen_state < num_helpscreen_els_pages)
-       DrawHelpScreenElAction(helpscreen_state * MAX_HELPSCREEN_ELS);
+       DrawHelpScreenElAction(helpscreen_state * MAX_HELPSCREEN_ELS, FALSE);
     }
 
     PlayMenuSoundIfLoop();
index f4b704b462553ec3b090f6639c9a918d8ee524c9..6b126c976f2d6bf8476723689d77e8979a47b3db 100644 (file)
@@ -26,8 +26,8 @@ void DrawHeadline(void);
 void DrawMainMenu(void);
 void HandleMainMenu(int, int, int, int, int);
 
-void DrawHelpScreenElAction(int);
-void DrawHelpScreenElText(int);
+void DrawHelpScreenElAction(int, boolean);
+void DrawHelpScreenElText(int, int, int, int);
 void DrawHelpScreenMusicText(int);
 void DrawHelpScreenCreditsText(void);
 void DrawHelpScreen(void);