OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
resourcehelpers.hpp
Go to the documentation of this file.
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);
25  std::string correctActorModelPath(const std::string &resPath, const VFS::Manager* vfs);
26  }
27 }
28 
29 #endif
bool changeExtensionToDds(std::string &path)
Definition: resourcehelpers.cpp:32
std::string correctResourcePath(const std::string &topLevelDirectory, const std::string &resPath, const VFS::Manager *vfs)
Definition: resourcehelpers.cpp:43
std::string correctTexturePath(const std::string &resPath, const VFS::Manager *vfs)
Definition: resourcehelpers.cpp:91
std::string correctBookartPath(const std::string &resPath, const VFS::Manager *vfs)
Definition: resourcehelpers.cpp:103
The main class responsible for loading files from a virtual file system.
Definition: manager.hpp:20
std::string correctActorModelPath(const std::string &resPath, const VFS::Manager *vfs)
Use "xfoo.nif" instead of "foo.nif" if available.
Definition: resourcehelpers.cpp:127
std::string correctIconPath(const std::string &resPath, const VFS::Manager *vfs)
Definition: resourcehelpers.cpp:97