IO::Seekable *io;
Resource::AsyncLoader *loader;
bool loaded;
+ unsigned last_used;
ManagedResource(Resource &);
void start_loading();
void finish_loading();
+ void unload();
};
class LoadingThread: public Thread
bool async_loads;
ResourceMap resources;
LoadQueue queue;
+ unsigned frame;
+ unsigned min_retain_frames;
+ unsigned max_retain_frames;
+ unsigned next_unload;
LoadingThread thread;
public:
void set_loading_policy(LoadingPolicy);
void set_async_loads(bool);
+ void set_max_retain_frames(unsigned);
void add_resource(Resource &);
void *get_data_for_resource(const Resource &);