[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