1 #ifndef MISC_RESOURCEHELPERS_H
2 #define MISC_RESOURCEHELPERS_H
3 
4 #include <string>
5 
6 namespace VFS
7 {
8     class Manager;
9 }
10 
11 namespace Misc
12 {
13     // Workarounds for messy resource handling in vanilla morrowind
14     // The below functions are provided on a opt-in basis, instead of built into the VFS,
15     // so we have the opportunity to use proper resource handling for content created in OpenMW-CS.
16     namespace ResourceHelpers
17     {
18         bool changeExtensionToDds(std::string &path);
19         std::string correctResourcePath(const std::string &topLevelDirectory, const std::string &resPath, const VFS::Manager* vfs);
20         std::string correctTexturePath(const std::string &resPath, const VFS::Manager* vfs);
21         std::string correctIconPath(const std::string &resPath, const VFS::Manager* vfs);
22         std::string correctBookartPath(const std::string &resPath, const VFS::Manager* vfs);
23         std::string correctBookartPath(const std::string &resPath, int width, int height, const VFS::Manager* vfs);
24         /// Use "xfoo.nif" instead of "foo.nif" if available
25         std::string correctActorModelPath(const std::string &resPath, const VFS::Manager* vfs);
26     }
27 }
28 
29 #endif
30