예제 #1
0
        internal static void ShowAnimation(int num_loops, byte block_id, short row_y, short col_x) // sub_52B79
        {
            int loop_count = 0;
            int start_time = Seg041.CentiSeconds();

            DaxArray animation = new DaxArray();

            ovr030.load_pic_final(ref animation, false, block_id, "PIC");
            seg040.OverlayBounded(animation.frames[0].picture, 0, 0, row_y - 1, col_x - 1);
            seg040.DrawOverlay();

            do
            {
                ovr030.DrawMaybeOverlayed(animation.CurrentPicture(), true, row_y, col_x);
                int current_time = Seg041.CentiSeconds();

                int delay = animation.CurrentDelay() * (gbl.game_speed_var + 3);

                if ((current_time - start_time) > delay)
                {
                    animation.curFrame += 1;

                    if (animation.curFrame > animation.numFrames)
                    {
                        animation.curFrame = 1;
                        loop_count++;
                    }

                    start_time = current_time;
                }
            } while (loop_count != num_loops);

            ovr030.DaxArrayFreeDaxBlocks(animation);
        }