mirror of
https://github.com/edubart/otclient.git
synced 2025-12-18 14:47:11 +01:00
Add live_textures_reload command
This commit is contained in:
@@ -297,6 +297,11 @@ std::string ResourceManager::getRealDir(const std::string& path)
|
||||
return dir;
|
||||
}
|
||||
|
||||
std::string ResourceManager::getRealPath(const std::string& path)
|
||||
{
|
||||
return getRealDir(path) + "/" + path;
|
||||
}
|
||||
|
||||
std::string ResourceManager::getBaseDir()
|
||||
{
|
||||
return PHYSFS_getBaseDir();
|
||||
@@ -320,3 +325,8 @@ bool ResourceManager::isFileType(const std::string& filename, const std::string&
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
ticks_t ResourceManager::getFileTime(const std::string& filename)
|
||||
{
|
||||
return g_platform.getFileModificationTime(getRealPath(filename));
|
||||
}
|
||||
|
||||
@@ -64,6 +64,7 @@ public:
|
||||
|
||||
std::string resolvePath(const std::string& path);
|
||||
std::string getRealDir(const std::string& path);
|
||||
std::string getRealPath(const std::string& path);
|
||||
std::string getBaseDir();
|
||||
std::string getUserDir();
|
||||
std::string getWriteDir() { return m_writeDir; }
|
||||
@@ -72,6 +73,7 @@ public:
|
||||
|
||||
std::string guessFilePath(const std::string& filename, const std::string& type);
|
||||
bool isFileType(const std::string& filename, const std::string& type);
|
||||
ticks_t getFileTime(const std::string& filename);
|
||||
|
||||
private:
|
||||
std::string m_workDir;
|
||||
|
||||
Reference in New Issue
Block a user