mirror of
https://github.com/edubart/otclient.git
synced 2025-10-19 05:53:26 +02:00
Added support for exporting the sprites as PNG files.
This commit is contained in:
@@ -52,8 +52,8 @@ void exitSignalHandler(int sig)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Application::Application(const std::string& appName)
|
||||
|
||||
{
|
||||
g_app = this;
|
||||
m_appName = appName;
|
||||
|
@@ -116,8 +116,11 @@ std::string ResourceManager::loadFile(const std::string& fileName)
|
||||
bool ResourceManager::saveFile(const std::string& fileName, const uchar* data, uint size)
|
||||
{
|
||||
PHYSFS_file* file = PHYSFS_openWrite(fileName.c_str());
|
||||
if(!file)
|
||||
return false;
|
||||
if(!file)
|
||||
{
|
||||
logError(PHYSFS_getLastError());
|
||||
return false;
|
||||
}
|
||||
|
||||
PHYSFS_write(file, (void*)data, size, 1);
|
||||
PHYSFS_close(file);
|
||||
|
Reference in New Issue
Block a user