[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[MiNT] GEMlib PL37 and vs_clip



Hi,

I don't remember if it has been already fixed but in GEMlib PL37 there
was a little 'bug' with vs_clip.
When you swith the clipping off, you must give a valid array anyway !
If you vs_clip( handle, CLIPPING_OFF, NULL ) :  BOOOOOOUUUUMMMMM !!! ;-)
I corrected it for me but I don't know if it still suits the specifications
of the VDI.


void vs_clip(int handle, int clip_flag, int pxyarray[])
{
	register int i;
	
	vdi_intin[0] = clip_flag;
	
	if( pxyarray ) {
		for( i=3; i>=0; i--) vdi_ptsin[i] = pxyarray[i];
	} else {
		for( i=3; i>=0; i--) vdi_ptsin[i] = 0;     /* 0 : dummy value */
	}
	vdi_control[0] = 129;
	vdi_control[1] = 2;
	vdi_control[3] = 1;
	vdi_control[5] = 0;
	vdi_control[6] = handle;
	vdi(&vdi_params);
}


Vincent

PS : the code produced by gcc 2.8.1 -O9 for this is really ... hemmmm ....