rnd-20030208-2-src
authorHolger Schemel <info@artsoft.org>
Sat, 8 Feb 2003 16:51:21 +0000 (17:51 +0100)
committerHolger Schemel <info@artsoft.org>
Sat, 30 Aug 2014 08:40:16 +0000 (10:40 +0200)
14 files changed:
Makefile
src/Makefile
src/conf_chr.h [new file with mode: 0644]
src/conf_cus.h [new file with mode: 0644]
src/conf_e2g.c
src/conftime.h
src/init.c
src/libgame/image.c
src/libgame/misc.c
src/libgame/misc.h
src/libgame/system.c
src/libgame/system.h
src/main.h
src/tools.c

index 538f6c04fcb06a43fe47290175d6317c154bef8f..a5b3d976bc18c017122120838fca0ac01a041943 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -88,12 +88,7 @@ clean:
 #-----------------------------------------------------------------------------#
 
 auto-conf:
-       ./Scripts/create_element_defs.pl --gfx > src/conf_gfx.h
-       ./Scripts/create_element_defs.pl --snd > src/conf_snd.h
-       ./Scripts/create_element_defs.pl --chr > src/conf_chr.c
-       ./Scripts/create_element_defs.pl --cus > src/conf_cus.c
-       ./Scripts/create_element_defs.pl --e2g > src/conf_e2g.c
-       ./Scripts/create_element_defs.pl --esg > src/conf_esg.c
+       @$(MAKE_CMD) auto-conf
 
 run:
        @$(MAKE_CMD) TARGET=$(DEFAULT_TARGET) && ./rocksndiamonds --verbose
index f0d9c3ed8fda5e024402ae2e46fe02b9423d9e23..89e047585eadb073b4b59c7f6f54f5fdf477aaad 100644 (file)
@@ -153,6 +153,17 @@ OBJS =     main.o          \
        network.o       \
        netserv.o
 
+CNFS = conf_gfx.h      \
+       conf_snd.h      \
+       conf_chr.c      \
+       conf_chr.h      \
+       conf_cus.c      \
+       conf_cus.h      \
+       conf_e2g.c      \
+       conf_esg.c
+
+CNFS_CMD = ../Scripts/create_element_defs.pl
+
 TIMESTAMP_FILE = conftime.h
 
 LIBDIR = libgame
@@ -175,15 +186,17 @@ libgame_dir:
 $(LIBGAME):
        @$(MAKE) -C $(LIBDIR)
 
+auto-conf:
+       @for i in $(CNFS); do                   \
+               echo "$(CNFS_CMD) $$i > $$i";   \
+               $(CNFS_CMD) $$i > $$i;          \
+       done
+
 conf_gfx.h: conf_gfx.c
-       ../Scripts/create_element_defs.pl --gfx > conf_gfx.h
-       ../Scripts/create_element_defs.pl --chr > conf_chr.c
-       ../Scripts/create_element_defs.pl --cus > conf_cus.c
-       ../Scripts/create_element_defs.pl --e2g > conf_e2g.c
-       ../Scripts/create_element_defs.pl --esg > conf_esg.c
+       @$(MAKE) auto-conf
 
 conf_snd.h: conf_snd.c
-       ../Scripts/create_element_defs.pl --snd > conf_snd.h
+       @$(MAKE) auto-conf
 
 $(TIMESTAMP_FILE): $(SRCS) $(LIBGAME)
        @date '+"[%Y-%m-%d %H:%M]"' \
