X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Ftools.c;h=f89b2b250eeebc8a7d087043e05e344ce6fc2f0c;hb=HEAD;hp=a3aa3c34a9cbe12bf06beeb3c58395e6ae420019;hpb=a42320dc0f3af61bee63a8d81508e6ff5b44c41b;p=rocksndiamonds.git diff --git a/src/tools.c b/src/tools.c index a3aa3c34..4083e77e 100644 --- a/src/tools.c +++ b/src/tools.c @@ -1517,6 +1517,11 @@ void SetRandomAnimationValue(int x, int y) gfx.anim_random_frame = GfxRandom[x][y]; } +void SetAnimationFirstLevel(int first_level) +{ + gfx.anim_first_level = first_level; +} + int getGraphicAnimationFrame(int graphic, int sync_frame) { // animation synchronized with global frame counter, not move position @@ -3056,6 +3061,8 @@ static void PrepareEnvelopeRequestToScreen(Bitmap *bitmap, int sx, int sy, SDLFreeBitmapTextures(request.bitmap); SDLCreateBitmapTextures(request.bitmap); + ResetBitmapAlpha(request.bitmap); + // set envelope request run-time values request.sx = sx; request.sy = sy; @@ -3069,7 +3076,11 @@ void DrawEnvelopeRequestToScreen(int drawing_target) game.request_active && drawing_target == DRAW_TO_SCREEN) { - if (graphic_info[IMG_BACKGROUND_REQUEST].draw_masked) + struct GraphicInfo *g = &graphic_info[IMG_BACKGROUND_REQUEST]; + + SetBitmapAlphaNextBlit(request.bitmap, g->alpha); + + if (g->draw_masked) BlitToScreenMasked(request.bitmap, 0, 0, request.xsize, request.ysize, request.sx, request.sy); else @@ -4602,11 +4613,12 @@ static int RequestHandleEvents(unsigned int req_state, int draw_buffer_game) break; default: - // only check clickable animations if no request gadget clicked - HandleGlobalAnimClicks(mx, my, button_status, FALSE); break; } + // only needed to handle clickable pointer animations here + HandleGlobalAnimClicks(mx, my, button_status, FALSE); + break; }