In order to generate interactive moving cursor functions it is necessary to produce sprite like graphical out put. This requires an "XOR" modification of the displayed graphics. After a call to
tv_set_overlay(Tv *tv)all drawing takes place in a colour called overlay (usually red) and uses rop_xor. This means that after drawing a sequence of primitives, the screen can be restored to its original state by repeating the draw sequence. This allows red sprites to wander over a fixed background display for example.
To return to the previous draw context call tv_reset_draw(tv) as above.