From b83ead44d0e4c875cfa2507f27aa48363b69ca4e Mon Sep 17 00:00:00 2001 From: garak Date: Fri, 22 Nov 2019 11:06:11 -0500 Subject: [PATCH] update to use new object event file and variable names --- src/mainwindow.cpp | 2 +- src/project.cpp | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 6f9a3989..fc0c2f12 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -1471,7 +1471,7 @@ void MainWindow::updateSelectedObjects() { combo->addItem("NONE", "0"); combo->addItem("NORMAL", "1"); combo->addItem("SEE ALL DIRECTIONS", "3"); - combo->setToolTip("The trainer type of this event object.\n" + combo->setToolTip("The trainer type of this object event.\n" "If it is not a trainer, use NONE. SEE ALL DIRECTIONS\n" "should only be used with a sight radius of 1."); combo->setMinimumContentsLength(10); diff --git a/src/project.cpp b/src/project.cpp index 837e306e..b0477163 100644 --- a/src/project.cpp +++ b/src/project.cpp @@ -1852,7 +1852,7 @@ bool Project::readVarNames() { bool Project::readMovementTypes() { movementTypes->clear(); QStringList prefixes = (QStringList() << "MOVEMENT_TYPE_"); - QString filename = "include/constants/event_object_movement_constants.h"; + QString filename = "include/constants/event_object_movement.h"; parser.readCDefinesSorted(filename, prefixes, movementTypes); if (movementTypes->isEmpty()) { logError(QString("Failed to read movement type constants from %1").arg(filename)); @@ -1934,7 +1934,7 @@ bool Project::readSecretBaseIds() { bool Project::readBgEventFacingDirections() { bgEventFacingDirections->clear(); QStringList prefixes = (QStringList() << "BG_EVENT_PLAYER_FACING_"); - QString filename = "include/constants/bg_event_constants.h"; + QString filename = "include/constants/event_bg.h"; parser.readCDefinesSorted(filename, prefixes, bgEventFacingDirections); if (bgEventFacingDirections->isEmpty()) { logError(QString("Failed to read bg event facing direction constants from %1").arg(filename)); @@ -1972,7 +1972,7 @@ QStringList Project::getSongNames() { QMap Project::getEventObjGfxConstants() { QStringList eventObjGfxPrefixes; - eventObjGfxPrefixes << "EVENT_OBJ_GFX_"; + eventObjGfxPrefixes << "OBJ_EVENT_GFX_"; QMap constants = parser.readCDefines("include/constants/event_objects.h", eventObjGfxPrefixes); @@ -2029,7 +2029,7 @@ void Project::loadEventPixmaps(QList objects) { QMap constants = getEventObjGfxConstants(); - QMap pointerHash = parser.readNamedIndexCArray("src/data/field_event_obj/event_object_graphics_info_pointers.h", "gEventObjectGraphicsInfoPointers"); + QMap pointerHash = parser.readNamedIndexCArray("src/data/object_event/event_object_graphics_info_pointers.h", "gObjectEventGraphicsInfoPointers"); for (Event *object : objects) { if (!object->pixmap.isNull()) { @@ -2054,13 +2054,13 @@ void Project::loadEventPixmaps(QList objects) { if (event_type == EventType::Object) { QString info_label = pointerHash[object->get("sprite")].replace("&", ""); - QStringList gfx_info = parser.readCArray("src/data/field_event_obj/event_object_graphics_info.h", info_label); + QStringList gfx_info = parser.readCArray("src/data/object_event/event_object_graphics_info.h", info_label); QString pic_label = gfx_info.value(14); QString dimensions_label = gfx_info.value(11); QString subsprites_label = gfx_info.value(12); - QString gfx_label = parser.readCArray("src/data/field_event_obj/event_object_pic_tables.h", pic_label).value(0); + QString gfx_label = parser.readCArray("src/data/object_event/event_object_pic_tables.h", pic_label).value(0); gfx_label = gfx_label.section(QRegExp("[\\(\\)]"), 1, 1); - QString path = parser.readCIncbin("src/data/field_event_obj/event_object_graphics.h", gfx_label); + QString path = parser.readCIncbin("src/data/object_event/event_object_graphics.h", gfx_label); if (!path.isNull()) { path = fixGraphicPath(path);