From e3411dc963e8820b2e4f87ec5a16e263111fcc55 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Sat, 9 Dec 2023 17:52:11 +0100 Subject: [PATCH] changed order of processing game modes for global animations clicks The previous (reversed) order suggested that this had something to do with draw order, which was not the case. Using the normal (numerical) order also has the advantage of processing global animations without a special game mode assigned to them (like ".PLAYING" or ".MAIN") to be processed first, which is especially important to process pointer style global animations (which are probably defined to be used on all game screens in most cases) before all other global animations, which is required to display an alternative pointer when the mouse button is pressed (which is defined using ".style: passthrough_clicks" for such cases). --- src/anim.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/anim.c b/src/anim.c index 7ef6d690..7f50b28b 100644 --- a/src/anim.c +++ b/src/anim.c @@ -2122,8 +2122,7 @@ static boolean InitGlobalAnim_Clicked(int mx, int my, int clicked_event) int mode_nr; int i; - // check game modes in reverse draw order (to stop when clicked) - for (mode_nr = NUM_GAME_MODES - 1; mode_nr >= 0; mode_nr--) + for (mode_nr = 0; mode_nr < NUM_GAME_MODES; mode_nr++) { struct GlobalAnimControlInfo *ctrl = &global_anim_ctrl[mode_nr]; int anim_nr; -- 2.34.1