2020-09-13 23:37:55 +01:00
|
|
|
#pragma once
|
2018-09-23 00:47:28 +01:00
|
|
|
#ifndef BLOCK_H
|
|
|
|
#define BLOCK_H
|
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
|
|
|
|
class Block
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
Block();
|
|
|
|
Block(uint16_t);
|
2021-11-24 04:53:41 +00:00
|
|
|
Block(uint16_t metatileId, uint16_t collision, uint16_t elevation);
|
2021-02-14 17:37:51 +00:00
|
|
|
Block(const Block &);
|
|
|
|
Block &operator=(const Block &);
|
2021-02-14 20:10:03 +00:00
|
|
|
bool operator ==(Block) const;
|
|
|
|
bool operator !=(Block) const;
|
2023-12-13 07:30:22 +00:00
|
|
|
void setMetatileId(uint16_t metatileId);
|
|
|
|
void setCollision(uint16_t collision);
|
|
|
|
void setElevation(uint16_t elevation);
|
2023-12-12 23:32:54 +00:00
|
|
|
uint16_t metatileId() const { return m_metatileId; }
|
|
|
|
uint16_t collision() const { return m_collision; }
|
|
|
|
uint16_t elevation() const { return m_elevation; }
|
2021-02-14 20:10:03 +00:00
|
|
|
uint16_t rawValue() const;
|
2023-12-13 07:30:22 +00:00
|
|
|
static void setLayout();
|
|
|
|
static uint16_t getMaxMetatileId();
|
|
|
|
static uint16_t getMaxCollision();
|
|
|
|
static uint16_t getMaxElevation();
|
2023-12-12 23:32:54 +00:00
|
|
|
|
2023-12-15 19:33:36 +00:00
|
|
|
static const uint16_t maxValue;
|
|
|
|
|
2023-12-12 23:32:54 +00:00
|
|
|
private:
|
2023-12-15 19:33:36 +00:00
|
|
|
uint16_t m_metatileId;
|
|
|
|
uint16_t m_collision;
|
|
|
|
uint16_t m_elevation;
|
2018-09-23 00:47:28 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // BLOCK_H
|