Нема описа

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  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 = NULL;
  16. QStringList *mapNames = NULL;
  17. QMap<QString, QString> *mapConstantsToMapNames;
  18. QMap<QString, QString> *mapNamesToMapConstants;
  19. QMap<int, QString> *mapAttributesTable;
  20. QMap<QString, QMap<QString, QString>*> *mapAttributes;
  21. QMap<QString, Map*> *map_cache;
  22. Map* loadMap(QString);
  23. Map* getMap(QString);
  24. QMap<QString, Tileset*> *tileset_cache = NULL;
  25. Tileset* loadTileset(QString);
  26. Tileset* getTileset(QString);
  27. Blockdata* readBlockdata(QString);
  28. void loadBlockdata(Map*);
  29. QString readTextFile(QString path);
  30. void saveTextFile(QString path, QString text);
  31. void appendTextFile(QString path, QString text);
  32. void readMapGroups();
  33. void addNewMapToGroup(QString mapName, int groupNum);
  34. QString getNewMapName();
  35. QString getProjectTitle();
  36. QList<QStringList>* getLabelMacros(QList<QStringList>*, QString);
  37. QStringList* getLabelValues(QList<QStringList>*, QString);
  38. void readMapHeader(Map*);
  39. void readMapAttributesTable();
  40. void readAllMapAttributes();
  41. void readMapAttributes(Map*);
  42. void getTilesets(Map*);
  43. void loadTilesetAssets(Tileset*);
  44. void setNewMapHeader(Map* map, int mapIndex);
  45. void setNewMapAttributes(Map* map);
  46. void setNewMapBlockdata(Map* map);
  47. void setNewMapBorder(Map *map);
  48. void setNewMapEvents(Map *map);
  49. void setNewMapConnections(Map *map);
  50. QString getBlockdataPath(Map*);
  51. void saveBlockdata(Map*);
  52. void saveMapBorder(Map*);
  53. void writeBlockdata(QString, Blockdata*);
  54. void saveAllMaps();
  55. void saveMap(Map*);
  56. void saveAllDataStructures();
  57. void saveAllMapAttributes();
  58. void saveMapGroupsTable();
  59. QList<QStringList>* parse(QString text);
  60. QStringList getSongNames();
  61. QString getSongName(int);
  62. QStringList getLocations();
  63. QStringList getVisibilities();
  64. QStringList getWeathers();
  65. QStringList getMapTypes();
  66. QStringList getBattleScenes();
  67. void loadObjectPixmaps(QList<Event*> objects);
  68. QMap<QString, int> getMapObjGfxConstants();
  69. QString fixGraphicPath(QString path);
  70. void readMapEvents(Map *map);
  71. void loadMapConnections(Map *map);
  72. void loadMapBorder(Map *map);
  73. QString getMapBorderPath(Map *map);
  74. void saveMapEvents(Map *map);
  75. QStringList readCArray(QString text, QString label);
  76. QString readCIncbin(QString text, QString label);
  77. QMap<QString, int> readCDefines(QString text, QStringList prefixes);
  78. private:
  79. QString getMapAttributesTableFilepath();
  80. QString getMapAssetsFilepath();
  81. void saveMapHeader(Map*);
  82. void saveMapAttributesTable();
  83. };
  84. #endif // PROJECT_H