diff --git a/src/conf_chr.h b/src/conf_chr.h
new file mode 100644 (file)
index 0000000..4f8abbc
--- /dev/null
@@ -0,0 +1,90 @@
+/***********************************************************
+* 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_chr.h                                               *
+***********************************************************/
+
+/* ----- this file was automatically generated -- do not edit by hand ----- */
+
+#ifndef CONF_CHR_H
+#define CONF_CHR_H
+
+/* values for elements configuration (character elements) */
+
+#define EL_CHAR_SPACE                  (EL_CHAR_ASCII0 + 32)
+#define EL_CHAR_EXCLAM                 (EL_CHAR_ASCII0 + 33)
+#define EL_CHAR_QUOTEDBL               (EL_CHAR_ASCII0 + 34)
+#define EL_CHAR_NUMBERSIGN             (EL_CHAR_ASCII0 + 35)
+#define EL_CHAR_DOLLAR                 (EL_CHAR_ASCII0 + 36)
+#define EL_CHAR_PROCENT                        (EL_CHAR_ASCII0 + 37)
+#define EL_CHAR_AMPERSAND              (EL_CHAR_ASCII0 + 38)
+#define EL_CHAR_APOSTROPHE             (EL_CHAR_ASCII0 + 39)
+#define EL_CHAR_PARENLEFT              (EL_CHAR_ASCII0 + 40)
+#define EL_CHAR_PARENRIGHT             (EL_CHAR_ASCII0 + 41)
+#define EL_CHAR_ASTERISK               (EL_CHAR_ASCII0 + 42)
+#define EL_CHAR_PLUS                   (EL_CHAR_ASCII0 + 43)
+#define EL_CHAR_COMMA                  (EL_CHAR_ASCII0 + 44)
+#define EL_CHAR_MINUS                  (EL_CHAR_ASCII0 + 45)
+#define EL_CHAR_PERIOD                 (EL_CHAR_ASCII0 + 46)
+#define EL_CHAR_SLASH                  (EL_CHAR_ASCII0 + 47)
+#define EL_CHAR_0                      (EL_CHAR_ASCII0 + 48)
+#define EL_CHAR_1                      (EL_CHAR_ASCII0 + 49)
+#define EL_CHAR_2                      (EL_CHAR_ASCII0 + 50)
+#define EL_CHAR_3                      (EL_CHAR_ASCII0 + 51)
+#define EL_CHAR_4                      (EL_CHAR_ASCII0 + 52)
+#define EL_CHAR_5                      (EL_CHAR_ASCII0 + 53)
+#define EL_CHAR_6                      (EL_CHAR_ASCII0 + 54)
+#define EL_CHAR_7                      (EL_CHAR_ASCII0 + 55)
+#define EL_CHAR_8                      (EL_CHAR_ASCII0 + 56)
+#define EL_CHAR_9                      (EL_CHAR_ASCII0 + 57)
+#define EL_CHAR_COLON                  (EL_CHAR_ASCII0 + 58)
+#define EL_CHAR_SEMICOLON              (EL_CHAR_ASCII0 + 59)
+#define EL_CHAR_LESS                   (EL_CHAR_ASCII0 + 60)
+#define EL_CHAR_EQUAL                  (EL_CHAR_ASCII0 + 61)
+#define EL_CHAR_GREATER                        (EL_CHAR_ASCII0 + 62)
+#define EL_CHAR_QUESTION               (EL_CHAR_ASCII0 + 63)
+#define EL_CHAR_AT                     (EL_CHAR_ASCII0 + 64)
+#define EL_CHAR_A                      (EL_CHAR_ASCII0 + 65)
+#define EL_CHAR_B                      (EL_CHAR_ASCII0 + 66)
+#define EL_CHAR_C                      (EL_CHAR_ASCII0 + 67)
+#define EL_CHAR_D                      (EL_CHAR_ASCII0 + 68)
+#define EL_CHAR_E                      (EL_CHAR_ASCII0 + 69)
+#define EL_CHAR_F                      (EL_CHAR_ASCII0 + 70)
+#define EL_CHAR_G                      (EL_CHAR_ASCII0 + 71)
+#define EL_CHAR_H                      (EL_CHAR_ASCII0 + 72)
+#define EL_CHAR_I                      (EL_CHAR_ASCII0 + 73)
+#define EL_CHAR_J                      (EL_CHAR_ASCII0 + 74)
+#define EL_CHAR_K                      (EL_CHAR_ASCII0 + 75)
+#define EL_CHAR_L                      (EL_CHAR_ASCII0 + 76)
+#define EL_CHAR_M                      (EL_CHAR_ASCII0 + 77)
+#define EL_CHAR_N                      (EL_CHAR_ASCII0 + 78)
+#define EL_CHAR_O                      (EL_CHAR_ASCII0 + 79)
+#define EL_CHAR_P                      (EL_CHAR_ASCII0 + 80)
+#define EL_CHAR_Q                      (EL_CHAR_ASCII0 + 81)
+#define EL_CHAR_R                      (EL_CHAR_ASCII0 + 82)
+#define EL_CHAR_S                      (EL_CHAR_ASCII0 + 83)
+#define EL_CHAR_T                      (EL_CHAR_ASCII0 + 84)
+#define EL_CHAR_U                      (EL_CHAR_ASCII0 + 85)
+#define EL_CHAR_V                      (EL_CHAR_ASCII0 + 86)
+#define EL_CHAR_W                      (EL_CHAR_ASCII0 + 87)
+#define EL_CHAR_X                      (EL_CHAR_ASCII0 + 88)
+#define EL_CHAR_Y                      (EL_CHAR_ASCII0 + 89)
+#define EL_CHAR_Z                      (EL_CHAR_ASCII0 + 90)
+#define EL_CHAR_AE                     (EL_CHAR_ASCII0 + 91)
+#define EL_CHAR_OE                     (EL_CHAR_ASCII0 + 92)
+#define EL_CHAR_UE                     (EL_CHAR_ASCII0 + 93)
+#define EL_CHAR_COPYRIGHT              (EL_CHAR_ASCII0 + 94)
+#define EL_CHAR_UNDERSCORE             (EL_CHAR_ASCII0 + 95)
+#define EL_CHAR_EMPTY                  (EL_CHAR_ASCII0 + 96)
+#define EL_CHAR_DEGREE                 (EL_CHAR_ASCII0 + 97)
+#define EL_CHAR_TM                     (EL_CHAR_ASCII0 + 98)
+#define EL_CHAR_CURSOR                 (EL_CHAR_ASCII0 + 99)
+
+#endif /* CONF_CHR_C */
diff --git a/src/conf_cus.h b/src/conf_cus.h
new file mode 100644 (file)
index 0000000..425334b
--- /dev/null
@@ -0,0 +1,150 @@
+/***********************************************************
+* 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_cus.h                                               *
+***********************************************************/
+
+/* ----- this file was automatically generated -- do not edit by hand ----- */
+
+#ifndef CONF_CUS_H
+#define CONF_CUS_H
+
+/* values for elements configuration (custom elements) */
+
+#define EL_CUSTOM_1                    (EL_CUSTOM_START + 0)
+#define EL_CUSTOM_2                    (EL_CUSTOM_START + 1)
+#define EL_CUSTOM_3                    (EL_CUSTOM_START + 2)
+#define EL_CUSTOM_4                    (EL_CUSTOM_START + 3)
+#define EL_CUSTOM_5                    (EL_CUSTOM_START + 4)
+#define EL_CUSTOM_6                    (EL_CUSTOM_START + 5)
+#define EL_CUSTOM_7                    (EL_CUSTOM_START + 6)
+#define EL_CUSTOM_8                    (EL_CUSTOM_START + 7)
+#define EL_CUSTOM_9                    (EL_CUSTOM_START + 8)
+#define EL_CUSTOM_10                   (EL_CUSTOM_START + 9)
+#define EL_CUSTOM_11                   (EL_CUSTOM_START + 10)
+#define EL_CUSTOM_12                   (EL_CUSTOM_START + 11)
+#define EL_CUSTOM_13                   (EL_CUSTOM_START + 12)
+#define EL_CUSTOM_14                   (EL_CUSTOM_START + 13)
+#define EL_CUSTOM_15                   (EL_CUSTOM_START + 14)
+#define EL_CUSTOM_16                   (EL_CUSTOM_START + 15)
+#define EL_CUSTOM_17                   (EL_CUSTOM_START + 16)
+#define EL_CUSTOM_18                   (EL_CUSTOM_START + 17)
+#define EL_CUSTOM_19                   (EL_CUSTOM_START + 18)
+#define EL_CUSTOM_20                   (EL_CUSTOM_START + 19)
+#define EL_CUSTOM_21                   (EL_CUSTOM_START + 20)
+#define EL_CUSTOM_22                   (EL_CUSTOM_START + 21)
+#define EL_CUSTOM_23                   (EL_CUSTOM_START + 22)
+#define EL_CUSTOM_24                   (EL_CUSTOM_START + 23)
+#define EL_CUSTOM_25                   (EL_CUSTOM_START + 24)
+#define EL_CUSTOM_26                   (EL_CUSTOM_START + 25)
+#define EL_CUSTOM_27                   (EL_CUSTOM_START + 26)
+#define EL_CUSTOM_28                   (EL_CUSTOM_START + 27)
+#define EL_CUSTOM_29                   (EL_CUSTOM_START + 28)
+#define EL_CUSTOM_30                   (EL_CUSTOM_START + 29)
+#define EL_CUSTOM_31                   (EL_CUSTOM_START + 30)
+#define EL_CUSTOM_32                   (EL_CUSTOM_START + 31)
+#define EL_CUSTOM_33                   (EL_CUSTOM_START + 32)
+#define EL_CUSTOM_34                   (EL_CUSTOM_START + 33)
+#define EL_CUSTOM_35                   (EL_CUSTOM_START + 34)
+#define EL_CUSTOM_36                   (EL_CUSTOM_START + 35)
+#define EL_CUSTOM_37                   (EL_CUSTOM_START + 36)
+#define EL_CUSTOM_38                   (EL_CUSTOM_START + 37)
+#define EL_CUSTOM_39                   (EL_CUSTOM_START + 38)
+#define EL_CUSTOM_40                   (EL_CUSTOM_START + 39)
+#define EL_CUSTOM_41                   (EL_CUSTOM_START + 40)
+#define EL_CUSTOM_42                   (EL_CUSTOM_START + 41)
+#define EL_CUSTOM_43                   (EL_CUSTOM_START + 42)
+#define EL_CUSTOM_44                   (EL_CUSTOM_START + 43)
+#define EL_CUSTOM_45                   (EL_CUSTOM_START + 44)
+#define EL_CUSTOM_46                   (EL_CUSTOM_START + 45)
+#define EL_CUSTOM_47                   (EL_CUSTOM_START + 46)
+#define EL_CUSTOM_48                   (EL_CUSTOM_START + 47)
+#define EL_CUSTOM_49                   (EL_CUSTOM_START + 48)
+#define EL_CUSTOM_50                   (EL_CUSTOM_START + 49)
+#define EL_CUSTOM_51                   (EL_CUSTOM_START + 50)
+#define EL_CUSTOM_52                   (EL_CUSTOM_START + 51)
+#define EL_CUSTOM_53                   (EL_CUSTOM_START + 52)
+#define EL_CUSTOM_54                   (EL_CUSTOM_START + 53)
+#define EL_CUSTOM_55                   (EL_CUSTOM_START + 54)
+#define EL_CUSTOM_56                   (EL_CUSTOM_START + 55)
+#define EL_CUSTOM_57                   (EL_CUSTOM_START + 56)
+#define EL_CUSTOM_58                   (EL_CUSTOM_START + 57)
+#define EL_CUSTOM_59                   (EL_CUSTOM_START + 58)
+#define EL_CUSTOM_60                   (EL_CUSTOM_START + 59)
+#define EL_CUSTOM_61                   (EL_CUSTOM_START + 60)
+#define EL_CUSTOM_62                   (EL_CUSTOM_START + 61)
+#define EL_CUSTOM_63                   (EL_CUSTOM_START + 62)
+#define EL_CUSTOM_64                   (EL_CUSTOM_START + 63)
+#define EL_CUSTOM_65                   (EL_CUSTOM_START + 64)
+#define EL_CUSTOM_66                   (EL_CUSTOM_START + 65)
+#define EL_CUSTOM_67                   (EL_CUSTOM_START + 66)
+#define EL_CUSTOM_68                   (EL_CUSTOM_START + 67)
+#define EL_CUSTOM_69                   (EL_CUSTOM_START + 68)
+#define EL_CUSTOM_70                   (EL_CUSTOM_START + 69)
+#define EL_CUSTOM_71                   (EL_CUSTOM_START + 70)
+#define EL_CUSTOM_72                   (EL_CUSTOM_START + 71)
+#define EL_CUSTOM_73                   (EL_CUSTOM_START + 72)
+#define EL_CUSTOM_74                   (EL_CUSTOM_START + 73)
+#define EL_CUSTOM_75                   (EL_CUSTOM_START + 74)
+#define EL_CUSTOM_76                   (EL_CUSTOM_START + 75)
+#define EL_CUSTOM_77                   (EL_CUSTOM_START + 76)
+#define EL_CUSTOM_78                   (EL_CUSTOM_START + 77)
+#define EL_CUSTOM_79                   (EL_CUSTOM_START + 78)
+#define EL_CUSTOM_80                   (EL_CUSTOM_START + 79)
+#define EL_CUSTOM_81                   (EL_CUSTOM_START + 80)
+#define EL_CUSTOM_82                   (EL_CUSTOM_START + 81)
+#define EL_CUSTOM_83                   (EL_CUSTOM_START + 82)
+#define EL_CUSTOM_84                   (EL_CUSTOM_START + 83)
+#define EL_CUSTOM_85                   (EL_CUSTOM_START + 84)
+#define EL_CUSTOM_86                   (EL_CUSTOM_START + 85)
+#define EL_CUSTOM_87                   (EL_CUSTOM_START + 86)
+#define EL_CUSTOM_88                   (EL_CUSTOM_START + 87)
+#define EL_CUSTOM_89                   (EL_CUSTOM_START + 88)
+#define EL_CUSTOM_90                   (EL_CUSTOM_START + 89)
+#define EL_CUSTOM_91                   (EL_CUSTOM_START + 90)
+#define EL_CUSTOM_92                   (EL_CUSTOM_START + 91)
+#define EL_CUSTOM_93                   (EL_CUSTOM_START + 92)
+#define EL_CUSTOM_94                   (EL_CUSTOM_START + 93)
+#define EL_CUSTOM_95                   (EL_CUSTOM_START + 94)
+#define EL_CUSTOM_96                   (EL_CUSTOM_START + 95)
+#define EL_CUSTOM_97                   (EL_CUSTOM_START + 96)
+#define EL_CUSTOM_98                   (EL_CUSTOM_START + 97)
+#define EL_CUSTOM_99                   (EL_CUSTOM_START + 98)
+#define EL_CUSTOM_100                  (EL_CUSTOM_START + 99)
+#define EL_CUSTOM_101                  (EL_CUSTOM_START + 100)
+#define EL_CUSTOM_102                  (EL_CUSTOM_START + 101)
+#define EL_CUSTOM_103                  (EL_CUSTOM_START + 102)
+#define EL_CUSTOM_104                  (EL_CUSTOM_START + 103)
+#define EL_CUSTOM_105                  (EL_CUSTOM_START + 104)
+#define EL_CUSTOM_106                  (EL_CUSTOM_START + 105)
+#define EL_CUSTOM_107                  (EL_CUSTOM_START + 106)
+#define EL_CUSTOM_108                  (EL_CUSTOM_START + 107)
+#define EL_CUSTOM_109                  (EL_CUSTOM_START + 108)
+#define EL_CUSTOM_110                  (EL_CUSTOM_START + 109)
+#define EL_CUSTOM_111                  (EL_CUSTOM_START + 110)
+#define EL_CUSTOM_112                  (EL_CUSTOM_START + 111)
+#define EL_CUSTOM_113                  (EL_CUSTOM_START + 112)
+#define EL_CUSTOM_114                  (EL_CUSTOM_START + 113)
+#define EL_CUSTOM_115                  (EL_CUSTOM_START + 114)
+#define EL_CUSTOM_116                  (EL_CUSTOM_START + 115)
+#define EL_CUSTOM_117                  (EL_CUSTOM_START + 116)
+#define EL_CUSTOM_118                  (EL_CUSTOM_START + 117)
+#define EL_CUSTOM_119                  (EL_CUSTOM_START + 118)
+#define EL_CUSTOM_120                  (EL_CUSTOM_START + 119)
+#define EL_CUSTOM_121                  (EL_CUSTOM_START + 120)
+#define EL_CUSTOM_122                  (EL_CUSTOM_START + 121)
+#define EL_CUSTOM_123                  (EL_CUSTOM_START + 122)
+#define EL_CUSTOM_124                  (EL_CUSTOM_START + 123)
+#define EL_CUSTOM_125                  (EL_CUSTOM_START + 124)
+#define EL_CUSTOM_126                  (EL_CUSTOM_START + 125)
+#define EL_CUSTOM_127                  (EL_CUSTOM_START + 126)
+#define EL_CUSTOM_128                  (EL_CUSTOM_START + 127)
+
+#endif /* CONF_CUS_C */
index 2f48bf00a9ea39522023ad836b744a7d511d2de0..82d0051f551ec18ede3a4cf05f24c371fa510aa9 100644 (file)
@@ -2328,6 +2328,790 @@ element_to_graphic[] =
     EL_SIGN_YINYANG,                           -1, -1,
     IMG_CHAR_QUESTION
   },
