Support for loading files stored inside a zip file.
Treats zipped files as folders and allows loading files from inside the
zip file. Files are loaded on-demand from the archive.
Nested zip-files are currently not supported.
Replace file descriptor with a file stream in preparation for supporting
zipped files.
The API to miniz requires the use of file streams and since a file
descriptor can easily be extracted from a stream using `fileno` it's
much more convenient to use file streams everywhere.
Yield at an interval during the loading of directory entries as well as
while sorting them in order to not starve the poll functions.
The maximum time between calls to `user_io_poll` in the main loop were
measured while loading a folder containing 29026 entries:
- Original main-loop: 591ms
- With coroutines + yields: 29ms
The amount of time it takes to load and sort the 29026 entries:
- Original main-loop: 591ms
- With coroutines + yields: 686ms
By increasing the value of `YieldIterations` in `file_io.cpp` the load
time will decrease while increasing the delay between calls to
`user_io_poll`.
Stores directory entries in a std::vector instead of an array of
hardcoded size. The vector will dynamically grow to the number of
available entries in a folder without having a hardcoded upper limit.