暂无描述

project.h 2.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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, Map*> *map_cache;
  21. Map* loadMap(QString);
  22. Map* getMap(QString);
  23. QMap<QString, Tileset*> *tileset_cache = NULL;
  24. Tileset* loadTileset(QString);
  25. Tileset* getTileset(QString);
  26. Blockdata* readBlockdata(QString);
  27. void loadBlockdata(Map*);
  28. QString readTextFile(QString path);
  29. void saveTextFile(QString path, QString text);
  30. void readMapGroups();
  31. void addNewMapToGroup(QString mapName, int groupNum);
  32. QString getNewMapName();
  33. QString getProjectTitle();
  34. QList<QStringList>* getLabelMacros(QList<QStringList>*, QString);
  35. QStringList* getLabelValues(QList<QStringList>*, QString);
  36. void readMapHeader(Map*);
  37. void readMapAttributesTable();
  38. void readMapAttributes(Map*);
  39. void getTilesets(Map*);
  40. void loadTilesetAssets(Tileset*);
  41. QString getBlockdataPath(Map*);
  42. void saveBlockdata(Map*);
  43. void writeBlockdata(QString, Blockdata*);
  44. void saveAllMaps();
  45. void saveMap(Map*);
  46. void saveAllDataStructures();
  47. QList<QStringList>* parse(QString text);
  48. QStringList getSongNames();
  49. QString getSongName(int);
  50. QStringList getLocations();
  51. QStringList getVisibilities();
  52. QStringList getWeathers();
  53. QStringList getMapTypes();
  54. QStringList getBattleScenes();
  55. void loadObjectPixmaps(QList<Event*> objects);
  56. QMap<QString, int> getMapObjGfxConstants();
  57. QString fixGraphicPath(QString path);
  58. void readMapEvents(Map *map);
  59. void loadMapConnections(Map *map);
  60. void loadMapBorder(Map *map);
  61. QString getMapBorderPath(Map *map);
  62. void saveMapEvents(Map *map);
  63. QStringList readCArray(QString text, QString label);
  64. QString readCIncbin(QString text, QString label);
  65. QMap<QString, int> readCDefines(QString text, QStringList prefixes);
  66. private:
  67. QString getMapAttributesTableFilepath();
  68. void saveMapHeader(Map*);
  69. void saveMapAttributesTable();
  70. };
  71. #endif // PROJECT_H