From 90bf2712051fd9dd255f3269891daec81f746566 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Wed, 23 Jun 2010 13:42:13 +0200 Subject: [PATCH] rnd-20100623-3-src * moved some editor graphics from "RocksDoor.pcx" to "RocksMore.pcx" (to prevent compatibility mapping of these newer graphics to older (custom) versions of "RocksDoor.pcx" which did not contain them yet) --- ChangeLog | 3 +++ src/conf_gfx.c | 24 ++++++++++++------------ src/conftime.h | 2 +- src/game.c | 4 ++++ src/main.c | 4 ++++ src/main.h | 6 ++++++ src/tools.c | 11 +++++++++++ 7 files changed, 41 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index 21e04223..c500d17a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,9 @@ 2010-06-23 * added graphics performance optimization to native Supaplex game engine * fixed bug with accidentally removing preceding buffer in SP engine + * moved some editor graphics from "RocksDoor.pcx" to "RocksMore.pcx" + (to prevent compatibility mapping of these newer graphics to older + (custom) versions of "RocksDoor.pcx" which did not contain them yet) 2010-06-18 * added separately configurable game panel background to graphics config diff --git a/src/conf_gfx.c b/src/conf_gfx.c index 457cdf59..b620dcbd 100644 --- a/src/conf_gfx.c +++ b/src/conf_gfx.c @@ -5152,21 +5152,21 @@ struct ConfigInfo image_config[] = { "global.busy.frames_per_line", "7" }, { "global.busy.delay", "2" }, - { "editor.element_border", "RocksElements.pcx" }, - { "editor.element_border.x", "0" }, - { "editor.element_border.y", "0" }, + { "editor.element_border", "RocksMore.pcx" }, + { "editor.element_border.xpos", "0" }, + { "editor.element_border.ypos", "2" }, - { "editor.element_border_input", "RocksDoor.pcx" }, - { "editor.element_border_input.x", "740" }, - { "editor.element_border_input.y", "48" }, + { "editor.element_border_input", "RocksMore.pcx" }, + { "editor.element_border_input.xpos", "10" }, + { "editor.element_border_input.ypos", "7" }, - { "editor.cascade_list", "RocksDoor.pcx" }, - { "editor.cascade_list.x", "708" }, - { "editor.cascade_list.y", "80" }, + { "editor.cascade_list", "RocksMore.pcx" }, + { "editor.cascade_list.xpos", "10" }, + { "editor.cascade_list.ypos", "8" }, { "editor.cascade_list.frames", "1" }, - { "editor.cascade_list.active", "RocksDoor.pcx" }, - { "editor.cascade_list.active.x", "740" }, - { "editor.cascade_list.active.y", "80" }, + { "editor.cascade_list.active", "RocksMore.pcx" }, + { "editor.cascade_list.active.xpos", "9" }, + { "editor.cascade_list.active.ypos", "8" }, { "editor.cascade_list.active.frames", "1" }, { "background", UNDEFINED_FILENAME }, diff --git a/src/conftime.h b/src/conftime.h index 467b820b..49e7060b 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "2010-06-23 10:23" +#define COMPILE_DATE_STRING "2010-06-23 13:30" diff --git a/src/game.c b/src/game.c index 5b28f29b..cc304274 100644 --- a/src/game.c +++ b/src/game.c @@ -13368,7 +13368,11 @@ void ScrollLevel(int dx, int dy) #else +#if NEW_SCROLL + int softscroll_offset = (setup.soft_scrolling ? 2 * TILEX : 0); +#else int softscroll_offset = (setup.soft_scrolling ? TILEX : 0); +#endif BlitBitmap(drawto_field, drawto_field, FX + TILEX * (dx == -1) - softscroll_offset, diff --git a/src/main.c b/src/main.c index d5dbe91c..cfe34b76 100644 --- a/src/main.c +++ b/src/main.c @@ -41,7 +41,11 @@ SDL_Thread *server_thread; int key_joystick_mapping = 0; #if 1 +#if NEW_SCROLL +boolean redraw[2 + MAX_LEV_FIELDX + 2][2 + MAX_LEV_FIELDY + 2]; +#else boolean redraw[MAX_LEV_FIELDX + 2][MAX_LEV_FIELDY + 2]; +#endif #else boolean redraw[MAX_BUF_XSIZE][MAX_BUF_YSIZE]; #endif diff --git a/src/main.h b/src/main.h index e5631b49..34f8bcbf 100644 --- a/src/main.h +++ b/src/main.h @@ -31,6 +31,8 @@ #include "conf_mus.h" /* include auto-generated data structure definitions */ +#define NEW_SCROLL 0 + #define IMG_UNDEFINED (-1) #define IMG_EMPTY IMG_EMPTY_SPACE #define IMG_SP_EMPTY IMG_EMPTY_SPACE @@ -2827,7 +2829,11 @@ extern SDL_Thread *server_thread; extern int key_joystick_mapping; #if 1 +#if NEW_SCROLL +extern boolean redraw[2 + MAX_LEV_FIELDX + 2][2 + MAX_LEV_FIELDY + 2]; +#else extern boolean redraw[MAX_LEV_FIELDX + 2][MAX_LEV_FIELDY + 2]; +#endif #else extern boolean redraw[MAX_BUF_XSIZE][MAX_BUF_YSIZE]; #endif diff --git a/src/tools.c b/src/tools.c index 326af5f9..eb6f0765 100644 --- a/src/tools.c +++ b/src/tools.c @@ -108,6 +108,16 @@ void SetDrawtoField(int mode) { if (mode == DRAW_BUFFERED && setup.soft_scrolling) { +#if NEW_SCROLL + FX = 2 * TILEX; + FY = 2 * TILEY; + BX1 = -2; + BY1 = -2; + BX2 = SCR_FIELDX + 1; + BY2 = SCR_FIELDY + 1; + redraw_x1 = 2; + redraw_y1 = 2; +#else FX = TILEX; FY = TILEY; BX1 = -1; @@ -116,6 +126,7 @@ void SetDrawtoField(int mode) BY2 = SCR_FIELDY; redraw_x1 = 1; redraw_y1 = 1; +#endif drawto_field = fieldbuffer; } -- 2.34.1