설명 없음

project.h 4.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. #ifndef PROJECT_H
  2. #define PROJECT_H
  3. #include "map.h"
  4. #include "blockdata.h"
  5. #include <QStringList>
  6. #include <QList>
  7. #include <QStandardItem>
  8. class Project
  9. {
  10. public:
  11. Project();
  12. QString root;
  13. QStringList *groupNames = NULL;
  14. QMap<QString, int> *map_groups;
  15. QList<QStringList> groupedMapNames;
  16. QStringList *mapNames = NULL;
  17. QMap<QString, QString>* mapConstantsToMapNames;
  18. QMap<QString, QString>* mapNamesToMapConstants;
  19. QList<QString> mapLayoutsTable;
  20. QList<QString> mapLayoutsTableMaster;
  21. QMap<QString, MapLayout*> mapLayouts;
  22. QMap<QString, MapLayout*> mapLayoutsMaster;
  23. QStringList *itemNames = NULL;
  24. QStringList *flagNames = NULL;
  25. QStringList *varNames = NULL;
  26. QStringList *movementTypes = NULL;
  27. QStringList *coordEventWeatherNames = NULL;
  28. QStringList *secretBaseIds = NULL;
  29. QStringList *bgEventFacingDirections = NULL;
  30. QStringList mapsWithConnections;
  31. QMap<QString, Map*> *map_cache;
  32. Map* loadMap(QString);
  33. Map* getMap(QString);
  34. QMap<QString, Tileset*> *tileset_cache = NULL;
  35. Tileset* loadTileset(QString);
  36. Tileset* getTileset(QString);
  37. Blockdata* readBlockdata(QString);
  38. void loadBlockdata(Map*);
  39. QString readTextFile(QString path);
  40. void saveTextFile(QString path, QString text);
  41. void appendTextFile(QString path, QString text);
  42. void deleteFile(QString path);
  43. void readMapGroups();
  44. Map* addNewMapToGroup(QString mapName, int groupNum);
  45. QString getNewMapName();
  46. QString getProjectTitle();
  47. QList<QStringList>* getLabelMacros(QList<QStringList>*, QString);
  48. QStringList* getLabelValues(QList<QStringList>*, QString);
  49. void readMapHeader(Map*);
  50. void readMapLayoutsTable();
  51. void readAllMapLayouts();
  52. QStringList* readLayoutValues(QString layoutName);
  53. void readMapLayout(Map*);
  54. void readMapsWithConnections();
  55. void loadMapTilesets(Map*);
  56. void loadTilesetAssets(Tileset*);
  57. void saveBlockdata(Map*);
  58. void saveMapBorder(Map*);
  59. void writeBlockdata(QString, Blockdata*);
  60. void saveAllMaps();
  61. void saveMap(Map*);
  62. void saveAllDataStructures();
  63. void saveAllMapLayouts();
  64. void saveMapGroupsTable();
  65. void saveMapConstantsHeader();
  66. QList<QStringList>* parseAsm(QString text);
  67. QStringList getSongNames();
  68. QStringList getLocations();
  69. QStringList getVisibilities();
  70. QMap<QString, QStringList> getTilesets();
  71. QStringList getWeathers();
  72. QStringList getMapTypes();
  73. QStringList getBattleScenes();
  74. void readItemNames();
  75. void readFlagNames();
  76. void readVarNames();
  77. void readMovementTypes();
  78. void readCoordEventWeatherNames();
  79. void readSecretBaseIds();
  80. void readBgEventFacingDirections();
  81. void loadEventPixmaps(QList<Event*> objects);
  82. QMap<QString, int> getEventObjGfxConstants();
  83. QString fixGraphicPath(QString path);
  84. void readMapEvents(Map *map);
  85. void loadMapConnections(Map *map);
  86. void loadMapBorder(Map *map);
  87. void saveMapEvents(Map *map);
  88. QStringList readCArray(QString text, QString label);
  89. QString readCIncbin(QString text, QString label);
  90. QMap<QString, int> readCDefines(QString text, QStringList prefixes);
  91. private:
  92. QString getMapLayoutsTableFilepath();
  93. QString getMapLayoutFilepath(QString);
  94. void saveMapHeader(Map*);
  95. void saveMapConnections(Map*);
  96. void updateMapsWithConnections(Map*);
  97. void saveMapsWithConnections();
  98. void saveMapLayoutsTable();
  99. void updateMapLayout(Map*);
  100. void readCDefinesSorted(QString, QStringList, QStringList*);
  101. void readCDefinesSorted(QString, QStringList, QStringList*, QString, int);
  102. void setNewMapHeader(Map* map, int mapIndex);
  103. void setNewMapLayout(Map* map);
  104. void setNewMapBlockdata(Map* map);
  105. void setNewMapBorder(Map *map);
  106. void setNewMapEvents(Map *map);
  107. void setNewMapConnections(Map *map);
  108. };
  109. #endif // PROJECT_H