2017-10-14 00:38:38 -04:00
|
|
|
#ifndef GAMETILE_H
|
|
|
|
#define GAMETILE_H
|
|
|
|
|
|
|
|
#include "common.h"
|
|
|
|
#include "classList.h"
|
2017-10-31 13:52:03 -04:00
|
|
|
#include "condition.h"
|
2018-01-12 05:04:57 -05:00
|
|
|
#include "tileReference.h"
|
2017-10-14 00:38:38 -04:00
|
|
|
|
2018-06-19 11:49:41 -04:00
|
|
|
struct replacement{
|
2018-06-25 13:43:03 -04:00
|
|
|
int frameID;
|
|
|
|
bool hasReplacement;
|
2018-06-19 11:49:41 -04:00
|
|
|
int img;
|
|
|
|
int x;
|
|
|
|
int y;
|
|
|
|
double brightness;
|
|
|
|
};
|
|
|
|
|
2017-10-14 00:38:38 -04:00
|
|
|
class gameTile
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
gameTile();
|
|
|
|
virtual ~gameTile();
|
|
|
|
|
2018-01-12 05:04:57 -05:00
|
|
|
tileReference id;
|
2017-10-14 00:38:38 -04:00
|
|
|
|
2017-10-17 06:33:59 -04:00
|
|
|
int objCoordX;
|
|
|
|
int objCoordY;
|
2017-11-14 09:40:18 -05:00
|
|
|
bool hFlip;
|
|
|
|
bool vFlip;
|
|
|
|
bool markForDelete;
|
2018-02-20 11:23:56 -05:00
|
|
|
bool isUnique;
|
2017-10-17 06:33:59 -04:00
|
|
|
|
2018-06-25 13:43:03 -04:00
|
|
|
|
2017-10-14 00:38:38 -04:00
|
|
|
bool isDefault;
|
|
|
|
vector<condition> conditions;
|
2018-05-08 07:02:58 -04:00
|
|
|
vector<bool> conSigns;
|
2018-06-19 11:49:41 -04:00
|
|
|
|
|
|
|
vector<replacement> aniFrames;
|
2017-10-17 06:33:59 -04:00
|
|
|
|
|
|
|
void readLine(string s);
|
2018-02-15 21:24:06 -05:00
|
|
|
string writeLine();
|
2019-06-29 07:57:54 -04:00
|
|
|
string writeFrameLine(int pFrameID, double pSwapBrightness);
|
2018-07-02 12:42:09 -04:00
|
|
|
|
2018-02-19 23:28:32 -05:00
|
|
|
string writeConditionNames();
|
2018-02-15 21:24:06 -05:00
|
|
|
bool compareEqual(gameTile& t);
|
2018-02-07 09:59:45 -05:00
|
|
|
void load(fstream& file);
|
|
|
|
void save(fstream& file);
|
2020-11-12 11:22:40 -05:00
|
|
|
gameTile clone();
|
2017-10-14 00:38:38 -04:00
|
|
|
protected:
|
|
|
|
|
|
|
|
private:
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // GAMETILE_H
|