+  {
+    EL_CHAR_SPACE,                             -1, -1,
+    IMG_CHAR_SPACE
+  },
+  {
+    EL_CHAR_EXCLAM,                            -1, -1,
+    IMG_CHAR_EXCLAM
+  },
+  {
+    EL_CHAR_QUOTEDBL,                          -1, -1,
+    IMG_CHAR_QUOTEDBL
+  },
+  {
+    EL_CHAR_NUMBERSIGN,                                -1, -1,
+    IMG_CHAR_NUMBERSIGN
+  },
+  {
+    EL_CHAR_DOLLAR,                            -1, -1,
+    IMG_CHAR_DOLLAR
+  },
+  {
+    EL_CHAR_PROCENT,                           -1, -1,
+    IMG_CHAR_PROCENT
+  },
+  {
+    EL_CHAR_AMPERSAND,                         -1, -1,
+    IMG_CHAR_AMPERSAND
+  },
+  {
+    EL_CHAR_APOSTROPHE,                                -1, -1,
+    IMG_CHAR_APOSTROPHE
+  },
+  {
+    EL_CHAR_PARENLEFT,                         -1, -1,
+    IMG_CHAR_PARENLEFT
+  },
+  {
+    EL_CHAR_PARENRIGHT,                                -1, -1,
+    IMG_CHAR_PARENRIGHT
+  },
+  {
+    EL_CHAR_ASTERISK,                          -1, -1,
+    IMG_CHAR_ASTERISK
+  },
+  {
+    EL_CHAR_PLUS,                              -1, -1,
+    IMG_CHAR_PLUS
+  },
+  {
+    EL_CHAR_COMMA,                             -1, -1,
+    IMG_CHAR_COMMA
+  },
+  {
+    EL_CHAR_MINUS,                             -1, -1,
+    IMG_CHAR_MINUS
+  },
+  {
+    EL_CHAR_PERIOD,                            -1, -1,
+    IMG_CHAR_PERIOD
+  },
+  {
+    EL_CHAR_SLASH,                             -1, -1,
+    IMG_CHAR_SLASH
+  },
+  {
+    EL_CHAR_0,                                 -1, -1,
+    IMG_CHAR_0
+  },
+  {
+    EL_CHAR_1,                                 -1, -1,
+    IMG_CHAR_1
+  },
+  {
+    EL_CHAR_2,                                 -1, -1,
+    IMG_CHAR_2
+  },
+  {
+    EL_CHAR_3,                                 -1, -1,
+    IMG_CHAR_3
+  },
+  {
+    EL_CHAR_4,                                 -1, -1,
+    IMG_CHAR_4
+  },
+  {
+    EL_CHAR_5,                                 -1, -1,
+    IMG_CHAR_5
+  },
+  {
+    EL_CHAR_6,                                 -1, -1,
+    IMG_CHAR_6
+  },
+  {
+    EL_CHAR_7,                                 -1, -1,
+    IMG_CHAR_7
+  },
+  {
+    EL_CHAR_8,                                 -1, -1,
+    IMG_CHAR_8
+  },
+  {
+    EL_CHAR_9,                                 -1, -1,
+    IMG_CHAR_9
+  },
+  {
+    EL_CHAR_COLON,                             -1, -1,
+    IMG_CHAR_COLON
+  },
+  {
+    EL_CHAR_SEMICOLON,                         -1, -1,
+    IMG_CHAR_SEMICOLON
+  },
+  {
+    EL_CHAR_LESS,                              -1, -1,
+    IMG_CHAR_LESS
+  },
+  {
+    EL_CHAR_EQUAL,                             -1, -1,
+    IMG_CHAR_EQUAL
+  },
+  {
+    EL_CHAR_GREATER,                           -1, -1,
+    IMG_CHAR_GREATER
+  },
+  {
+    EL_CHAR_QUESTION,                          -1, -1,
+    IMG_CHAR_QUESTION
+  },
+  {
+    EL_CHAR_AT,                                        -1, -1,
+    IMG_CHAR_AT
+  },
+  {
+    EL_CHAR_A,                                 -1, -1,
+    IMG_CHAR_A
+  },
+  {
+    EL_CHAR_B,                                 -1, -1,
+    IMG_CHAR_B
+  },
+  {
+    EL_CHAR_C,                                 -1, -1,
+    IMG_CHAR_C
+  },
+  {
+    EL_CHAR_D,                                 -1, -1,
+    IMG_CHAR_D
+  },
+  {
+    EL_CHAR_E,                                 -1, -1,
+    IMG_CHAR_E
+  },
+  {
+    EL_CHAR_F,                                 -1, -1,
+    IMG_CHAR_F
+  },
+  {
+    EL_CHAR_G,                                 -1, -1,
+    IMG_CHAR_G
+  },
+  {
+    EL_CHAR_H,                                 -1, -1,
+    IMG_CHAR_H
+  },
+  {
+    EL_CHAR_I,                                 -1, -1,
+    IMG_CHAR_I
+  },
+  {
+    EL_CHAR_J,                                 -1, -1,
+    IMG_CHAR_J
+  },
+  {
+    EL_CHAR_K,                                 -1, -1,
+    IMG_CHAR_K
+  },
+  {
+    EL_CHAR_L,                                 -1, -1,
+    IMG_CHAR_L
+  },
+  {
+    EL_CHAR_M,                                 -1, -1,
+    IMG_CHAR_M
+  },
+  {
+    EL_CHAR_N,                                 -1, -1,
+    IMG_CHAR_N
+  },
+  {
+    EL_CHAR_O,                                 -1, -1,
+    IMG_CHAR_O
+  },
+  {
+    EL_CHAR_P,                                 -1, -1,
+    IMG_CHAR_P
+  },
+  {
+    EL_CHAR_Q,                                 -1, -1,
+    IMG_CHAR_Q
+  },
+  {
+    EL_CHAR_R,                                 -1, -1,
+    IMG_CHAR_R
+  },
+  {
+    EL_CHAR_S,                                 -1, -1,
+    IMG_CHAR_S
+  },
+  {
+    EL_CHAR_T,                                 -1, -1,
+    IMG_CHAR_T
+  },
+  {
+    EL_CHAR_U,                                 -1, -1,
+    IMG_CHAR_U
+  },
+  {
+    EL_CHAR_V,                                 -1, -1,
+    IMG_CHAR_V
+  },
+  {
+    EL_CHAR_W,                                 -1, -1,
+    IMG_CHAR_W
+  },
+  {
+    EL_CHAR_X,                                 -1, -1,
+    IMG_CHAR_X
+  },
+  {
+    EL_CHAR_Y,                                 -1, -1,
+    IMG_CHAR_Y
+  },
+  {
+    EL_CHAR_Z,                                 -1, -1,
+    IMG_CHAR_Z
+  },
+  {
+    EL_CHAR_AE,                                        -1, -1,
+    IMG_CHAR_AE
+  },
+  {
+    EL_CHAR_OE,                                        -1, -1,
+    IMG_CHAR_OE
+  },
+  {
+    EL_CHAR_UE,                                        -1, -1,
+    IMG_CHAR_UE
+  },
+  {
+    EL_CHAR_COPYRIGHT,                         -1, -1,
+    IMG_CHAR_COPYRIGHT
+  },
+  {
+    EL_CHAR_UNDERSCORE,                                -1, -1,
+    IMG_CHAR_UNDERSCORE
+  },
+  {
+    EL_CHAR_EMPTY,                             -1, -1,
+    IMG_CHAR_EMPTY
+  },
+  {
+    EL_CHAR_DEGREE,                            -1, -1,
+    IMG_CHAR_DEGREE
+  },
+  {
+    EL_CHAR_TM,                                        -1, -1,
+    IMG_CHAR_TM
+  },
+  {
+    EL_CHAR_CURSOR,                            -1, -1,
+    IMG_CHAR_CURSOR
+  },
+  {
+    EL_CUSTOM_1,                               -1, -1,
+    IMG_CUSTOM_1
+  },
+  {
+    EL_CUSTOM_2,                               -1, -1,
+    IMG_CUSTOM_2
+  },
+  {
+    EL_CUSTOM_3,                               -1, -1,
+    IMG_CUSTOM_3
+  },
+  {
+    EL_CUSTOM_4,                               -1, -1,
+    IMG_CUSTOM_4
+  },
+  {
+    EL_CUSTOM_5,                               -1, -1,
+    IMG_CUSTOM_5
+  },
+  {
+    EL_CUSTOM_6,                               -1, -1,
+    IMG_CUSTOM_6
+  },
+  {
+    EL_CUSTOM_7,                               -1, -1,
+    IMG_CUSTOM_7
+  },
+  {
+    EL_CUSTOM_8,                               -1, -1,
+    IMG_CUSTOM_8
+  },
+  {
+    EL_CUSTOM_9,                               -1, -1,
+    IMG_CUSTOM_9
+  },
+  {
+    EL_CUSTOM_10,                              -1, -1,
+    IMG_CUSTOM_10
+  },
+  {
+    EL_CUSTOM_11,                              -1, -1,
+    IMG_CUSTOM_11
+  },
+  {
+    EL_CUSTOM_12,                              -1, -1,
+    IMG_CUSTOM_12
+  },
+  {
+    EL_CUSTOM_13,                              -1, -1,
+    IMG_CUSTOM_13
+  },
+  {
+    EL_CUSTOM_14,                              -1, -1,
+    IMG_CUSTOM_14
+  },
+  {
+    EL_CUSTOM_15,                              -1, -1,
+    IMG_CUSTOM_15
+  },
+  {
+    EL_CUSTOM_16,                              -1, -1,
+    IMG_CUSTOM_16
+  },
+  {
+    EL_CUSTOM_17,                              -1, -1,
+    IMG_CUSTOM_17
+  },
+  {
+    EL_CUSTOM_18,                              -1, -1,
+    IMG_CUSTOM_18
+  },
+  {
+    EL_CUSTOM_19,                              -1, -1,
+    IMG_CUSTOM_19
+  },
+  {
+    EL_CUSTOM_20,                              -1, -1,
+    IMG_CUSTOM_20
+  },
+  {
+    EL_CUSTOM_21,                              -1, -1,
+    IMG_CUSTOM_21
+  },
+  {
+    EL_CUSTOM_22,                              -1, -1,
+    IMG_CUSTOM_22
+  },
+  {
+    EL_CUSTOM_23,                              -1, -1,
+    IMG_CUSTOM_23
+  },
+  {
+    EL_CUSTOM_24,                              -1, -1,
+    IMG_CUSTOM_24
+  },
+  {
+    EL_CUSTOM_25,                              -1, -1,
+    IMG_CUSTOM_25
+  },
+  {
+    EL_CUSTOM_26,                              -1, -1,
+    IMG_CUSTOM_26
+  },
+  {
+    EL_CUSTOM_27,                              -1, -1,
+    IMG_CUSTOM_27
+  },
+  {
+    EL_CUSTOM_28,                              -1, -1,
+    IMG_CUSTOM_28
+  },
+  {
+    EL_CUSTOM_29,                              -1, -1,
+    IMG_CUSTOM_29
+  },
+  {
+    EL_CUSTOM_30,                              -1, -1,
+    IMG_CUSTOM_30
+  },
+  {
+    EL_CUSTOM_31,                              -1, -1,
+    IMG_CUSTOM_31
+  },
+  {
+    EL_CUSTOM_32,                              -1, -1,
+    IMG_CUSTOM_32
+  },
+  {
+    EL_CUSTOM_33,                              -1, -1,
+    IMG_CUSTOM_33
+  },
+  {
+    EL_CUSTOM_34,                              -1, -1,
+    IMG_CUSTOM_34
+  },
+  {
+    EL_CUSTOM_35,                              -1, -1,
+    IMG_CUSTOM_35
+  },
+  {
+    EL_CUSTOM_36,                              -1, -1,
+    IMG_CUSTOM_36
+  },
+  {
+    EL_CUSTOM_37,                              -1, -1,
+    IMG_CUSTOM_37
+  },
+  {
+    EL_CUSTOM_38,                              -1, -1,
+    IMG_CUSTOM_38
+  },
+  {
+    EL_CUSTOM_39,                              -1, -1,
+    IMG_CUSTOM_39
+  },
+  {
+    EL_CUSTOM_40,                              -1, -1,
+    IMG_CUSTOM_40
+  },
+  {
+    EL_CUSTOM_41,                              -1, -1,
+    IMG_CUSTOM_41
+  },
+  {
+    EL_CUSTOM_42,                              -1, -1,
+    IMG_CUSTOM_42
+  },
+  {
+    EL_CUSTOM_43,                              -1, -1,
+    IMG_CUSTOM_43
+  },
+  {
+    EL_CUSTOM_44,                              -1, -1,
+    IMG_CUSTOM_44
+  },
+  {
+    EL_CUSTOM_45,                              -1, -1,
+    IMG_CUSTOM_45
+  },
+  {
+    EL_CUSTOM_46,                              -1, -1,
+    IMG_CUSTOM_46
+  },
+  {
+    EL_CUSTOM_47,                              -1, -1,
+    IMG_CUSTOM_47
+  },
+  {
+    EL_CUSTOM_48,                              -1, -1,
+    IMG_CUSTOM_48
+  },
+  {
+    EL_CUSTOM_49,                              -1, -1,
+    IMG_CUSTOM_49
+  },
+  {
+    EL_CUSTOM_50,                              -1, -1,
+    IMG_CUSTOM_50
+  },
+  {
+    EL_CUSTOM_51,                              -1, -1,
+    IMG_CUSTOM_51
+  },
+  {
+    EL_CUSTOM_52,                              -1, -1,
+    IMG_CUSTOM_52
+  },
+  {
+    EL_CUSTOM_53,                              -1, -1,
+    IMG_CUSTOM_53
+  },
+  {
+    EL_CUSTOM_54,                              -1, -1,
+    IMG_CUSTOM_54
+  },
+  {
+    EL_CUSTOM_55,                              -1, -1,
+    IMG_CUSTOM_55
+  },
+  {
+    EL_CUSTOM_56,                              -1, -1,
+    IMG_CUSTOM_56
+  },
+  {
+    EL_CUSTOM_57,                              -1, -1,
+    IMG_CUSTOM_57
+  },
+  {
+    EL_CUSTOM_58,                              -1, -1,
+    IMG_CUSTOM_58
+  },
+  {
+    EL_CUSTOM_59,                              -1, -1,
+    IMG_CUSTOM_59
+  },
+  {
+    EL_CUSTOM_60,                              -1, -1,
+    IMG_CUSTOM_60
+  },
+  {
+    EL_CUSTOM_61,                              -1, -1,
+    IMG_CUSTOM_61
+  },
+  {
+    EL_CUSTOM_62,                              -1, -1,
+    IMG_CUSTOM_62
+  },
+  {
+    EL_CUSTOM_63,                              -1, -1,
+    IMG_CUSTOM_63
+  },
+  {
+    EL_CUSTOM_64,                              -1, -1,
+    IMG_CUSTOM_64
+  },
+  {
+    EL_CUSTOM_65,                              -1, -1,
+    IMG_CUSTOM_65
+  },
+  {
+    EL_CUSTOM_66,                              -1, -1,
+    IMG_CUSTOM_66
+  },
+  {
+    EL_CUSTOM_67,                              -1, -1,
+    IMG_CUSTOM_67
+  },
+  {
+    EL_CUSTOM_68,                              -1, -1,
+    IMG_CUSTOM_68
+  },
+  {
+    EL_CUSTOM_69,                              -1, -1,
+    IMG_CUSTOM_69
+  },
+  {
+    EL_CUSTOM_70,                              -1, -1,
+    IMG_CUSTOM_70
+  },
+  {
+    EL_CUSTOM_71,                              -1, -1,
+    IMG_CUSTOM_71
+  },
+  {
+    EL_CUSTOM_72,                              -1, -1,
+    IMG_CUSTOM_72
+  },
+  {
+    EL_CUSTOM_73,                              -1, -1,
+    IMG_CUSTOM_73
+  },
+  {
+    EL_CUSTOM_74,                              -1, -1,
+    IMG_CUSTOM_74
+  },
+  {
+    EL_CUSTOM_75,                              -1, -1,
+    IMG_CUSTOM_75
+  },
+  {
+    EL_CUSTOM_76,                              -1, -1,
+    IMG_CUSTOM_76
+  },
+  {
+    EL_CUSTOM_77,                              -1, -1,
+    IMG_CUSTOM_77
+  },
+  {
+    EL_CUSTOM_78,                              -1, -1,
+    IMG_CUSTOM_78
+  },
+  {
+    EL_CUSTOM_79,                              -1, -1,
+    IMG_CUSTOM_79
+  },
+  {
+    EL_CUSTOM_80,                              -1, -1,
+    IMG_CUSTOM_80
+  },
+  {
+    EL_CUSTOM_81,                              -1, -1,
+    IMG_CUSTOM_81
+  },
+  {
+    EL_CUSTOM_82,                              -1, -1,
+    IMG_CUSTOM_82
+  },
+  {
+    EL_CUSTOM_83,                              -1, -1,
+    IMG_CUSTOM_83
+  },
+  {
+    EL_CUSTOM_84,                              -1, -1,
+    IMG_CUSTOM_84
+  },
+  {
+    EL_CUSTOM_85,                              -1, -1,
+    IMG_CUSTOM_85
+  },
+  {
+    EL_CUSTOM_86,                              -1, -1,
+    IMG_CUSTOM_86
+  },
+  {
+    EL_CUSTOM_87,                              -1, -1,
+    IMG_CUSTOM_87
+  },
+  {
+    EL_CUSTOM_88,                              -1, -1,
+    IMG_CUSTOM_88
+  },
+  {
+    EL_CUSTOM_89,                              -1, -1,
+    IMG_CUSTOM_89
+  },
+  {
+    EL_CUSTOM_90,                              -1, -1,
+    IMG_CUSTOM_90
+  },
+  {
+    EL_CUSTOM_91,                              -1, -1,
+    IMG_CUSTOM_91
+  },
+  {
+    EL_CUSTOM_92,                              -1, -1,
+    IMG_CUSTOM_92
+  },
+  {
+    EL_CUSTOM_93,                              -1, -1,
+    IMG_CUSTOM_93
+  },
+  {
+    EL_CUSTOM_94,                              -1, -1,
+    IMG_CUSTOM_94
+  },
+  {
+    EL_CUSTOM_95,                              -1, -1,
+    IMG_CUSTOM_95
+  },
+  {
+    EL_CUSTOM_96,                              -1, -1,
+    IMG_CUSTOM_96
+  },
+  {
+    EL_CUSTOM_97,                              -1, -1,
+    IMG_CUSTOM_97
+  },
+  {
+    EL_CUSTOM_98,                              -1, -1,
+    IMG_CUSTOM_98
+  },
+  {
+    EL_CUSTOM_99,                              -1, -1,
+    IMG_CUSTOM_99
+  },
+  {
+    EL_CUSTOM_100,                             -1, -1,
+    IMG_CUSTOM_100
+  },
+  {
+    EL_CUSTOM_101,                             -1, -1,
+    IMG_CUSTOM_101
+  },
+  {
+    EL_CUSTOM_102,                             -1, -1,
+    IMG_CUSTOM_102
+  },
+  {
+    EL_CUSTOM_103,                             -1, -1,
+    IMG_CUSTOM_103
+  },
+  {
+    EL_CUSTOM_104,                             -1, -1,
+    IMG_CUSTOM_104
+  },
+  {
+    EL_CUSTOM_105,                             -1, -1,
+    IMG_CUSTOM_105
+  },
+  {
+    EL_CUSTOM_106,                             -1, -1,
+    IMG_CUSTOM_106
+  },
+  {
+    EL_CUSTOM_107,                             -1, -1,
+    IMG_CUSTOM_107
+  },
+  {
+    EL_CUSTOM_108,                             -1, -1,
+    IMG_CUSTOM_108
+  },
+  {
+    EL_CUSTOM_109,                             -1, -1,
+    IMG_CUSTOM_109
+  },
+  {
+    EL_CUSTOM_110,                             -1, -1,
+    IMG_CUSTOM_110
+  },
+  {
+    EL_CUSTOM_111,                             -1, -1,
+    IMG_CUSTOM_111
+  },
+  {
+    EL_CUSTOM_112,                             -1, -1,
+    IMG_CUSTOM_112
+  },
+  {
+    EL_CUSTOM_113,                             -1, -1,
+    IMG_CUSTOM_113
+  },
+  {
+    EL_CUSTOM_114,                             -1, -1,
+    IMG_CUSTOM_114
+  },
+  {
+    EL_CUSTOM_115,                             -1, -1,
+    IMG_CUSTOM_115
+  },
+  {
+    EL_CUSTOM_116,                             -1, -1,
+    IMG_CUSTOM_116
+  },
+  {
+    EL_CUSTOM_117,                             -1, -1,
+    IMG_CUSTOM_117
+  },
+  {
+    EL_CUSTOM_118,                             -1, -1,
+    IMG_CUSTOM_118
+  },
+  {
+    EL_CUSTOM_119,                             -1, -1,
+    IMG_CUSTOM_119
+  },
+  {
+    EL_CUSTOM_120,                             -1, -1,
+    IMG_CUSTOM_120
+  },
+  {
+    EL_CUSTOM_121,                             -1, -1,
+    IMG_CUSTOM_121
+  },
+  {
+    EL_CUSTOM_122,                             -1, -1,
+    IMG_CUSTOM_122
+  },
+  {
+    EL_CUSTOM_123,                             -1, -1,
+    IMG_CUSTOM_123
+  },
+  {
+    EL_CUSTOM_124,                             -1, -1,
+    IMG_CUSTOM_124
+  },
+  {
+    EL_CUSTOM_125,                             -1, -1,
+    IMG_CUSTOM_125
+  },
+  {
+    EL_CUSTOM_126,                             -1, -1,
+    IMG_CUSTOM_126
+  },
+  {
+    EL_CUSTOM_127,                             -1, -1,
+    IMG_CUSTOM_127
+  },
+  {
+    EL_CUSTOM_128,                             -1, -1,
+    IMG_CUSTOM_128
+  },
   {
     -1,                                                -1, -1,
     -1
index 07d88bf12a899262151c5928b9728110b9237c1a..14bfe6709e8d43d4b0739f64dcbb54068825d2bf 100644 (file)
@@ -1 +1 @@
-#define COMPILE_DATE_STRING "[2003-02-08 11:56]"
+#define COMPILE_DATE_STRING "[2003-02-08 17:50]"
index 31214f1da257086616a35471483ed5c682833f01..5a97a827c04b233c654bc8febe8f56caa9ebd07c 100644 (file)
 #include "conf_esg.c"  /* include auto-generated data structure definitions */
 
 
-static char *image_filename[NUM_PICTURES] =
-{
-#if 0
-  "RocksScreen.pcx",
-  "RocksDoor.pcx",
-  "RocksToons.pcx",
-  "RocksFontBig.pcx",
-  "RocksFontSmall.pcx",
-  "RocksFontMedium.pcx",
-  "RocksFontEM.pcx"
-#else
-  "RocksScreen.pcx",
-  "RocksElements.pcx",
-  "RocksDoor.pcx",
-  "RocksHeroes.pcx",
-  "RocksToons.pcx",
-  "RocksSP.pcx",
-  "RocksDC.pcx",
-  "RocksMore.pcx",
-  "RocksFontBig.pcx",
-  "RocksFontSmall.pcx",
-  "RocksFontMedium.pcx",
-  "RocksFontEM.pcx"
-#endif
-}; 
-
 static Bitmap *bitmap_font_initial = NULL;
 
 static void InitGlobal();
@@ -477,9 +451,17 @@ void FreeTileClipmasks()
 
 void InitGfx()
 {
-#if 0
+  char *config_token_font_initial = "font.small";
+  char *filename_font_initial = NULL;
   int i;
-#endif
+
+  /* determine filename for initial font (for displaying startup messages) */
+  for (i=0; image_config[i].token != NULL; i++)
+    if (strcmp(image_config[i].token, config_token_font_initial) == 0)
+      filename_font_initial = image_config[i].value;
+
+  if (filename_font_initial == NULL)   /* should not happen */
+    Error(ERR_EXIT, "cannot get filename for '%s'", config_token_font_initial);
 
   /* initialize screen properties */
   InitGfxFieldInfo(SX, SY, SXSIZE, SYSIZE,
@@ -492,40 +474,15 @@ void InitGfx()
   bitmap_db_field = CreateBitmap(FXSIZE, FYSIZE, DEFAULT_DEPTH);
   bitmap_db_door  = CreateBitmap(3 * DXSIZE, DYSIZE + VYSIZE, DEFAULT_DEPTH);
 
-#if 0
-  pix[PIX_FONT_SMALL] = LoadCustomImage(image_filename[PIX_FONT_SMALL]);
-
-  InitFontInfo(NULL, NULL, pix[PIX_FONT_SMALL], NULL);
-#else
-  bitmap_font_initial = LoadCustomImage(image_filename[PIX_FONT_SMALL]);
+  bitmap_font_initial = LoadCustomImage(filename_font_initial);
 
   InitFontInfo(bitmap_font_initial, NULL, NULL, NULL, NULL);
-#endif
 
   DrawInitText(WINDOW_TITLE_STRING, 20, FC_YELLOW);
   DrawInitText(WINDOW_SUBTITLE_STRING, 50, FC_RED);
 
   DrawInitText("Loading graphics:", 120, FC_GREEN);
 
-#if 0
-  for (i=0; i<NUM_PICTURES; i++)
-  {
-#if 0
-    if (i != PIX_FONT_SMALL)
-#endif
-    {
-      DrawInitText(image_filename[i], 150, FC_YELLOW);
-
-      pix[i] = LoadCustomImage(image_filename[i]);
-    }
-  }
-#endif
-
-#if 0
-  InitFontInfo(pix[PIX_FONT_BIG], pix[PIX_FONT_MEDIUM], pix[PIX_FONT_SMALL],
-              pix[PIX_FONT_EM]);
-#endif
-
   InitTileClipmasks();
 }
 
@@ -752,6 +709,7 @@ void InitElementGraphicInfo()
     }
   }
 
