mirror of
https://github.com/huderlem/porymap.git
synced 2026-08-11 11:26:00 -05:00
Stop repeated parsing of src/data/object_events
This commit is contained in:
@@ -83,7 +83,7 @@ public:
|
||||
OrderedJson::object buildSignEventJSON();
|
||||
OrderedJson::object buildHiddenItemEventJSON();
|
||||
OrderedJson::object buildSecretBaseEventJSON();
|
||||
void setPixmapFromSpritesheet(QImage, int, int, int, bool);
|
||||
void setPixmapFromSpritesheet(QImage, int, int, bool);
|
||||
int getPixelX();
|
||||
int getPixelY();
|
||||
QMap<QString, bool> getExpectedFields();
|
||||
@@ -99,7 +99,6 @@ public:
|
||||
int frame = 0;
|
||||
bool hFlip = false;
|
||||
bool usingSprite;
|
||||
bool inanimate;
|
||||
|
||||
DraggablePixmapItem *pixmapItem = nullptr;
|
||||
void setPixmapItem(DraggablePixmapItem *item) { pixmapItem = item; }
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user