2014-08-11 18:04:44 +00:00
|
|
|
#ifndef MISC_RESOURCEHELPERS_H
|
|
|
|
#define MISC_RESOURCEHELPERS_H
|
|
|
|
|
|
|
|
#include <string>
|
2021-06-29 01:47:23 +00:00
|
|
|
#include <string_view>
|
2014-08-11 18:04:44 +00:00
|
|
|
|
2015-03-19 00:45:01 +00:00
|
|
|
namespace VFS
|
|
|
|
{
|
|
|
|
class Manager;
|
|
|
|
}
|
|
|
|
|
2014-08-11 18:04:44 +00:00
|
|
|
namespace Misc
|
|
|
|
{
|
2015-05-01 16:37:24 +00:00
|
|
|
// Workarounds for messy resource handling in vanilla morrowind
|
|
|
|
// The below functions are provided on a opt-in basis, instead of built into the VFS,
|
|
|
|
// so we have the opportunity to use proper resource handling for content created in OpenMW-CS.
|
2014-08-11 18:04:44 +00:00
|
|
|
namespace ResourceHelpers
|
|
|
|
{
|
2014-08-12 10:18:38 +00:00
|
|
|
bool changeExtensionToDds(std::string &path);
|
2015-03-19 00:45:01 +00:00
|
|
|
std::string correctResourcePath(const std::string &topLevelDirectory, const std::string &resPath, const VFS::Manager* vfs);
|
|
|
|
std::string correctTexturePath(const std::string &resPath, const VFS::Manager* vfs);
|
|
|
|
std::string correctIconPath(const std::string &resPath, const VFS::Manager* vfs);
|
|
|
|
std::string correctBookartPath(const std::string &resPath, const VFS::Manager* vfs);
|
|
|
|
std::string correctBookartPath(const std::string &resPath, int width, int height, const VFS::Manager* vfs);
|
2015-05-01 16:37:24 +00:00
|
|
|
/// Use "xfoo.nif" instead of "foo.nif" if available
|
2015-03-19 00:45:01 +00:00
|
|
|
std::string correctActorModelPath(const std::string &resPath, const VFS::Manager* vfs);
|
2021-06-29 01:47:23 +00:00
|
|
|
|
2021-11-10 22:06:35 +00:00
|
|
|
std::string correctSoundPath(const std::string& resPath, const VFS::Manager* vfs);
|
|
|
|
|
2021-06-29 01:47:23 +00:00
|
|
|
/// marker objects that have a hardcoded function in the game logic, should be hidden from the player
|
|
|
|
bool isHiddenMarker(std::string_view id);
|
2014-08-11 18:04:44 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|