X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Ftools.c;h=0ab4eec741a9909cc521ff92f9c0a13dd3073de0;hb=61230e43ba583ff601d6ceacf452ed6a4b9afc1d;hp=8a0ca336226e5eec26493ca43ff8d8a79bd42dc1;hpb=64048311a753e16e92c29112a8a223a866ac45ef;p=rocksndiamonds.git diff --git a/src/tools.c b/src/tools.c index 8a0ca336..0ab4eec7 100644 --- a/src/tools.c +++ b/src/tools.c @@ -693,6 +693,7 @@ static int getGraphicAnimationPhase(int frames, int delay, int mode) if (mode == ANIM_OSCILLATE) { int max_anim_frames = 2 * frames - 2; + phase = (FrameCounter % (delay * max_anim_frames)) / delay; phase = (phase < frames ? phase : max_anim_frames - phase); }