[Contents] [Index] [Help] [Retrace] [Browse <] [Browse >]


   NAME
        CalcIVG -- Calculate the number of blank lines above a viewport (v39)

   SYNOPSIS
        count = CalcIVG(View, ViewPort)
         d0.w           a0    a1

        uword calcivg(struct view *, struct viewport *);

   FUNCTION
        To calculate the maximum number of blank lines above a viewport needed to
        load all the copper instructions, after accounting for the viewport
        bandwidth and size.

   INPUTS
        view       - pointer to the view
        viewport   - pointer to the viewport you are interested in.

   RESULT
        count      - the number of viewport resolution scan lines needed to
                     execute all the copper instructions for viewport,
                     or 0 if any error.

   NOTES
        The number of copper instructions comes from the vp->vp_DspIns list.
        Although there may be other copper instructions in the final list (from
        UCopIns, SprIns and ClrIns) they are currently ignored for this
        function. This also means that if the viewport has never been made
        (for example, the viewport of an intuition screen was opened behind)
        then vp->vp_DspIns is NULL.

        Although CalcIVG() returns the true number of lines needed by the
        copper, intuition still maintains an inter-screen gap of 3 non-laced
        lines (6 interlaced). Therefore, for intuition screens use:
        MAX(CalcIVG(v, vp), (islaced ? 6 : 3))


   SEE ALSO
        gfxnew()  videocontrol()  graphics/view.h