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

	CalcIVG -- Calculate the number of blank lines above a ViewPort (V39)

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

	UWORD CalcIVG(struct View *, struct ViewPort *);

	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.

	View       - pointer to the View
	ViewPort   - pointer to the ViewPort you are interested in.

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

	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))

	GfxNew()  VideoControl()  graphics/view.h