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