1 \ Words implementing frame drawing
2 \ XXX Filled boxes are left as an exercise for the reader... ;-/
15 s" arch-pc98" environment? [if]
32 32 constant fill_blank
33 135 constant fill_dark
35 135 constant fill_bright
53 32 constant fill_blank
54 176 constant fill_dark
56 178 constant fill_bright
59 : hline ( len x y -- ) \ Draw horizontal single line
66 : f_single ( -- ) \ set frames to single
75 : f_double ( -- ) \ set frames to double
84 : vline ( len x y -- ) \ Draw vertical single line
95 : box ( w h x y -- ) \ Draw a box
96 2dup 1+ 4 pick 1- -rot
97 vline \ Draw left vert line
98 2dup 1+ swap 5 pick + swap 4 pick 1- -rot
99 vline \ Draw right vert line
100 2dup swap 1+ swap 5 pick 1- -rot
101 hline \ Draw top horiz line
102 2dup swap 1+ swap 4 pick + 5 pick 1- -rot
103 hline \ Draw bottom horiz line
104 2dup at-xy lt_el @ emit \ Draw left-top corner
105 2dup 4 pick + at-xy lb_el @ emit \ Draw left bottom corner
106 2dup swap 5 pick + swap at-xy rt_el @ emit \ Draw right top corner
107 2 pick + swap 3 pick + swap at-xy rb_el @ emit