+#if 0
   for (i=EL_CHAR_START; i<=EL_CHAR_END; i++)
     element_info[i].graphic[ACTION_DEFAULT] =
       IMG_CHAR_START + (i - EL_CHAR_START);
@@ -759,6 +717,7 @@ void InitElementGraphicInfo()
   for (i=EL_CUSTOM_START; i<=EL_CUSTOM_END; i++)
     element_info[i].graphic[ACTION_DEFAULT] =
       IMG_CUSTOM_START + (i - EL_CUSTOM_START);
+#endif
 
   /* initialize normal element/graphic mapping from static configuration */
   for (i=0; element_to_graphic[i].element > -1; i++)
@@ -901,11 +860,18 @@ static void InitElementSoundInfo()
   /* soon to come */
 }
 
-static void set_graphic_parameters(int graphic, int *parameter)
+static void set_graphic_parameters(int graphic, char **parameter_raw)
 {
   Bitmap *src_bitmap = getBitmapFromImageID(graphic);
   int num_xtiles = (src_bitmap ? src_bitmap->width          : TILEX) / TILEX;
   int num_ytiles = (src_bitmap ? src_bitmap->height * 2 / 3 : TILEY) / TILEY;
+  int parameter[NUM_GFX_ARGS];
+  int i;
+
+  /* get integer values from string parameters */
+  for (i=0; i < NUM_GFX_ARGS; i++)
+    parameter[i] =
+      get_parameter_value(image_config_suffix[i].type, parameter_raw[i]);
 
   graphic_info[graphic].bitmap = src_bitmap;
 
@@ -1151,8 +1117,16 @@ static void InitGraphicInfo()
   clipmasks_initialized = TRUE;
 }
 
