Cleanup magic strings in tilesheet importer
This commit is contained in:
parent
89a7ffd45f
commit
21be39e2c9
@ -13,6 +13,7 @@
|
||||
namespace nostalgia {
|
||||
namespace core {
|
||||
|
||||
const QString ImportTilesheetWizardPage::TILESHEET_DIR = "/TileSheets/";
|
||||
const QString ImportTilesheetWizardPage::TILESHEET_NAME = "projectName";
|
||||
const QString ImportTilesheetWizardPage::IMPORT_PATH = "projectPath";
|
||||
const QString ImportTilesheetWizardPage::BPP = "bpp";
|
||||
@ -52,8 +53,8 @@ int ImportTilesheetWizardPage::importImage(QFile &srcFile, QString tilesheetName
|
||||
srcFile.open(QIODevice::ReadOnly);
|
||||
if (srcFile.read((char*) buff, buffSize) > 0) {
|
||||
int err = 0;
|
||||
m_project->mkdir("/TileSheets");
|
||||
err |= m_project->write("/TileSheets/" + tilesheetName, buff, buffSize);
|
||||
m_project->mkdir(TILESHEET_DIR);
|
||||
err |= m_project->write(TILESHEET_DIR + tilesheetName, buff, buffSize);
|
||||
err |= m_project->saveRomFs();
|
||||
return err;
|
||||
} else {
|
||||
|
@ -15,6 +15,7 @@ namespace core {
|
||||
|
||||
class ImportTilesheetWizardPage: public studio::WizardFormPage {
|
||||
private:
|
||||
static const QString TILESHEET_DIR;
|
||||
static const QString TILESHEET_NAME;
|
||||
static const QString IMPORT_PATH;
|
||||
static const QString BPP;
|
||||
|
Loading…
x
Reference in New Issue
Block a user