Well there are many ways of doing this, but the easiest would probably be to just use
glass.addBox(…) as a direct replacement for term.setCursorPos(…) term.write(" ") in your code.
For example, if you defined an area to be the map from xmin,ymin to xmax,ymax and had a table which defined x,y coordinates on the terminal and the colour to draw them, your code would look something like this:
--# draw table in format {[1]={x=,y=,colour=},...}
width=xmax-xmin
height=ymax-ymin
box_width =
box_height =
for box_no, details in pairs(draw) do
glass.addBox(xmin+details.x*box_width,ymin+details.y*box_height,box_width,box_height,details.colour,0.5)
end
you might want to do it slightly differently depending on how you already have the map formatted but that's the general idea