rnd-20040822-4-src
authorHolger Schemel <info@artsoft.org>
Sun, 22 Aug 2004 18:34:19 +0000 (20:34 +0200)
committerHolger Schemel <info@artsoft.org>
Sat, 30 Aug 2014 08:47:54 +0000 (10:47 +0200)
12 files changed:
src/conf_gfx.c
src/conf_gfx.h
src/conftime.h
src/game_em/display.h
src/game_em/game_em.h
src/game_em/global.h
src/game_em/graphics.c
src/game_em/init.c
src/game_em/sound.c
src/game_em/ulaw_generate.c
src/init.c
src/main.h

index 5e5e998c845256443718becc8759e2b1dd569dc5..18986c779c0644f78a08b2c7441a599c9522b08a 100644 (file)
@@ -52,6 +52,7 @@ struct ConfigTypeInfo image_config_suffix[] =
   { ".post_delay_fixed",               ARG_UNDEFINED,  TYPE_INTEGER    },
   { ".post_delay_random",              ARG_UNDEFINED,  TYPE_INTEGER    },
   { ".name",                           ARG_UNDEFINED,  TYPE_STRING     },
+  { ".scale_up",                       ARG_UNDEFINED,  TYPE_INTEGER    },
 
   { NULL,                              NULL,           0               }
 };
@@ -3768,6 +3769,13 @@ struct ConfigInfo image_config[] =
   { "background.SETUP",                                UNDEFINED_FILENAME      },
   { "background.DOOR",                         UNDEFINED_FILENAME      },
 
+  /* !!! TEMPORARILY STORED HERE -- PROBABLY TO BE CHANGED !!! */
+
+  { "emc_object",                              "emc_object.pcx"        },
+  { "emc_score",                               "emc_score.pcx"         },
+  { "emc_sprite",                              "emc_sprite.pcx"        },
+  { "emc_title",                               "emc_title.pcx"         },
+
   /* the following directives are not associated with an image, but
      probably make sense to be defined in "graphicsinfo.conf", too */
 
index 697d8fbea657ed93f5c7cb38c4cad7c953e3c084..c21fcc0009386b61f292deb26b34007842a0d07c 100644 (file)
 #define IMG_BACKGROUND_INFO_ELEMENTS                   1399
 #define IMG_BACKGROUND_SETUP                           1400
 #define IMG_BACKGROUND_DOOR                            1401
+#define IMG_EMC_OBJECT                                 1402
+#define IMG_EMC_SCORE                                  1403
+#define IMG_EMC_SPRITE                                 1404
+#define IMG_EMC_TITLE                                  1405
 
-#define NUM_IMAGE_FILES                                        1402
+#define NUM_IMAGE_FILES                                        1406
 
 #endif /* CONF_GFX_H */
index 4f6bd76c4f1f58046f64374fd338e012e8f5bb91..44cdca2d4cce70952971c07dd67da0f17d360f98 100644 (file)
@@ -1 +1 @@
-#define COMPILE_DATE_STRING "[2004-08-22 15:51]"
+#define COMPILE_DATE_STRING "[2004-08-22 20:30]"
index b9dbb590641c4acf0f7728826b7d44c1c4f92056..0eb026a6397538ea556465de84208cfb85bbc25e 100644 (file)
@@ -6,6 +6,8 @@
 #include <X11/Xatom.h>
 #include <X11/keysym.h>
 
+#include "game_em.h"
+
 #define ORIG_TILEX             16
 #define ORIG_TILEY             16
 #define ORIG_SCOREX            8
@@ -52,8 +54,6 @@ extern Window window;
 
 #else
 
-#include "../libgame/system.h"
-
 #define xwindow (window->drawable)
 
 #endif
index 08854a1298a84c257908d8752dd2bed4b2304176..215df8e62ec33cd7276d33340ee926e79c926c5a 100644 (file)
 
 #define GAME_EM_VERSION_1_0_0
 
+
+/* ========================================================================= */
+/* functions exported from main program to game_em                           */
+/* ========================================================================= */
+
+#include "../libgame/libgame.h"
+
+extern void DrawGameDoorValues_EM(int, int, int, int);
+
+
+/* ========================================================================= */
+/* functions exported from game_em to main program                           */
+/* ========================================================================= */
+
 extern void em_open_all();
 extern void em_close_all();
 
 extern int em_main_init_game(int, char *);
 extern int em_main_handle_game(byte);
 
+
 #endif /* GAME_EM_H */
