Нема описа

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  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 mapsWithConnections;
  27. QMap<QString, Map*> *map_cache;
  28. Map* loadMap(QString);
  29. Map* getMap(QString);
  30. QMap<QString, Tileset*> *tileset_cache = NULL;
  31. Tileset* loadTileset(QString);
  32. Tileset* getTileset(QString);
  33. Blockdata* readBlockdata(QString);
  34. void loadBlockdata(Map*);
  35. QString readTextFile(QString path);
  36. void saveTextFile(QString path, QString text);
  37. void appendTextFile(QString path, QString text);
  38. void deleteFile(QString path);
  39. void readMapGroups();
  40. Map* addNewMapToGroup(QString mapName, int groupNum);
  41. QString getNewMapName();
  42. QString getProjectTitle();
  43. QList<QStringList>* getLabelMacros(QList<QStringList>*, QString);
  44. QStringList* getLabelValues(QList<QStringList>*, QString);
  45. void readMapHeader(Map*);
  46. void readMapLayoutsTable();
  47. void readAllMapLayouts();
  48. QStringList* readLayoutValues(QString layoutName);
  49. void readMapLayout(Map*);
  50. void readMapsWithConnections();
  51. void getTilesets(Map*);
  52. void loadTilesetAssets(Tileset*);
  53. void saveBlockdata(Map*);
  54. void saveMapBorder(Map*);
  55. void writeBlockdata(QString, Blockdata*);
  56. void saveAllMaps();
  57. void saveMap(Map*);
  58. void saveAllDataStructures();
  59. void saveAllMapLayouts();
  60. void saveMapGroupsTable();
  61. void saveMapConstantsHeader();
  62. QList<QStringList>* parseAsm(QString text);
  63. QStringList getSongNames();
  64. QStringList getLocations();
  65. QStringList getVisibilities();
  66. QStringList getWeathers();
  67. QStringList getMapTypes();
  68. QStringList getBattleScenes();
  69. void readItemNames();
  70. void readFlagNames();
  71. void readVarNames();
  72. void loadEventPixmaps(QList<Event*> objects);
  73. QMap<QString, int> getEventObjGfxConstants();
  74. QString fixGraphicPath(QString path);
  75. void readMapEvents(Map *map);
  76. void loadMapConnections(Map *map);
  77. void loadMapBorder(Map *map);
  78. void saveMapEvents(Map *map);
  79. QStringList readCArray(QString text, QString label);
  80. QString readCIncbin(QString text, QString label);
  81. QMap<QString, int> readCDefines(QString text, QStringList prefixes);
  82. private:
  83. QString getMapLayoutsTableFilepath();
  84. QString getMapLayoutFilepath(QString);
  85. void saveMapHeader(Map*);
  86. void saveMapConnections(Map*);
  87. void updateMapsWithConnections(Map*);
  88. void saveMapsWithConnections();
  89. void saveMapLayoutsTable();
  90. void updateMapLayout(Map*);
  91. void readCDefinesSorted(QString, QStringList, QStringList*);
  92. void readCDefinesSorted(QString, QStringList, QStringList*, QString, int);
  93. void setNewMapHeader(Map* map, int mapIndex);
  94. void setNewMapLayout(Map* map);
  95. void setNewMapBlockdata(Map* map);
  96. void setNewMapBorder(Map *map);
  97. void setNewMapEvents(Map *map);
  98. void setNewMapConnections(Map *map);
  99. };
  100. #endif // PROJECT_H