Files
yaze/src/Application/Data/Tile.cc
Justin Scofield c49e9772a1 Overworld porting
2022-06-09 22:15:10 -04:00

27 lines
509 B
C++

#include "Tile.h"
namespace yaze {
namespace Application {
namespace Data {
ushort TileInfo::toShort() {
ushort value = 0;
// vhopppcc cccccccc
if (over_ == 1) {
value |= 0x2000;
};
if (horizontal_mirror_ == 1) {
value |= 0x4000;
};
if (vertical_mirror_ == 1) {
value |= 0x8000;
};
value |= (ushort)((palette_ << 10) & 0x1C00);
value |= (ushort)(id_ & 0x3FF);
return value;
}
} // namespace Data
} // namespace Application
} // namespace yaze