From: Holger Schemel Date: Sat, 9 Dec 2023 16:52:11 +0000 (+0100) Subject: changed order of processing game modes for global animations clicks X-Git-Tag: 4.3.8.0~3 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=e3411dc963e8820b2e4f87ec5a16e263111fcc55;hp=2d49bde26882e981d844866672ddbc54f1cf4875;p=rocksndiamonds.git 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). --- 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;