2020-09-13 23:37:55 +01:00
|
|
|
#pragma once
|
2018-09-23 22:32:07 +01:00
|
|
|
#ifndef MAPLAYOUT_H
|
|
|
|
#define MAPLAYOUT_H
|
|
|
|
|
|
|
|
#include "blockdata.h"
|
|
|
|
#include "tileset.h"
|
|
|
|
#include <QImage>
|
|
|
|
#include <QPixmap>
|
|
|
|
#include <QString>
|
|
|
|
|
|
|
|
class MapLayout {
|
|
|
|
public:
|
|
|
|
MapLayout() {}
|
2019-02-01 17:43:25 +00:00
|
|
|
static QString layoutConstantFromName(QString mapName);
|
|
|
|
QString id;
|
2018-09-23 22:32:07 +01:00
|
|
|
QString name;
|
|
|
|
QString width;
|
|
|
|
QString height;
|
2020-03-13 06:23:47 +00:00
|
|
|
QString border_width;
|
|
|
|
QString border_height;
|
2018-09-23 22:32:07 +01:00
|
|
|
QString border_path;
|
|
|
|
QString blockdata_path;
|
|
|
|
QString tileset_primary_label;
|
|
|
|
QString tileset_secondary_label;
|
|
|
|
Tileset *tileset_primary = nullptr;
|
|
|
|
Tileset *tileset_secondary = nullptr;
|
2021-02-14 21:34:17 +00:00
|
|
|
Blockdata blockdata;
|
2018-09-23 22:32:07 +01:00
|
|
|
QImage border_image;
|
|
|
|
QPixmap border_pixmap;
|
2021-02-14 21:34:17 +00:00
|
|
|
Blockdata border;
|
|
|
|
Blockdata cached_blockdata;
|
|
|
|
Blockdata cached_collision;
|
|
|
|
Blockdata cached_border;
|
2020-08-04 01:49:00 +01:00
|
|
|
struct {
|
2021-02-14 21:34:17 +00:00
|
|
|
Blockdata blocks;
|
2020-08-04 01:49:00 +01:00
|
|
|
QSize dimensions;
|
|
|
|
} lastCommitMapBlocks; // to track map changes
|
2021-07-20 03:02:31 +01:00
|
|
|
|
|
|
|
int getWidth();
|
|
|
|
int getHeight();
|
|
|
|
int getBorderWidth();
|
|
|
|
int getBorderHeight();
|
2018-09-23 22:32:07 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // MAPLAYOUT_H
|