-static void set_sound_parameters(int sound, int *parameter)
+static void set_sound_parameters(int sound, char **parameter_raw)
 {
+  int parameter[NUM_SND_ARGS];
+  int i;
+
+  /* get integer values from string parameters */
+  for (i=0; i < NUM_SND_ARGS; i++)
+    parameter[i] =
+      get_parameter_value(sound_config_suffix[i].type, parameter_raw[i]);
+
   /* explicit loop mode setting in configuration overrides default value */
   if (parameter[SND_ARG_MODE_LOOP] != ARG_UNDEFINED_VALUE)
     sound_info[sound].loop = parameter[SND_ARG_MODE_LOOP];
index c77924c93fc59ec3b15b94fd7d98e831d5ee4dd4..d6e3013ce4be6aff07941727e99d65177342e740 100644 (file)
@@ -908,10 +908,6 @@ void CreateImageWithSmallImages(int pos)
   if (img_info == NULL || img_info->contains_small_images)
     return;
 
-#if 0
-  printf("    creating small image for '%s'\n", img_info->source_filename);
-#endif
-
   CreateBitmapWithSmallBitmaps(img_info->bitmap);
 
   img_info->contains_small_images = TRUE;
index 75fd4434af7eec24766de59fc2995b059db49c74..3e3f5b7164983b24de30c8e0c7f5eb411be6628d 100644 (file)
@@ -475,6 +475,14 @@ char *getStringToLower(char *s)
   return s_copy;
 }
 
