Quick update on threaded file loading from .zip files (and threaded texture loading from .jpg):
* Got everything rewritten to use the more sane system, where the whole zip file is read (compressed) into mem, and then each texture is uncompressed directly from there into a mip data buffer.
* Right now it's still quite naive about what textures to cache and things, and doesn't have the system, for e.g., freeing up page 1 when the user hits page 4, and queuing pages 5, 6, and 7.
Right now I've also got a problem with the code that copies from the compressed zip buffer into zip data structures used to figure out the internal zip structure, as I had to replace IFileHandle Read/Seek/Tell with Memcpys and pointer arithmetic.
At some point I think I'll abstract that out so I don't have to manually do the pointer arithmetic, and just set it up so I can call my own Read/Tell/Seek functions to move around the buffer pointer.
So to debug that issue, I went back to JUnzip and got its little example compiling so I can manually step through and figure out the offsets and what they should be at each stage of reading the zip's central directory structure (gives info about the files).
* Got everything rewritten to use the more sane system, where the whole zip file is read (compressed) into mem, and then each texture is uncompressed directly from there into a mip data buffer.
* Right now it's still quite naive about what textures to cache and things, and doesn't have the system, for e.g., freeing up page 1 when the user hits page 4, and queuing pages 5, 6, and 7.
Right now I've also got a problem with the code that copies from the compressed zip buffer into zip data structures used to figure out the internal zip structure, as I had to replace IFileHandle Read/Seek/Tell with Memcpys and pointer arithmetic.
At some point I think I'll abstract that out so I don't have to manually do the pointer arithmetic, and just set it up so I can call my own Read/Tell/Seek functions to move around the buffer pointer.
So to debug that issue, I went back to JUnzip and got its little example compiling so I can manually step through and figure out the offsets and what they should be at each stage of reading the zip's central directory structure (gives info about the files).
Comment