src/ui-term.c
errr Term_redraw_section(int x1, int y1, int x2, int y2)
{
	int i, j;

	wchar_t *c_ptr;

	/* Bounds checking */
	if (y2 >= Term->hgt) y2 = Term->hgt - 1;
	if (x2 >= Term->wid) x2 = Term->wid - 1;
	if (y1 < 0) y1 = 0;
	if (x1 < 0) x1 = 0;


	/* Set y limits */
	Term->y1 = y1;
	Term->y2 = y2;

	/* Set the x limits */
	for (i = Term->y1; i <= Term->y2; i++) {
		if ((x1 > 0) && (Term->old->a[i][x1] == 255))
			x1--;

		Term->x1[i] = x1;
		Term->x2[i] = x2;

		c_ptr = Term->old->c[i];

		/* Clear the section so it is redrawn */
		for (j = x1; j <= x2; j++) {
			/* Hack - set the old character to "none" */
			c_ptr[j] = 0;
		}
	}

	/* Hack -- Refresh */
	Term_fresh();

	/* Success */
	return (0);
}
/**
 * Redraw part of a window.
 */
Redraw part of a window.
Redraw part of a window .
errr Term_redraw_section(int x1, int y1, int x2, int y2)
{
	int i, j;
	wchar_t *c_ptr;
	if (y2 >= Term->hgt) y2 = Term->hgt - 1;
	if (x2 >= Term->wid) x2 = Term->wid - 1;
	if (y1 < 0) y1 = 0;
	if (x1 < 0) x1 = 0;
	Term->y1 = y1;
	Term->y2 = y2;
	for (i = Term->y1; i <= Term->y2; i++) {
		if ((x1 > 0) && (Term->old->a[i][x1] == 255))
			x1--;
		Term->x1[i] = x1;
		Term->x2[i] = x2;
		c_ptr = Term->old->c[i];
		for (j = x1; j <= x2; j++) {
			c_ptr[j] = 0;
		}
	}
	Term_fresh();
	return (0);
}
errr Term_redraw_section ( int x1 , int y1 , int x2 , int y2 ) { int i , j ; wchar_t * c_ptr ; if ( y2 >= Term -> hgt ) y2 = Term -> hgt - 1 ; if ( x2 >= Term -> wid ) x2 = Term -> wid - 1 ; if ( y1 < 0 ) y1 = 0 ; if ( x1 < 0 ) x1 = 0 ; Term -> y1 = y1 ; Term -> y2 = y2 ; for ( i = Term -> y1 ; i <= Term -> y2 ; i ++ ) { if ( ( x1 > 0 ) && ( Term -> old -> a [ i ] [ x1 ] == 255 ) ) x1 -- ; Term -> x1 [ i ] = x1 ; Term -> x2 [ i ] = x2 ; c_ptr = Term -> old -> c [ i ] ; for ( j = x1 ; j <= x2 ; j ++ ) { c_ptr [ j ] = 0 ; } } Term_fresh ( ) ; return ( 0 ) ; }
Redraw part of a window.
Redraw part of a window .
/* Bounds checking */ /* Set y limits */ /* Set the x limits */ /* Clear the section so it is redrawn */ /* Hack - set the old character to "none" */ /* Hack -- Refresh */ /* Success */