X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Ftools.c;h=88c813441050f05ac9595b2a56261e3d586b1866;hb=ba702cd338586991ab20176cf5587afbb4d77af7;hp=84198618ee2a7baad4d783662277f6f49f6ad158;hpb=fe3196f07cb50ffb788c0073b82f94c26f93cfbf;p=rocksndiamonds.git diff --git a/src/tools.c b/src/tools.c index 84198618..88c81344 100644 --- a/src/tools.c +++ b/src/tools.c @@ -600,6 +600,20 @@ void SetMainBackgroundImageIfDefined(int graphic) SetMainBackgroundBitmap(graphic_info[graphic].bitmap); } +void SetDoorBackgroundImageIfDefined(int graphic) +{ + if (graphic_info[graphic].bitmap) + SetDoorBackgroundBitmap(graphic_info[graphic].bitmap); +} + +void SetWindowBackgroundImage(int graphic) +{ + SetWindowBackgroundBitmap(graphic == IMG_UNDEFINED ? NULL : + graphic_info[graphic].bitmap ? + graphic_info[graphic].bitmap : + graphic_info[IMG_BACKGROUND].bitmap); +} + void SetMainBackgroundImage(int graphic) { SetMainBackgroundBitmap(graphic == IMG_UNDEFINED ? NULL : @@ -1617,7 +1631,7 @@ void AnimateEnvelope(int envelope_nr, int anim_mode, int action) level.envelope[envelope_nr].text, font_nr, max_xsize, xsize - 2, ysize - 2, mask_mode, level.envelope[envelope_nr].autowrap, - level.envelope[envelope_nr].centered); + level.envelope[envelope_nr].centered, FALSE); #else DrawTextToTextArea(SX + sx + font_width, SY + sy + font_height, level.envelope[envelope_nr].text, font_nr, max_xsize, @@ -2791,6 +2805,23 @@ boolean Request(char *text, unsigned int req_state) result = 0; } +#if 1 + + if (game_status == GAME_MODE_PLAYING && local_player->LevelSolved_GameEnd) + { + HandleGameActions(); + BackToFront(); + } + else + { + DoAnimation(); + + if (!PendingEvent()) /* delay only if no pending events */ + Delay(10); + } + +#else + DoAnimation(); #if 1 @@ -2799,6 +2830,8 @@ boolean Request(char *text, unsigned int req_state) #else /* don't eat all CPU time */ Delay(10); +#endif + #endif }