Convert MetatileParser into a namespace

This commit is contained in:
BigBahss 2021-02-18 03:38:34 -05:00
parent bc2cc7d089
commit c3718e28be
3 changed files with 4 additions and 13 deletions

View file

@ -4,13 +4,9 @@
#include "metatile.h" #include "metatile.h"
#include <QList> #include <QList>
#include <QString>
class MetatileParser namespace MetatileParser {
{
public:
MetatileParser();
QList<Metatile*> parse(QString filepath, bool *error, bool primaryTileset); QList<Metatile*> parse(QString filepath, bool *error, bool primaryTileset);
}; }
#endif // METATILEPARSER_H #endif // METATILEPARSER_H

View file

@ -2,11 +2,7 @@
#include "config.h" #include "config.h"
#include "log.h" #include "log.h"
#include "project.h" #include "project.h"
#include <QString>
MetatileParser::MetatileParser()
{
}
QList<Metatile*> MetatileParser::parse(QString filepath, bool *error, bool primaryTileset) QList<Metatile*> MetatileParser::parse(QString filepath, bool *error, bool primaryTileset)
{ {

View file

@ -878,9 +878,8 @@ void TilesetEditor::importTilesetMetatiles(Tileset *tileset, bool primary)
return; return;
} }
MetatileParser parser;
bool error = false; bool error = false;
QList<Metatile*> metatiles = parser.parse(filepath, &error, primary); QList<Metatile*> metatiles = MetatileParser::parse(filepath, &error, primary);
if (error) { if (error) {
QMessageBox msgBox(this); QMessageBox msgBox(this);
msgBox.setText("Failed to import metatiles from Advance Map 1.92 .bvd file."); msgBox.setText("Failed to import metatiles from Advance Map 1.92 .bvd file.");