• I think it might be safer to just have two draw functions rather than trying to decide which one to queue (which I think is what you're asking?). So use @malaire's code but with:

    function draw() {
      if (unlocked) draw1() else draw2();
      queueDraw();
    }
    

    as well as loading a background image from heatshrink, all depending on lock state.

    Not quite sure what you have in mind here, but if you store the background image as a file (uncompressed), drawImage can draw that file directly without ever loading it into RAM - it's likely to be faster and use less memory than trying to use heatshrink.

About

Avatar for Gordon @Gordon started