X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fscreens.c;fp=src%2Fscreens.c;h=1365e7371cf195c6483aac22caa75baf6b2f3451;hb=abe3ad50047635122f478f7e18708ff7292edf52;hp=c4955e8c7bdcac56ddaad9ceaed82a8e6e96a246;hpb=191cad4c3989ca956f49ffc879296c84b508676d;p=rocksndiamonds.git diff --git a/src/screens.c b/src/screens.c index c4955e8c..1365e737 100644 --- a/src/screens.c +++ b/src/screens.c @@ -3146,7 +3146,9 @@ void DrawInfoScreen_HelpAnim(int start, int max_anims, boolean init) continue; } - j += infoscreen_step[i - start]; + int ypos = i - start; + + j += infoscreen_step[ypos]; element = helpanim_info[j].element; action = helpanim_info[j].action; @@ -3169,39 +3171,39 @@ void DrawInfoScreen_HelpAnim(int start, int max_anims, boolean init) if (delay == -1) delay = 1000000; - if (infoscreen_frame[i - start] == 0) + if (infoscreen_frame[ypos] == 0) { sync_frame = 0; - infoscreen_frame[i - start] = delay - 1; + infoscreen_frame[ypos] = delay - 1; } else { - sync_frame = delay - infoscreen_frame[i - start]; - infoscreen_frame[i - start]--; + sync_frame = delay - infoscreen_frame[ypos]; + infoscreen_frame[ypos]--; } if (helpanim_info[j].element == HELPANIM_LIST_NEXT) { - if (!infoscreen_frame[i - start]) - infoscreen_step[i - start] = 0; + if (!infoscreen_frame[ypos]) + infoscreen_step[ypos] = 0; } else { - if (!infoscreen_frame[i - start]) - infoscreen_step[i - start]++; + if (!infoscreen_frame[ypos]) + infoscreen_step[ypos]++; while (helpanim_info[j].element != HELPANIM_LIST_NEXT) j++; } j++; - ClearRectangleOnBackground(drawto, xstart, ystart + (i - start) * ystep, + ClearRectangleOnBackground(drawto, xstart, ystart + ypos * ystep, TILEX, TILEY); - DrawFixedGraphicAnimationExt(drawto, xstart, ystart + (i - start) * ystep, + DrawFixedGraphicAnimationExt(drawto, xstart, ystart + ypos * ystep, graphic, sync_frame, USE_MASKING); if (init) - DrawInfoScreen_HelpText(element, action, direction, i - start); + DrawInfoScreen_HelpText(element, action, direction, ypos); i++; }