2020-09-13 23:37:55 +01:00
|
|
|
#pragma once
|
2018-09-23 00:47:28 +01:00
|
|
|
#ifndef METATILE_H
|
|
|
|
#define METATILE_H
|
|
|
|
|
|
|
|
#include "tile.h"
|
|
|
|
#include <QImage>
|
2020-09-27 17:17:12 +01:00
|
|
|
#include <QPoint>
|
2019-04-04 06:44:31 +01:00
|
|
|
#include <QString>
|
2018-09-23 00:47:28 +01:00
|
|
|
|
2021-11-23 21:11:07 +00:00
|
|
|
enum {
|
|
|
|
METATILE_LAYER_MIDDLE_TOP,
|
|
|
|
METATILE_LAYER_BOTTOM_MIDDLE,
|
|
|
|
METATILE_LAYER_BOTTOM_TOP,
|
|
|
|
NUM_METATILE_LAYER_TYPES
|
|
|
|
};
|
|
|
|
|
|
|
|
enum {
|
|
|
|
ENCOUNTER_NONE,
|
|
|
|
ENCOUNTER_LAND,
|
|
|
|
ENCOUNTER_WATER,
|
|
|
|
NUM_METATILE_ENCOUNTER_TYPES
|
|
|
|
};
|
|
|
|
|
|
|
|
enum {
|
|
|
|
TERRAIN_NONE,
|
|
|
|
TERRAIN_GRASS,
|
|
|
|
TERRAIN_WATER,
|
|
|
|
TERRAIN_WATERFALL,
|
|
|
|
NUM_METATILE_TERRAIN_TYPES
|
|
|
|
};
|
|
|
|
|
2018-09-23 00:47:28 +01:00
|
|
|
class Metatile
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
Metatile();
|
2021-02-16 18:22:41 +00:00
|
|
|
Metatile(const Metatile &other) = default;
|
|
|
|
Metatile &operator=(const Metatile &other) = default;
|
|
|
|
|
2018-09-23 00:47:28 +01:00
|
|
|
public:
|
2021-02-16 17:14:27 +00:00
|
|
|
QList<Tile> tiles;
|
2020-03-16 20:31:08 +00:00
|
|
|
uint16_t behavior; // 8 bits RSE, 9 bits FRLG
|
2018-10-03 01:01:09 +01:00
|
|
|
uint8_t layerType;
|
2020-03-16 20:31:08 +00:00
|
|
|
uint8_t encounterType; // FRLG only
|
|
|
|
uint8_t terrainType; // FRLG only
|
2019-04-04 06:44:31 +01:00
|
|
|
QString label;
|
2018-09-23 00:47:28 +01:00
|
|
|
|
2022-01-04 02:35:15 +00:00
|
|
|
static int getIndexInTileset(int);
|
2020-09-27 17:17:12 +01:00
|
|
|
static QPoint coordFromPixmapCoord(const QPointF &pixelCoord);
|
2018-09-23 00:47:28 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // METATILE_H
|