The lib should be stateless
Right now the library holds a lot of state in vars. I don't like that.
local loader = require 'love-loader'
local loader1 = loader.newLoader(finishedCallback, loadedCallback)
loader1:newImage( images, 'rabbit', 'path/to/rabbit.png')
loader1:newSource( sounds, 'iiiik', 'path/to/iiik.ogg')
loader1:newSource( sounds, 'music', 'path/to/music.ogg', 'stream')
This fixes two things:
- State is moved outside of the library and into the user's env (where it should be INMHO)
- You can have several loaders (for example one loader per level)
- It's possible that we even don't need 'start' if we do it right.
We can probably use a single resource-loading thread for all the extra loaders (as opposed to one per loader); but we shall see.
I have no time to dedicate to this project so I have decided to declare it unmaintained and close all open issues.
reopened and never talked in again
it worked!?!!?!?!!1!1!?
I think my reopening of this was more aspirational than anything. Otherwise there would be a corresponding PR. But it's been many years so your guess is as good as mine at this point.