rnd-20030223-1-src
authorHolger Schemel <info@artsoft.org>
Sun, 23 Feb 2003 17:23:25 +0000 (18:23 +0100)
committerHolger Schemel <info@artsoft.org>
Sat, 30 Aug 2014 08:40:29 +0000 (10:40 +0200)
src/Makefile
src/conf_fnt.c [new file with mode: 0644]
src/conf_gfx.c
src/conf_gfx.h
src/conftime.h
src/init.c
src/main.h
src/tools.c

index c994eaa93e59cc78ccbdb4d23bf1aa8109974825..eb74406aa0d94f97cbf62626dfe7b8d0a5424aa9 100644 (file)
@@ -161,7 +161,8 @@ CNFS =      conf_gfx.h      \
        conf_cus.c      \
        conf_cus.h      \
        conf_e2g.c      \
-       conf_esg.c
+       conf_esg.c      \
+       conf_fnt.c
 
 CNFS_CMD = ../Scripts/create_element_defs.pl
 
diff --git a/src/conf_fnt.c b/src/conf_fnt.c
new file mode 100644 (file)
index 0000000..d94f047
--- /dev/null
@@ -0,0 +1,116 @@
+/***********************************************************
+* 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_fnt.c                                               *
+***********************************************************/
+
+/* ----- this file was automatically generated -- do not edit by hand ----- */
+
+#ifndef CONF_FNT_C
+#define CONF_FNT_C
+
+/* values for font/graphics mapping configuration */
+
+static struct
+{
+    int font_nr;
+    int special;
+
+    int graphic;
+}
+font_to_graphic[] =
+{
+  {
+    FONT_INITIAL_1,                            -1,
+    IMG_FONT_INITIAL_1
+  },
+  {
+    FONT_INITIAL_2,                            -1,
+    IMG_FONT_INITIAL_2
+  },
+  {
+    FONT_INITIAL_3,                            -1,
+    IMG_FONT_INITIAL_3
+  },
+  {
+    FONT_INITIAL_4,                            -1,
+    IMG_FONT_INITIAL_4
+  },
+  {
+    FONT_BIG_1,                                        -1,
+    IMG_FONT_BIG_1
+  },
+  {
+    FONT_BIG_2,                                        -1,
+    IMG_FONT_BIG_2
+  },
+  {
+    FONT_BIG_3,                                        -1,
+    IMG_FONT_BIG_3
+  },
+  {
+    FONT_BIG_4,                                        -1,
+    IMG_FONT_BIG_4
+  },
+  {
+    FONT_MEDIUM_1,                             -1,
+    IMG_FONT_MEDIUM_1
+  },
+  {
+    FONT_MEDIUM_2,                             -1,
+    IMG_FONT_MEDIUM_2
+  },
+  {
+    FONT_MEDIUM_3,                             -1,
+    IMG_FONT_MEDIUM_3
+  },
+  {
+    FONT_MEDIUM_4,                             -1,
+    IMG_FONT_MEDIUM_4
+  },
+  {
+    FONT_SMALL_1,                              -1,
+    IMG_FONT_SMALL_1
+  },
+  {
+    FONT_SMALL_2,                              -1,
+    IMG_FONT_SMALL_2
+  },
+  {
+    FONT_SMALL_3,                              -1,
+    IMG_FONT_SMALL_3
+  },
+  {
+    FONT_SMALL_4,                              -1,
+    IMG_FONT_SMALL_4
+  },
+  {
+    FONT_SMALL_3,                              GFX_SPECIAL_ARG_EDITOR,
+    IMG_FONT_SMALL_3
+  },
+  {
+    FONT_TAPE,                                 -1,
+    IMG_FONT_TAPE
+  },
+  {
+    FONT_GAME,                                 -1,
+    IMG_FONT_GAME
+  },
+  {
+    FONT_NARROW,                               -1,
+    IMG_FONT_NARROW
+  },
+  {
+    -1,                                                -1,
+    -1
+  },
+};
+
+#endif /* CONF_FNT_C */
index d73f922a3bb44f38080aa7ff671b5e42a2df032f..58cd51b690a9202ea1c606003c8f3738755c44b5 100644 (file)
@@ -2984,6 +2984,12 @@ struct ConfigInfo image_config[] =
   { "font.small_4.width",                      "14"                    },
   { "font.small_4.height",                     "14"                    },
 
