Begin refactoring Blockdata to simply inherit QVector<Block>

This commit is contained in:
BigBahss
2021-02-14 15:10:03 -05:00
committed by huderlem
parent 8e2388cf62
commit 42b56edc9d
14 changed files with 174 additions and 288 deletions

View File

@@ -27,17 +27,17 @@ Block &Block::operator=(const Block &other) {
return *this;
}
uint16_t Block::rawValue() {
uint16_t Block::rawValue() const {
return static_cast<uint16_t>(
(tile & 0x3ff) +
((collision & 0x3) << 10) +
((elevation & 0xf) << 12));
}
bool Block::operator ==(Block other) {
bool Block::operator ==(Block other) const {
return (tile == other.tile) && (collision == other.collision) && (elevation == other.elevation);
}
bool Block::operator !=(Block other) {
bool Block::operator !=(Block other) const {
return !(operator ==(other));
}