+void setString(char **old_value, char *new_value)
+{
+  if (*old_value != NULL)
+    free(*old_value);
+
+  *old_value = getStringCopy(new_value);
+}
+
 
 /* ------------------------------------------------------------------------- */
 /* command line option handling functions                                    */
@@ -1499,17 +1507,17 @@ boolean FileIsArtworkType(char *basename, int type)
 /* functions for loading artwork configuration information                   */
 /* ------------------------------------------------------------------------- */
 
-static void FreeCustomArtworkList(struct ArtworkListInfo *,
-                                 struct ListNodeInfo ***, int *);
-
-static int get_parameter_value(int type, char *value)
+int get_parameter_value(int type, char *value)
 {
   return (strcmp(value, ARG_UNDEFINED) == 0 ? ARG_UNDEFINED_VALUE :
          type == TYPE_INTEGER ? get_integer_from_string(value) :
          type == TYPE_BOOLEAN ? get_boolean_from_string(value) :
-         -1);
+         ARG_UNDEFINED_VALUE);
 }
 
+static void FreeCustomArtworkList(struct ArtworkListInfo *,
+                                 struct ListNodeInfo ***, int *);
+
 struct FileInfo *getFileListFromConfigList(struct ConfigInfo *config_list,
                                           struct ConfigInfo *suffix_list,
                                           int num_file_list_entries)
