|
@@ -609,20 +609,11 @@ QString Project::getSongName(int songNumber) {
|
609
|
609
|
|
610
|
610
|
QMap<QString, int> Project::getMapObjGfxConstants() {
|
611
|
611
|
QMap<QString, int> constants;
|
612
|
|
- QString text = readTextFile(root + "/constants/map_object_constants.inc");
|
|
612
|
+ QString text = readTextFile(root + "/include/constants/map_objects.h");
|
613
|
613
|
if (!text.isNull()) {
|
614
|
|
- QList<QStringList> *commands = parse(text);
|
615
|
|
- for (int i = 0; i < commands->length(); i++) {
|
616
|
|
- QStringList params = commands->value(i);
|
617
|
|
- QString macro = params.value(0);
|
618
|
|
- if (macro == ".set") {
|
619
|
|
- QString constant = params.value(1);
|
620
|
|
- if (constant.startsWith("MAP_OBJ_GFX_")) {
|
621
|
|
- int value = params.value(2).toInt(nullptr, 0);
|
622
|
|
- constants.insert(constant, value);
|
623
|
|
- }
|
624
|
|
- }
|
625
|
|
- }
|
|
614
|
+ QStringList mapObjGfxPrefixes;
|
|
615
|
+ mapObjGfxPrefixes << "MAP_OBJ_GFX_";
|
|
616
|
+ constants = readCDefines(text, mapObjGfxPrefixes);
|
626
|
617
|
}
|
627
|
618
|
return constants;
|
628
|
619
|
}
|