summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--draw.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/draw.c b/draw.c
index 822113f..51a27b2 100644
--- a/draw.c
+++ b/draw.c
@@ -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;
}