mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-06 10:17:14 +00:00
WATCHMAKER: Migrate engine to Path
This commit is contained in:
parent
17ceed4eb3
commit
dd374a778e
@ -128,24 +128,24 @@ bool t3dGetFileDate(uint32 *date, uint32 *time, const char *name) {
|
||||
return checkFileExists(name);
|
||||
}
|
||||
|
||||
Common::String adjustPath(const Common::String &path) {
|
||||
Common::String adjustedPath;
|
||||
Common::Path adjustPath(const Common::String &path) {
|
||||
Common::Path adjustedPath;
|
||||
if (path.hasPrefix("./")) {
|
||||
adjustedPath = path.substr(2, path.size());
|
||||
adjustedPath = Common::Path(path.substr(2, path.size()));
|
||||
} else {
|
||||
adjustedPath = path;
|
||||
adjustedPath = Common::Path(path);
|
||||
}
|
||||
return adjustedPath;
|
||||
}
|
||||
|
||||
bool checkFileExists(const Common::String &filename) {
|
||||
Common::String adjustedPath = adjustPath(filename);
|
||||
Common::Path adjustedPath = adjustPath(filename);
|
||||
|
||||
return SearchMan.hasFile(adjustedPath);
|
||||
}
|
||||
|
||||
Common::SharedPtr<Common::SeekableReadStream> openFile(const Common::String &filename, int offset, int size) {
|
||||
Common::String adjustedPath = adjustPath(filename);
|
||||
Common::Path adjustedPath = adjustPath(filename);
|
||||
|
||||
Common::SeekableReadStream *file = SearchMan.createReadStreamForMember(adjustedPath);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user