Stop repeated parsing of src/data/object_events

This commit is contained in:
GriffinR
2022-01-24 17:17:31 -05:00
committed by huderlem
parent 366fb5c8a8
commit ddc0f01460
9 changed files with 95 additions and 90 deletions

View File

@@ -18,6 +18,14 @@
#include <QVariant>
#include <QFileSystemWatcher>
struct EventGraphics
{
QImage spritesheet;
int spriteWidth;
int spriteHeight;
bool inanimate;
};
static QString NONE_MAP_CONSTANT = "MAP_NONE";
static QString NONE_MAP_NAME = "None";
@@ -51,6 +59,7 @@ public:
QMap<QString, QString> mapSecToMapHoverName;
QMap<QString, int> mapSectionNameToValue;
QMap<int, QString> mapSectionValueToName;
QMap<QString, EventGraphics*> eventGraphicsMap;
QStringList gfxNames;
QStringList songNames;
QStringList itemNames;
@@ -176,8 +185,10 @@ public:
bool readEventScriptLabels();
bool readObjEventGfxConstants();
bool readSongNames();
bool readEventGraphics();
void setEventPixmap(Event * event, bool forceLoad = false);
void loadEventPixmaps(QList<Event*> objects);
QString fixPalettePath(QString path);
QString fixGraphicPath(QString path);