mirror of
				https://github.com/edubart/otclient.git
				synced 2025-11-03 20:26:23 +01:00 
			
		
		
		
	Added support for exporting the sprites as PNG files.
This commit is contained in:
		@@ -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