Added support for exporting the sprites as PNG files.

This commit is contained in:
Cayan
2012-04-28 20:31:18 -03:00
committed by Eduardo Bart
parent cc965bb77b
commit 6ed0e099db
5 changed files with 149 additions and 11 deletions

View File

@@ -52,8 +52,8 @@ void exitSignalHandler(int sig)
break;
}
}
Application::Application(const std::string& appName)
{
g_app = this;
m_appName = appName;

View File

@@ -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);