Jared Ketterer
Jared Ketterer
`.related_filenames` isn't going to work `.lmp` filenames include version numbers[^vdc] we should probably use `fnmatch` patterns instead this could be used with `archive.namelist()` or `os.listdir()` though we'll need some path...
we could extract files we want to mount inside archives if we use temporary files we'd be reducing ram usage load time would only increase by the write time we...
`extras` seems like a good name to reference "external files" helps keep variable names short (`mount_extras` vs. `mount_external_files`) > totally didn't get the idea from the Guilty Gear soundtrack playing...
ArchiveClasses & BspClasses now automatically mount extras each specific class which uses external files now needs to access them via `self.extras` they also need class-specific `.extra_patterns` implementations
We need archives we can use to actually test file mounting I currently don't have any `.bsp`s inside archives w/ supplementary files Might have to make an `id_software.Pak` w/ `.lit`...
Could add a raw bytedata arg to `.mount_file` for testing ```python def mount_file(self, filename: str, archive=None, raw_data: bytes = None): if raw_data is not None: self.extras[filename] = io.BytesIO(raw_data) else: ......
`ArchiveClasses` need to start using `filename` & `folder` attributes This will lets us generate `extra_patterns` & scan the local folder for attached files
Not every `ArchiveClass` needs to track folder & filename `.from_archive` & `.from_file` handle that for us anyway
got `sega.Gdi` implemented but to test it, I tried updating `sega.GDRom` to read the data unfortunately the `.gdi`s I'm using don't use a single track for the GD-ROM Area `base.Archive`...
`DiscClass`es use `external.File` to hold onto track data