index 746fa129a4f122d88731db11a7b83d7b65321da8..0de51f50bfb4321280b9703c55eda218500feac5 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef GLOBAL_H
 #define GLOBAL_H
 
-#include "../libgame/libgame.h"
+#include "game_em.h"
 
 #define EM_GFX_DIR     "graphics.EM"
 #define EM_SND_DIR     "sounds.EM"
index d869bc88b68fc423c6f3d3de8357f948229db9c4..04c2a240f023ff6cee3e75f93c3805a07d18d233 100644 (file)
@@ -15,8 +15,6 @@
 
 #if defined(TARGET_X11)
 
-extern void DrawGameDoorValues_EM(int, int, int, int);
-
 unsigned int frame; /* current frame */
 unsigned int screen_x; /* current scroll position */
 unsigned int screen_y;
index 55b9d177a70da21f656c4020188e8626fb07a6de..061f3009ccabb6fa9533b826f97a0eadae88f12c 100644 (file)
@@ -27,8 +27,7 @@
 #include <string.h>
 #include <errno.h>
 
-#include "../libgame/platform.h"
-#include "../libgame/libgame.h"
+#include "game_em.h"
 
 #include "global.h"
 #include "display.h"
index b0bac6a3995ba3ba8cce1697092554adde3e4462..c949abb5090ead52e7b3c272fbca50331b0d6039 100644 (file)
@@ -3,7 +3,7 @@
  * handle sounds in emerald mine
  */
 
-#include "../libgame/platform.h"
+#include "game_em.h"
 
 
 #if defined(TARGET_X11)
index 8f0d7b06454c5a8452dbbdd8b7ac3167a52724c0..b094b5d1cabd6f7e898407fbc50619d1d9c13d93 100644 (file)
@@ -4,7 +4,7 @@
  * directly in emerald mine source
  */
 
-#include "../libgame/platform.h"
+#include "game_em.h"
 
 
 #if defined(TARGET_X11)
index 202488857945ad37fe0ca2ba18c407fe31bdaba1..43a5d6db37280ee62cad06e114a1d6bfefe8964f 100644 (file)
@@ -846,6 +846,7 @@ static void set_graphic_parameters(int graphic, char **parameter_raw)
   graphic_info[graphic].crumbled_like = -1;    /* do not use clone element */
   graphic_info[graphic].diggable_like = -1;    /* do not use clone element */
   graphic_info[graphic].border_size = TILEX / 8;  /* "CRUMBLED" border size */
+  graphic_info[graphic].scale_up_factor = 0;   /* default: no scaling up */
   graphic_info[graphic].anim_delay_fixed = 0;
   graphic_info[graphic].anim_delay_random = 0;
   graphic_info[graphic].post_delay_fixed = 0;
@@ -945,6 +946,10 @@ static void set_graphic_parameters(int graphic, char **parameter_raw)
   if (parameter[GFX_ARG_BORDER_SIZE] != ARG_UNDEFINED_VALUE)
     graphic_info[graphic].border_size = parameter[GFX_ARG_BORDER_SIZE];
 
+  /* optional zoom factor for scaling up the image to a larger size */
+  if (parameter[GFX_ARG_SCALE_UP] != ARG_UNDEFINED_VALUE)
+    graphic_info[graphic].scale_up_factor = parameter[GFX_ARG_SCALE_UP];
+
   /* this is only used for player "boring" and "sleeping" actions */
   if (parameter[GFX_ARG_ANIM_DELAY_FIXED] != ARG_UNDEFINED_VALUE)
     graphic_info[graphic].anim_delay_fixed =
index 1e620fb99bc83d03838c59d4f8300963b31b8fd8..6a37af869ad80e8c7d9c488bff9e101081146a33 100644 (file)
 #define GFX_ARG_POST_DELAY_FIXED               28
 #define GFX_ARG_POST_DELAY_RANDOM              29
 #define GFX_ARG_NAME                           30
+#define GFX_ARG_SCALE_UP                       31
 
-#define NUM_GFX_ARGS                           31
+#define NUM_GFX_ARGS                           32
 
 
 /* values for sound configuration suffixes */
@@ -1817,6 +1818,7 @@ struct GraphicInfo
   int crumbled_like;           /* element for cloning crumble graphics */
   int diggable_like;           /* element for cloning digging graphics */
   int border_size;             /* border size for "crumbled" graphics */
+  int scale_up_factor;         /* optional factor for scaling image up */
 
   int anim_delay_fixed;                /* optional delay values for bored and   */
   int anim_delay_random;       /* sleeping player animations (animation */