+  { "font.small_3.EDITOR",                     "RocksFontSmall.pcx"    },
+  { "font.small_3.EDITOR.x",                   "0"                     },
+  { "font.small_3.EDITOR.y",                   "0"                     },
+  { "font.small_3.EDITOR.width",               "14"                    },
+  { "font.small_3.EDITOR.height",              "14"                    },
+
   { "font.tape",                               "RocksFontSmall.pcx"    },
   { "font.tape.x",                             "0"                     },
   { "font.tape.y",                             "224"                   },
index 7341822655b9b8dc2faec168b66e431cf7d54435..de87a85d176fe83e445b4037b2b7af6dda681dae 100644 (file)
 #define IMG_FONT_SMALL_2                               799
 #define IMG_FONT_SMALL_3                               800
 #define IMG_FONT_SMALL_4                               801
-#define IMG_FONT_TAPE                                  802
-#define IMG_FONT_GAME                                  803
-#define IMG_FONT_NARROW                                        804
-#define IMG_GLOBAL_BORDER                              805
-#define IMG_GLOBAL_DOOR                                        806
-#define IMG_BACKGROUND                                 807
-#define IMG_BACKGROUND_MAIN                            808
-#define IMG_BACKGROUND_LEVELS                          809
-#define IMG_BACKGROUND_SCORES                          810
-#define IMG_BACKGROUND_EDITOR                          811
-#define IMG_BACKGROUND_INFO                            812
-#define IMG_BACKGROUND_SETUP                           813
-#define IMG_BACKGROUND_DOOR                            814
-#define IMG_INFO_FONT_EM_1                             815
-#define IMG_INFO_FONT_EM_2                             816
-#define IMG_INFO_FONT_EM_3                             817
-#define IMG_INFO_FONT_EM_4                             818
-#define IMG_INFO_FONT_EM_5                             819
+#define IMG_FONT_SMALL_3_EDITOR                                802
+#define IMG_FONT_TAPE                                  803
+#define IMG_FONT_GAME                                  804
+#define IMG_FONT_NARROW                                        805
+#define IMG_GLOBAL_BORDER                              806
+#define IMG_GLOBAL_DOOR                                        807
+#define IMG_BACKGROUND                                 808
+#define IMG_BACKGROUND_MAIN                            809
+#define IMG_BACKGROUND_LEVELS                          810
+#define IMG_BACKGROUND_SCORES                          811
+#define IMG_BACKGROUND_EDITOR                          812
+#define IMG_BACKGROUND_INFO                            813
+#define IMG_BACKGROUND_SETUP                           814
+#define IMG_BACKGROUND_DOOR                            815
+#define IMG_INFO_FONT_EM_1                             816
+#define IMG_INFO_FONT_EM_2                             817
+#define IMG_INFO_FONT_EM_3                             818
+#define IMG_INFO_FONT_EM_4                             819
+#define IMG_INFO_FONT_EM_5                             820
 
-#define NUM_IMAGE_FILES                                        820
+#define NUM_IMAGE_FILES                                        821
 
 #endif /* CONF_GFX_H */
index 7cbb301838a1640f0c9416a27fe37bc1e5c69643..b43417983a0c110048e6ce1d80675bd330924ff4 100644 (file)
@@ -1 +1 @@
-#define COMPILE_DATE_STRING "[2003-02-22 18:44]"
+#define COMPILE_DATE_STRING "[2003-02-23 18:14]"
index b6eaa561e4c7fb49eac287cf498925eb56dcffa0..73f9274f35ae3e305be46718b5939ebd8da2b97c 100644 (file)
@@ -880,14 +880,13 @@ void InitElementSpecialGraphicInfo()
 {
   struct PropertyMapping *property_mapping = getImageListPropertyMapping();
   int num_property_mappings = getImageListPropertyMappingSize();
-  int i;
+  int i, j;
 
   /* always start with reliable default values */
-  for (i=0; i<MAX_NUM_ELEMENTS; i++)
-  {
-    element_info[i].editor_graphic = element_info[i].graphic[ACTION_DEFAULT];
-    element_info[i].preview_graphic = element_info[i].graphic[ACTION_DEFAULT];
-  }
+  for (i=0; i < MAX_NUM_ELEMENTS; i++)
+    for (j=0; j < NUM_SPECIAL_GFX_ARGS; j++)
+      element_info[i].special_graphic[j] =
+       element_info[i].graphic[ACTION_DEFAULT];
 
   /* initialize special element/graphic mapping from static configuration */
   for (i=0; element_to_special_graphic[i].element > -1; i++)
@@ -901,10 +900,7 @@ void InitElementSpecialGraphicInfo()
     if (base_redefined && !special_redefined)
       continue;
 
-    if (special == GFX_SPECIAL_ARG_EDITOR)
-      element_info[element].editor_graphic = graphic;
-    else if (special == GFX_SPECIAL_ARG_PREVIEW)
-      element_info[element].preview_graphic = graphic;
+    element_info[element].special_graphic[special] = graphic;
   }
 
   /* initialize special element/graphic mapping from dynamic configuration */
