This adds four new scripting functions to flickgame-mega, adding the capability to modify the images. The new functions are
box: Draw a rectangle on the current image
circle: Draw a filled circle on the current image
line: Draw a line on the current image
resetImage: Return the current image to its original state
One tricky design choice is indexing on the image coordinates, and also on colours. I've used zero-based indexes on both, as that's what the underlying data structures use, but it's maybe inconsistent with the numbering given to images (e.g. as used by the goto function).
This adds four new scripting functions to flickgame-mega, adding the capability to modify the images. The new functions are
One tricky design choice is indexing on the image coordinates, and also on colours. I've used zero-based indexes on both, as that's what the underlying data structures use, but it's maybe inconsistent with the numbering given to images (e.g. as used by the goto function).