From: Holger Schemel Date: Sun, 22 Aug 2004 18:34:19 +0000 (+0200) Subject: rnd-20040822-4-src X-Git-Tag: 3.1.1^2~69 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=4a8314a1bba69c0ca6ea33bd11d7e4cf9aa0f65d;p=rocksndiamonds.git rnd-20040822-4-src --- diff --git a/src/conf_gfx.c b/src/conf_gfx.c index 5e5e998c..18986c77 100644 --- a/src/conf_gfx.c +++ b/src/conf_gfx.c @@ -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 */ diff --git a/src/conf_gfx.h b/src/conf_gfx.h index 697d8fbe..c21fcc00 100644 --- a/src/conf_gfx.h +++ b/src/conf_gfx.h @@ -1420,7 +1420,11 @@ #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 */ diff --git a/src/conftime.h b/src/conftime.h index 4f6bd76c..44cdca2d 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "[2004-08-22 15:51]" +#define COMPILE_DATE_STRING "[2004-08-22 20:30]" diff --git a/src/game_em/display.h b/src/game_em/display.h index b9dbb590..0eb026a6 100644 --- a/src/game_em/display.h +++ b/src/game_em/display.h @@ -6,6 +6,8 @@ #include #include +#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 diff --git a/src/game_em/game_em.h b/src/game_em/game_em.h index 08854a12..215df8e6 100644 --- a/src/game_em/game_em.h +++ b/src/game_em/game_em.h @@ -16,10 +16,25 @@ #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 */ diff --git a/src/game_em/global.h b/src/game_em/global.h index 746fa129..0de51f50 100644 --- a/src/game_em/global.h +++ b/src/game_em/global.h @@ -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" diff --git a/src/game_em/graphics.c b/src/game_em/graphics.c index d869bc88..04c2a240 100644 --- a/src/game_em/graphics.c +++ b/src/game_em/graphics.c @@ -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; diff --git a/src/game_em/init.c b/src/game_em/init.c index 55b9d177..061f3009 100644 --- a/src/game_em/init.c +++ b/src/game_em/init.c @@ -27,8 +27,7 @@ #include #include -#include "../libgame/platform.h" -#include "../libgame/libgame.h" +#include "game_em.h" #include "global.h" #include "display.h" diff --git a/src/game_em/sound.c b/src/game_em/sound.c index b0bac6a3..c949abb5 100644 --- a/src/game_em/sound.c +++ b/src/game_em/sound.c @@ -3,7 +3,7 @@ * handle sounds in emerald mine */ -#include "../libgame/platform.h" +#include "game_em.h" #if defined(TARGET_X11) diff --git a/src/game_em/ulaw_generate.c b/src/game_em/ulaw_generate.c index 8f0d7b06..b094b5d1 100644 --- a/src/game_em/ulaw_generate.c +++ b/src/game_em/ulaw_generate.c @@ -4,7 +4,7 @@ * directly in emerald mine source */ -#include "../libgame/platform.h" +#include "game_em.h" #if defined(TARGET_X11) diff --git a/src/init.c b/src/init.c index 20248885..43a5d6db 100644 --- a/src/init.c +++ b/src/init.c @@ -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 = diff --git a/src/main.h b/src/main.h index 1e620fb9..6a37af86 100644 --- a/src/main.h +++ b/src/main.h @@ -1186,8 +1186,9 @@ #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 */