@@ -914,10 +910,8 @@ void InitElementSpecialGraphicInfo()
     int special = property_mapping[i].ext3_index;
     int graphic = property_mapping[i].artwork_index;
 
-    if (special == GFX_SPECIAL_ARG_EDITOR)
-      element_info[element].editor_graphic = graphic;
-    else if (special == GFX_SPECIAL_ARG_PREVIEW)
-      element_info[element].preview_graphic = graphic;
+    if (special >= 0 && special < NUM_SPECIAL_GFX_ARGS)
+      element_info[element].special_graphic[special] = graphic;
   }
 }
 
index b81abcb12d261e95b7a0e62c6e2a2877a98f9520..a82e054f782bf6dde7cabe2b0532cd4b88506a79 100644 (file)
 
 /* values for font configuration */
 
+#define FONT_INITIAL_1                         0
+#define FONT_INITIAL_2                         1
+#define FONT_INITIAL_3                         2
+#define FONT_INITIAL_4                         3
+#define FONT_BIG_1                             4
+#define FONT_BIG_2                             5
+#define FONT_BIG_3                             6
+#define FONT_BIG_4                             7
+#define FONT_MEDIUM_1                          8
+#define FONT_MEDIUM_2                          9
+#define FONT_MEDIUM_3                          10
+#define FONT_MEDIUM_4                          11
+#define FONT_SMALL_1                           12
+#define FONT_SMALL_2                           13
+#define FONT_SMALL_3                           14
+#define FONT_SMALL_4                           15
+#define FONT_TAPE                              16
+#define FONT_GAME                              17
+#define FONT_NARROW                            18
+
+#define NUM_FONTS                              19
+#define NUM_INITIAL_FONTS                      4
+
 #define FIRST_IMG_FONT                         IMG_FONT_INITIAL_1
 #define LAST_IMG_FONT                          IMG_FONT_NARROW
 
 #define NUM_IMG_FONTS                          (LAST_IMG_FONT - \
                                                 FIRST_IMG_FONT + 1)
-#define NUM_INITIAL_FONTS                      4
 
 
 /* values for game_status */
@@ -1033,9 +1055,13 @@ struct ElementInfo
   char *custom_description;    /* custom description for level editor */
 
   int graphic[NUM_ACTIONS];    /* default graphics for several actions */
+
                                /* special graphics for left/right/up/down */
   int direction_graphic[NUM_ACTIONS][NUM_DIRECTIONS];
 
+                               /* special graphics for certain screens */
+  int special_graphic[NUM_SPECIAL_GFX_ARGS];
+
   int editor_graphic;          /* graphic displayed in level editor */
   int preview_graphic;         /* graphic displayed in level preview */
 
index 4f9d50fb440ed53796032cdcf2890d847ee954ba..fd263d1e1f38646a03a057e1f459d256c15b1b00 100644 (file)
@@ -2376,10 +2376,10 @@ int el2img(int element)
 
 int el2edimg(int element)
 {
-  return element_info[element].editor_graphic;
+  return element_info[element].special_graphic[GFX_SPECIAL_ARG_EDITOR];
 }
 
 int el2preimg(int element)
 {
-  return element_info[element].preview_graphic;
+  return element_info[element].special_graphic[GFX_SPECIAL_ARG_PREVIEW];
 }