bcvery1 / tilepix

Library for combining tiled maps with pixel
MIT License
46 stars 14 forks source link

Give layers dirty flag #37

Closed bcvery1 closed 5 years ago

bcvery1 commented 5 years ago

Currently each time Draw is called on a layer, it will check if the batch is initialised, clear the batch, then draw each tile.

If tiles never change, the two latter steps are unneeded. Layers should be 'static' as default, meaning they are never automatically marked dirty (except with animated panels, but that will be dealt with in #25 and is out of scope for this change).

Only layers which get marked "dirty" by the user (or later on by reading animated panels) should clear and redraw to the batch each time Draw is called