X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Ftools.c;h=2e627abfb59add5567f933cf395520f9ae63532f;hb=fa2a77aa4b53bb786e67f35d6c46f759ebe7823d;hp=e241c79adb289bdb3fe69614687019ebf79a8aed;hpb=c6f9fba81fc59eff4b6b454dff92adecd28a7ad5;p=rocksndiamonds.git diff --git a/src/tools.c b/src/tools.c index e241c79a..2e627abf 100644 --- a/src/tools.c +++ b/src/tools.c @@ -790,7 +790,7 @@ void DrawGraphicAnimation(int x, int y, int graphic) MarkTileDirty(x, y); } -#if 1 +#if 0 void getOldGraphicSource(int graphic, Bitmap **bitmap, int *x, int *y) { if (graphic >= 0 && graphic_info[graphic].bitmap != NULL) @@ -2244,10 +2244,17 @@ unsigned int MoveDoor(unsigned int door_state) { stepsize = 20; door_delay_value = 0; + StopSound(SND_MENU_DOOR_OPENING); StopSound(SND_MENU_DOOR_CLOSING); } + if (global.autoplay_leveldir) + { + door_state |= DOOR_NO_DELAY; + door_state &= ~DOOR_CLOSE_ALL; + } + if (door_state & DOOR_ACTION) { if (!(door_state & DOOR_NO_DELAY)) @@ -2266,7 +2273,8 @@ unsigned int MoveDoor(unsigned int door_state) Bitmap *bitmap = new_graphic_info[IMG_MENU_DOOR].bitmap; GC gc = bitmap->stored_clip_gc; - WaitUntilDelayReached(&door_delay, door_delay_value); + if (!(door_state & DOOR_NO_DELAY)) + WaitUntilDelayReached(&door_delay, door_delay_value); if (door_state & DOOR_ACTION_1) {