Açıklama Yok

project.h 3.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  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 loadMapTilesets(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. QMap<QString, QStringList> getTilesets();
  67. QStringList getWeathers();
  68. QStringList getMapTypes();
  69. QStringList getBattleScenes();
  70. void readItemNames();
  71. void readFlagNames();
  72. void readVarNames();
  73. void loadEventPixmaps(QList<Event*> objects);
  74. QMap<QString, int> getEventObjGfxConstants();
  75. QString fixGraphicPath(QString path);
  76. void readMapEvents(Map *map);
  77. void loadMapConnections(Map *map);
  78. void loadMapBorder(Map *map);
  79. void saveMapEvents(Map *map);
  80. QStringList readCArray(QString text, QString label);
  81. QString readCIncbin(QString text, QString label);
  82. QMap<QString, int> readCDefines(QString text, QStringList prefixes);
  83. private:
  84. QString getMapLayoutsTableFilepath();
  85. QString getMapLayoutFilepath(QString);
  86. void saveMapHeader(Map*);
  87. void saveMapConnections(Map*);
  88. void updateMapsWithConnections(Map*);
  89. void saveMapsWithConnections();
  90. void saveMapLayoutsTable();
  91. void updateMapLayout(Map*);
  92. void readCDefinesSorted(QString, QStringList, QStringList*);
  93. void readCDefinesSorted(QString, QStringList, QStringList*, QString, int);
  94. void setNewMapHeader(Map* map, int mapIndex);
  95. void setNewMapLayout(Map* map);
  96. void setNewMapBlockdata(Map* map);
  97. void setNewMapBorder(Map *map);
  98. void setNewMapEvents(Map *map);
  99. void setNewMapConnections(Map *map);
  100. };
  101. #endif // PROJECT_H