diff --git a/src/project.cpp b/src/project.cpp index 0942c101..62f12185 100644 --- a/src/project.cpp +++ b/src/project.cpp @@ -2218,10 +2218,15 @@ bool Project::readSecretBaseIds() { if (!projectConfig.getEventSecretBaseEnabled()) return true; + // SECRET_BASE_GROUP is a function-like macro, which Porymap can't handle. + // Redefine it so Porymap won't produce spurious errors about failing to parse it. + QMap knownDefines = QMap(); + knownDefines.insert("SECRET_BASE_GROUP", 0); + QStringList prefixes("\\bSECRET_BASE_[A-Za-z0-9_]*_[0-9]+"); QString filename = "include/constants/secret_bases.h"; fileWatcher.addPath(root + "/" + filename); - secretBaseIds = parser.readCDefinesSorted(filename, prefixes); + secretBaseIds = parser.readCDefinesSorted(filename, prefixes, knownDefines); if (secretBaseIds.isEmpty()) { logError(QString("Failed to read secret base id constants from %1").arg(filename)); return false;