HDNes/hdnesPackEditor/coreData.h

71 lines
1.6 KiB
C
Raw Permalink Normal View History

2017-08-31 07:39:29 -04:00
#ifndef COREDATA_H
#define COREDATA_H
2017-08-31 20:05:38 -04:00
#include "common.h"
#include "classList.h"
2017-09-09 06:52:24 -04:00
#include <wx/wx.h>
2017-08-31 07:39:29 -04:00
class coreData
{
public:
2017-08-31 20:05:38 -04:00
static coreData* cData;
2017-08-31 07:39:29 -04:00
coreData();
virtual ~coreData();
2017-09-17 14:43:53 -04:00
//project data
2017-08-31 07:39:29 -04:00
string romPath;
string packPath;
2017-08-31 20:05:38 -04:00
string projectPath;
2017-09-17 14:43:53 -04:00
bool notSaved;
2017-08-31 20:05:38 -04:00
//rom data
2017-09-05 10:19:56 -04:00
bool isCHRROM;
2017-09-15 16:30:36 -04:00
Uint32 romSize;
2017-09-05 10:19:56 -04:00
Uint8* romData;
2017-08-31 07:39:29 -04:00
2017-08-31 20:05:38 -04:00
//pack data
2018-02-15 21:24:06 -05:00
vector<string> supportedRom;
vector<string> overscan;
vector<string> patch;
vector<string> background;
vector<string> options;
vector<string> bgm;
vector<string> sfx;
2018-10-17 01:17:51 -04:00
Uint32 verNo;
2017-09-02 06:19:04 -04:00
Uint8 scale;
2017-08-31 20:05:38 -04:00
vector<image*> images;
2017-09-02 06:19:04 -04:00
vector<condition*> conditions;
2017-10-14 00:38:38 -04:00
vector<gameTile*> tiles;
2017-09-09 06:52:24 -04:00
wxColour palette[64];
2018-02-15 21:24:06 -05:00
int saveNo;
2017-08-31 20:05:38 -04:00
2017-09-17 14:43:53 -04:00
void dataChanged();
void initPath(string rPath, string pPath);
2017-08-31 20:05:38 -04:00
void load(string path);
void save();
void saveAs(string path);
2018-04-27 14:17:13 -04:00
void checkAndLoadPaths();
void loadProjectData();
2017-08-31 20:05:38 -04:00
2018-02-19 23:28:32 -05:00
string writeConditionNames(vector<condition>& cond);
2017-08-31 20:05:38 -04:00
void loadPackData();
2018-02-15 21:24:06 -05:00
void genPackData();
void genSection(fstream& inifile, vector<string>& sect);
2017-08-31 20:05:38 -04:00
void loadRom();
2017-09-19 07:08:05 -04:00
void loadPalette();
2018-02-15 21:24:06 -05:00
void genPalette();
2017-09-29 08:02:13 -04:00
string getTileID(int tileIndex);
void loadScreenData();
void readScreen(string screenId);
2017-09-17 14:43:53 -04:00
2018-01-05 09:44:03 -05:00
void addImage(string path);
void removeImage(int index);
2017-08-31 07:39:29 -04:00
protected:
private:
};
#endif // COREDATA_H