porymap/include/core/maplayout.h

42 lines
932 B
C
Raw Normal View History

2020-09-13 23:37:55 +01:00
#pragma once
#ifndef MAPLAYOUT_H
#define MAPLAYOUT_H
#include "blockdata.h"
#include "tileset.h"
#include <QImage>
#include <QPixmap>
#include <QString>
class MapLayout {
public:
2021-02-18 00:20:14 +00:00
MapLayout() {
}
2019-02-01 17:43:25 +00:00
static QString layoutConstantFromName(QString mapName);
QString id;
QString name;
QString width;
QString height;
QString border_width;
QString border_height;
QString border_path;
QString blockdata_path;
QString tileset_primary_label;
QString tileset_secondary_label;
2021-02-18 00:20:14 +00:00
Tileset* tileset_primary = nullptr;
Tileset* tileset_secondary = nullptr;
2021-02-14 21:34:17 +00:00
Blockdata blockdata;
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;
struct {
2021-02-14 21:34:17 +00:00
Blockdata blocks;
QSize dimensions;
} lastCommitMapBlocks; // to track map changes
};
#endif // MAPLAYOUT_H