From: Holger Schemel Date: Sun, 14 May 2023 15:42:20 +0000 (+0200) Subject: fixed drawing mouse pointer global animation above MM engine tile cursor X-Git-Tag: 4.3.6.0~22 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=e7df31ecfcac92eb8d51b450181fc673918759d0;p=rocksndiamonds.git fixed drawing mouse pointer global animation above MM engine tile cursor --- diff --git a/src/anim.c b/src/anim.c index 2f0278ef..eff54726 100644 --- a/src/anim.c +++ b/src/anim.c @@ -961,7 +961,7 @@ static boolean SetGlobalAnimPart_Viewport(struct GlobalAnimPartControlInfo *part viewport_width = part->graphic_info.width; viewport_height = part->graphic_info.height; - part->drawing_stage = DRAW_GLOBAL_ANIM_STAGE_2; + part->drawing_stage = DRAW_GLOBAL_ANIM_STAGE_3; // do not use global animation mouse pointer when reloading artwork if (global.anim_status != GAME_MODE_LOADING) diff --git a/src/libgame/sdl.c b/src/libgame/sdl.c index 2d2551a2..71d9fbbe 100644 --- a/src/libgame/sdl.c +++ b/src/libgame/sdl.c @@ -65,6 +65,10 @@ static void FinalizeScreen(int draw_target) // copy tile selection cursor to render target buffer, if defined (above all) if (gfx.draw_tile_cursor_function != NULL) gfx.draw_tile_cursor_function(draw_target); + + // copy global animations to render target buffer, if defined (mouse pointer) + if (gfx.draw_global_anim_function != NULL) + gfx.draw_global_anim_function(draw_target, DRAW_GLOBAL_ANIM_STAGE_3); } static void UpdateScreenExt(SDL_Rect *rect, boolean with_frame_delay) diff --git a/src/libgame/system.h b/src/libgame/system.h index 02e58143..acc20894 100644 --- a/src/libgame/system.h +++ b/src/libgame/system.h @@ -288,6 +288,7 @@ // values for drawing stages for global animations #define DRAW_GLOBAL_ANIM_STAGE_1 1 #define DRAW_GLOBAL_ANIM_STAGE_2 2 +#define DRAW_GLOBAL_ANIM_STAGE_3 3 // values for drawing target (various functions) #define DRAW_TO_BACKBUFFER 0