OpenAWE icon indicating copy to clipboard operation
OpenAWE copied to clipboard

Remove redundancies in RMDPArchive class

Open Nostritius opened this issue 4 years ago • 0 comments

The rmdp file archive loader has a lot of redundant building blocks for its methods. It would be nice to move this into separate methods to reduce the code and maintainability for it. The building blocks would be:

  • Normalizing a path (Ideally the method from #15)
  • Converting a path from a string to a list of crc32 hashes and one crc32 hash for the file.
  • Retrieving the right folder entry for a list of crc32 hashes.
  • Retrieving the right file entry for a crc32 file hash and a folder entry.

Both the retrieval of a file entry and folder entry could utilize std::optional, for the case if no entry is found.

Nostritius avatar Jul 15 '21 12:07 Nostritius