diff options
| -rw-r--r-- | draw.c | 14 | 
1 files changed, 9 insertions, 5 deletions
| @@ -251,15 +251,17 @@ void draw_trapezium(int x1, int y1, char st, char fix){  	for(i=xmin+1; i<=xmax; i++){  		f(i, ylong, line_h);  	} -	for(i=xmin+xoff; i<=xmax-xoff; i++){ -		f(i, yshort, line_h); +	if (st & 0x02){ /* Centred trapezium */ +		for(i=xmin+xoff; i<=xmax-xoff; i++){ +			f(i, yshort, line_h); +		}  	}  	f(xmin+xoff, yshort, corner);  	f(xmin, ylong, corner);  	f(xmax-xoff, yshort, corner);  	f(xmax, ylong, corner);  	xoff --; -	if ((st & BOX_TRAP_D) == BOX_TRAP_D) +	if ((st & BOX_TRAP_DC) == BOX_TRAP_DC)  		xoff = 1;  	for(i=ymin+1; i<ymax; i++, xoff += xincr){  		f(xmin + xoff, i, left_c); @@ -291,11 +293,13 @@ void update_box(int x1, int y1, char st, char fix){  char toggle_trap_type(char st){  	if (st & BOX_TRAP){ -		if (st < BOX_TRAP_DR) -			st ++; +		if (st != BOX_TRAP_DR) +			st += 1;  		else   			st = BOX_TRAP_UR;  	} +	if (st == BOX_TRAP_D)  +		st += 1;  	return st;  } | 