@@ -1517,7 +1525,7 @@ struct FileInfo *getFileListFromConfigList(struct ConfigInfo *config_list,
   struct FileInfo *file_list;
   int num_file_list_entries_found = 0;
   int num_suffix_list_entries = 0;
-  int list_pos = 0;
+  int list_pos;
   int i, j;
 
   file_list = checked_calloc(num_file_list_entries * sizeof(struct FileInfo));
@@ -1529,46 +1537,31 @@ struct FileInfo *getFileListFromConfigList(struct ConfigInfo *config_list,
   for (i=0; i<num_file_list_entries; i++)
   {
     file_list[i].token = NULL;
+
     file_list[i].default_filename = NULL;
     file_list[i].filename = NULL;
 
     if (num_suffix_list_entries > 0)
     {
-      int parameter_array_size = num_suffix_list_entries * sizeof(int);
+      int parameter_array_size = num_suffix_list_entries * sizeof(char *);
 
       file_list[i].default_parameter = checked_calloc(parameter_array_size);
       file_list[i].parameter = checked_calloc(parameter_array_size);
 
       for (j=0; j<num_suffix_list_entries; j++)
       {
-       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;
+       setString(&file_list[i].default_parameter[j], suffix_list[j].value);
+       setString(&file_list[i].parameter[j], suffix_list[j].value);
       }
     }
   }
 
+  list_pos = 0;
   for (i=0; config_list[i].token != NULL; i++)
   {
-#if 0
-    int len_config_token;
-    int len_config_value;
-    boolean is_file_entry;
-
-    printf("%d: '%s' => '%s'\n",
-          i, config_list[i].token, config_list[i].value);
-
-    len_config_token = strlen(config_list[i].token);
-    len_config_value = strlen(config_list[i].value);
-    is_file_entry = TRUE;
-
-#else
     int len_config_token = strlen(config_list[i].token);
     int len_config_value = strlen(config_list[i].value);
     boolean is_file_entry = TRUE;
-#endif
 
     for (j=0; suffix_list[j].token != NULL; j++)
     {
@@ -1578,8 +1571,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] =
-         get_parameter_value(suffix_list[j].type, config_list[i].value);
+       setString(&file_list[list_pos].default_parameter[j],
+                 config_list[i].value);
 
        is_file_entry = FALSE;
        break;
@@ -1663,17 +1656,13 @@ static void read_token_parameters(struct SetupFileList *setup_file_list,
   char *known_token_value = KNOWN_TOKEN_VALUE;
   int i;
 
-  if (file_list_entry->filename != NULL)
-    free(file_list_entry->filename);
-
   if (filename != NULL)
   {
+    setString(&file_list_entry->filename, filename);
+
     /* when file definition found, set all parameters to default values */
     for (i=0; suffix_list[i].token != NULL; i++)
-      file_list_entry->parameter[i] =
-       get_parameter_value(suffix_list[i].type, suffix_list[i].value);
-
-    file_list_entry->filename = getStringCopy(filename);
+      setString(&file_list_entry->parameter[i], suffix_list[i].value);
 
     file_list_entry->redefined = TRUE;
 
@@ -1681,8 +1670,7 @@ static void read_token_parameters(struct SetupFileList *setup_file_list,
     setTokenValue(setup_file_list, file_list_entry->token, known_token_value);
   }
   else
-    file_list_entry->filename =
-      getStringCopy(file_list_entry->default_filename);
+    setString(&file_list_entry->filename, file_list_entry->default_filename);
 
   /* check for config tokens that can be build by base token and suffixes */
   for (i=0; suffix_list[i].token != NULL; i++)
@@ -1692,8 +1680,7 @@ static void read_token_parameters(struct SetupFileList *setup_file_list,
 
     if (value != NULL)
     {
-      file_list_entry->parameter[i] =
-       get_parameter_value(suffix_list[i].type, value);
+      setString(&file_list_entry->parameter[i], value);
 
       /* mark config file token as well known from default config */
       setTokenValue(setup_file_list, token, known_token_value);
@@ -1711,7 +1698,7 @@ static void add_dynamic_file_list_entry(struct FileInfo **list,
                                        char *token)
 {
   struct FileInfo *new_list_entry;
-  int parameter_array_size = num_suffix_list_entries * sizeof(int);
+  int parameter_array_size = num_suffix_list_entries * sizeof(char *);
 
 #if 0
   if (IS_PARENT_PROCESS())
@@ -1778,12 +1765,10 @@ void LoadArtworkConfig(struct ArtworkListInfo *artwork_info)
   /* always start with reliable default values */
   for (i=0; i<num_file_list_entries; i++)
   {
-    if (file_list[i].filename != NULL)
-      free(file_list[i].filename);
-    file_list[i].filename = getStringCopy(file_list[i].default_filename);
+    setString(&file_list[i].filename, file_list[i].default_filename);
 
     for (j=0; j<num_suffix_list_entries; j++)
-      file_list[i].parameter[j] = file_list[i].default_parameter[j];
+      setString(&file_list[i].parameter[j], file_list[i].default_parameter[j]);
 
     file_list[i].redefined = FALSE;
   }
@@ -2391,3 +2376,20 @@ void debug_print_timestamp(int counter_nr, char *message)
 
   counter[counter_nr][1] = Counter();
 }
+
+void debug_print_parent_only(char *format, ...)
+{
+  if (!IS_PARENT_PROCESS())
+    return;
+
+  if (format)
+  {
+    va_list ap;
+
+    va_start(ap, format);
+    vprintf(format, ap);
+    va_end(ap);
+
+    printf("\n");
+  }
+}
index 21c184df59c689475e25ee45e9f2b658947a4e5d..caf1bb64542aa72bc916ce40b59382ffd4c5578d 100644 (file)
@@ -78,6 +78,7 @@ char *getPath3(char *, char *, char*);
 char *getStringCat2(char *, char *);
 char *getStringCopy(char *);
 char *getStringToLower(char *);
+void setString(char **, char *);
 
 void GetOptions(char **);
 
@@ -136,6 +137,8 @@ boolean FileIsSound(char *);
 boolean FileIsMusic(char *);
 boolean FileIsArtworkType(char *, int);
 
+int get_parameter_value(int, char *);
+
 struct FileInfo *getFileListFromConfigList(struct ConfigInfo *,
                                           struct ConfigInfo *, int);
 void LoadArtworkConfig(struct ArtworkListInfo *);
index a075e6d1ceb3cd5a9979ba45266b904ec84f563a..cb27850b8cc34adc5732f8d13203949765d6fc64 100644 (file)
@@ -880,7 +880,7 @@ Bitmap *ZoomBitmap(Bitmap *src_bitmap, int zoom_width, int zoom_height)
 
 void CreateBitmapWithSmallBitmaps(Bitmap *src_bitmap)
 {
-  Bitmap *tmp_bitmap, *tmp_bitmap_2, *tmp_bitmap_4, *tmp_bitmap_8;
+  Bitmap *tmp_bitmap, *tmp_bitmap_2, *tmp_bitmap_8;
   int src_width, src_height;
   int tmp_width, tmp_height;
 
@@ -893,19 +893,15 @@ void CreateBitmapWithSmallBitmaps(Bitmap *src_bitmap)
   tmp_bitmap = CreateBitmap(tmp_width, tmp_height, DEFAULT_DEPTH);
 
   tmp_bitmap_2 = ZoomBitmap(src_bitmap, src_width / 2, src_height / 2);
-  tmp_bitmap_4 = ZoomBitmap(src_bitmap, src_width / 4, src_height / 4);
   tmp_bitmap_8 = ZoomBitmap(src_bitmap, src_width / 8, src_height / 8);
 
   BlitBitmap(src_bitmap, tmp_bitmap, 0, 0, src_width, src_height, 0, 0);
   BlitBitmap(tmp_bitmap_2, tmp_bitmap, 0, 0, src_width / 2, src_height / 2,
             0, src_height);
-  BlitBitmap(tmp_bitmap_4, tmp_bitmap, 0, 0, src_width / 4, src_height / 4,
-            src_width / 2, src_height);
   BlitBitmap(tmp_bitmap_8, tmp_bitmap, 0, 0, src_width / 8, src_height / 8,
             3 * src_width / 4, src_height);
 
   FreeBitmap(tmp_bitmap_2);
-  FreeBitmap(tmp_bitmap_4);
   FreeBitmap(tmp_bitmap_8);
 
 #ifdef TARGET_SDL
index 2db287abd627147fa960ee94756e1c7817e6405a..532f079a5ca09a477cadf3955203e22696f7a8f0 100644 (file)
@@ -500,8 +500,8 @@ struct FileInfo
   char *default_filename;
   char *filename;
 
-  int *default_parameter;                      /* array of file parameters */
-  int *parameter;                              /* array of file parameters */
+  char **default_parameter;                    /* array of file parameters */
+  char **parameter;                            /* array of file parameters */
 
   boolean redefined;
 };
index f4c5cc3920b0de4ce72e7cb0a396fd5d5f5548da..12d5ea2398ec471420627234ed5e6f1a1c0f4c1c 100644 (file)
@@ -27,8 +27,8 @@
 
 #include "libgame/libgame.h"
 
-#include "conf_gfx.h"
-#include "conf_snd.h"
+#include "conf_gfx.h"  /* include auto-generated data structure definitions */
+#include "conf_snd.h"  /* include auto-generated data structure definitions */
 
 #define IMG_UNDEFINED          (-1)
 #define IMG_EMPTY              IMG_EMPTY_SPACE
 #define EL_CHAR_START                  120
 #define EL_CHAR_ASCII0                 (EL_CHAR_START  - 32)
 #define EL_CHAR_ASCII0_START           (EL_CHAR_ASCII0 + 32)
-#define EL_CHAR_EXCLAM                 (EL_CHAR_ASCII0 + 33)
-#define EL_CHAR_QUOTEDBL               (EL_CHAR_ASCII0 + 34)
-#define EL_CHAR_NUMBERSIGN             (EL_CHAR_ASCII0 + 35)
-#define EL_CHAR_DOLLAR                 (EL_CHAR_ASCII0 + 36)
-#define EL_CHAR_PROCENT                        (EL_CHAR_ASCII0 + 37)
-#define EL_CHAR_AMPERSAND              (EL_CHAR_ASCII0 + 38)
-#define EL_CHAR_APOSTROPHE             (EL_CHAR_ASCII0 + 39)
-#define EL_CHAR_PARENLEFT              (EL_CHAR_ASCII0 + 40)
-#define EL_CHAR_PARENRIGHT             (EL_CHAR_ASCII0 + 41)
-#define EL_CHAR_ASTERISK               (EL_CHAR_ASCII0 + 42)
-#define EL_CHAR_PLUS                   (EL_CHAR_ASCII0 + 43)
-#define EL_CHAR_COMMA                  (EL_CHAR_ASCII0 + 44)
-#define EL_CHAR_MINUS                  (EL_CHAR_ASCII0 + 45)
-#define EL_CHAR_PERIOD                 (EL_CHAR_ASCII0 + 46)
-#define EL_CHAR_SLASH                  (EL_CHAR_ASCII0 + 47)
-#define EL_CHAR_0                      (EL_CHAR_ASCII0 + 48)
-#define EL_CHAR_9                      (EL_CHAR_ASCII0 + 57)
-#define EL_CHAR_COLON                  (EL_CHAR_ASCII0 + 58)
-#define EL_CHAR_SEMICOLON              (EL_CHAR_ASCII0 + 59)
-#define EL_CHAR_LESS                   (EL_CHAR_ASCII0 + 60)
-#define EL_CHAR_EQUAL                  (EL_CHAR_ASCII0 + 61)
-#define EL_CHAR_GREATER                        (EL_CHAR_ASCII0 + 62)
-#define EL_CHAR_QUESTION               (EL_CHAR_ASCII0 + 63)
-#define EL_CHAR_AT                     (EL_CHAR_ASCII0 + 64)
-#define EL_CHAR_A                      (EL_CHAR_ASCII0 + 65)
-#define EL_CHAR_Z                      (EL_CHAR_ASCII0 + 90)
-#define EL_CHAR_AE                     (EL_CHAR_ASCII0 + 91)
-#define EL_CHAR_OE                     (EL_CHAR_ASCII0 + 92)
-#define EL_CHAR_UE                     (EL_CHAR_ASCII0 + 93)
-#define EL_CHAR_COPYRIGHT              (EL_CHAR_ASCII0 + 94)
-#define EL_CHAR_UNDERSCORE             (EL_CHAR_ASCII0 + 95)
-#define EL_CHAR_EMPTY                  (EL_CHAR_ASCII0 + 96)
-#define EL_CHAR_DEGREE                 (EL_CHAR_ASCII0 + 97)
-#define EL_CHAR_TM                     (EL_CHAR_ASCII0 + 98)
-#define EL_CHAR_CURSOR                 (EL_CHAR_ASCII0 + 99)
+
+#include "conf_chr.h"  /* include auto-generated data structure definitions */
+
 #define EL_CHAR_ASCII0_END             (EL_CHAR_ASCII0 + 111)
 #define EL_CHAR_END                    (EL_CHAR_START  + 79)
 
 #define EL_UNUSED_359                  359
 
 #define EL_CUSTOM_START                        360
-#define EL_CUSTOM_1                    (EL_CUSTOM_START + 0)
-#define EL_CUSTOM_128                  (EL_CUSTOM_START + 127)
+
+#include "conf_cus.h"  /* include auto-generated data structure definitions */
+
 #define EL_CUSTOM_END                  (EL_CUSTOM_START + 127)
 
 #define NUM_CUSTOM_ELEMENTS            128
index e6f0753e4914aecfa85760c32b675388f93a0944..b20e04cb85ef05904d15107494bb2b9f59a54ce9 100644 (file)
@@ -959,16 +959,22 @@ void getMiniGraphicSource(int graphic, Bitmap **bitmap, int *x, int *y)
   int src_x = mini_startx + graphic_info[graphic].src_x / 2;
   int src_y = mini_starty + graphic_info[graphic].src_y / 2;
 
+#if 0
+  /* !!! not needed anymore, because of automatically created mini graphics */
   if (src_x + MINI_TILEX > src_bitmap->width ||
       src_y + MINI_TILEY > src_bitmap->height)
   {
     /* graphic of desired size seems not to be contained in this image;
        dirty workaround: get it from the middle of the normal sized image */
 
+    printf("::: using dirty workaround for %d (%d, %d)\n",
+          graphic, src_bitmap->width, src_bitmap->height);
+
     getGraphicSource(graphic, 0, &src_bitmap, &src_x, &src_y);
     src_x += (TILEX / 2 - MINI_TILEX / 2);
     src_y += (TILEY / 2 - MINI_TILEY / 2);
   }
+#endif
 
   *bitmap = src_bitmap;
   *x = src_x;