Bez popisu

project.h 2.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  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 readMapGroups();
  32. void addNewMapToGroup(QString mapName, int groupNum);
  33. QString getNewMapName();
  34. QString getProjectTitle();
  35. QList<QStringList>* getLabelMacros(QList<QStringList>*, QString);
  36. QStringList* getLabelValues(QList<QStringList>*, QString);
  37. void readMapHeader(Map*);
  38. void readMapAttributesTable();
  39. void readAllMapAttributes();
  40. void readMapAttributes(Map*);
  41. void getTilesets(Map*);
  42. void loadTilesetAssets(Tileset*);
  43. void setNewMapHeader(Map* map, int mapIndex);
  44. void setNewMapAttributes(Map* map);
  45. void setNewMapBlockdata(Map* map);
  46. void setNewMapBorder(Map *map);
  47. void setNewMapEvents(Map *map);
  48. void setNewMapConnections(Map *map);
  49. QString getBlockdataPath(Map*);
  50. void saveBlockdata(Map*);
  51. void writeBlockdata(QString, Blockdata*);
  52. void saveAllMaps();
  53. void saveMap(Map*);
  54. void saveAllDataStructures();
  55. void saveAllMapAttributes();
  56. QList<QStringList>* parse(QString text);
  57. QStringList getSongNames();
  58. QString getSongName(int);
  59. QStringList getLocations();
  60. QStringList getVisibilities();
  61. QStringList getWeathers();
  62. QStringList getMapTypes();
  63. QStringList getBattleScenes();
  64. void loadObjectPixmaps(QList<Event*> objects);
  65. QMap<QString, int> getMapObjGfxConstants();
  66. QString fixGraphicPath(QString path);
  67. void readMapEvents(Map *map);
  68. void loadMapConnections(Map *map);
  69. void loadMapBorder(Map *map);
  70. QString getMapBorderPath(Map *map);
  71. void saveMapEvents(Map *map);
  72. QStringList readCArray(QString text, QString label);
  73. QString readCIncbin(QString text, QString label);
  74. QMap<QString, int> readCDefines(QString text, QStringList prefixes);
  75. private:
  76. QString getMapAttributesTableFilepath();
  77. QString getMapAssetsFilepath();
  78. void saveMapHeader(Map*);
  79. void saveMapAttributesTable();
  80. };
  81. #endif // PROJECT_H