I was working on a little projet in TIC-80 and I came accross a problem:
I have a shape made of a circle and a rectangle and I would like to cut pieces of it.So my idea was to draw the shape and simply draw on top of it to remove parts of it. However if I do that, I cannot draw stuff behind of the shape.
So I was wondering if it could be possible to add an optional 'mask' parameter to each paint function:
line x0 y0 x1 y1 color [mask] rect x y w h color [mask] rectb x y w h color [mask] circ x y radius color [mask] circb x y radius color [mask] tri x1 y1 x2 y2 x3 y3 color [mask]
So that the function would only draw on pixels of the color specified by the mask. It would be quite useful for demos.
But if it is too much for a machine that is supposed to be limited, I would like to have some hints on how to draw complex shapes. Like maybe there is a way to draw on the spritesheet and then draw back the sprite on the screen.