Add basic infrastructure for file handler plugins.

The purpose of this is for games which use archive file formats
(containing many individual files), so that assets, files, etc. can be
worked on more rapidly.
This commit is contained in:
Unknown W. Brackets 2013-07-28 10:31:42 -07:00
parent 9ba2af1c48
commit 150a5c8f70
2 changed files with 54 additions and 3 deletions

View file

@ -94,7 +94,8 @@ void VirtualDiscFileSystem::LoadFileListIndex() {
// Check if there's a handler specified.
size_t handler_pos = line.find(':', filename_pos);
if (handler_pos != line.npos) {
entry.fileName = line.substr(filename_pos + 1, handler_pos - filename_pos);
entry.fileName = line.substr(filename_pos + 1, handler_pos - filename_pos - 1);
NOTICE_LOG(HLE, "Handler found: %s", line.substr(handler_pos + 1).c_str());
// TODO: Implement handler.
} else {
entry.fileName = line.substr(filename_pos + 1);
@ -637,3 +638,11 @@ bool VirtualDiscFileSystem::RemoveFile(const std::string &filename)
ERROR_LOG(HLE,"VirtualDiscFileSystem: Cannot remove file on virtual disc");
return false;
}
VirtualDiscFileSystem::Handler::Handler(const char *filename) {
// TODO
}
VirtualDiscFileSystem::Handler::~Handler() {
// TODO
}