From: Holger Schemel Date: Fri, 21 Nov 2014 16:13:04 +0000 (+0100) Subject: fixed broken door animations when switching between custom graphics X-Git-Tag: 4.0.0.0-rc1~314 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=3282aa616432ea42399d4dc4ffe637c4406a71c4;p=rocksndiamonds.git fixed broken door animations when switching between custom graphics --- diff --git a/ChangeLog b/ChangeLog index e3441b09..f89b0448 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2014-11-19 + * fixed broken door animations when switching between custom graphics + 2014-11-06 * fixed layout for "level set info" to support custom playfield size * fixed changing from title to info screen with custom playfield size diff --git a/src/conftime.h b/src/conftime.h index 32baad74..6640ee06 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "2014-11-06 22:15" +#define COMPILE_DATE_STRING "2014-11-19 21:47" diff --git a/src/init.c b/src/init.c index 18a5a2c1..e4b15279 100644 --- a/src/init.c +++ b/src/init.c @@ -5014,6 +5014,9 @@ void InitGfxBuffers() InitGfxScrollbufferInfo(FXSIZE, FYSIZE); InitGfxClipRegion(FALSE, -1, -1, -1, -1); + /* required if door size definitions have changed */ + InitGraphicCompatibilityInfo_Doors(); + InitGfxBuffers_EM(); InitGfxBuffers_SP(); } diff --git a/src/tools.c b/src/tools.c index ad2b3b32..d5dc6909 100644 --- a/src/tools.c +++ b/src/tools.c @@ -3936,11 +3936,13 @@ void InitGraphicCompatibilityInfo_Doors() { num_panel_steps = 2 * door_rect->height / door->step_offset; door->panel.start_step = num_panel_steps - num_door_steps; + door->panel.start_step_closing = door->panel.start_step; } else { num_panel_steps = door_rect->height / door->step_offset; door->panel.start_step = num_panel_steps - num_door_steps / 2; + door->panel.start_step_closing = door->panel.start_step; door->panel.step_delay *= 2; } } @@ -4041,15 +4043,6 @@ unsigned int MoveDoor(unsigned int door_state) unsigned int door_delay_value; int i; - if (door_1.width < 0 || door_1.width > DXSIZE) - door_1.width = DXSIZE; - if (door_1.height < 0 || door_1.height > DYSIZE) - door_1.height = DYSIZE; - if (door_2.width < 0 || door_2.width > VXSIZE) - door_2.width = VXSIZE; - if (door_2.height < 0 || door_2.height > VYSIZE) - door_2.height = VYSIZE; - if (door_state == DOOR_GET_STATE) return (door1 | door2);