Overworld porting

This commit is contained in:
Justin Scofield
2022-06-09 22:15:10 -04:00
parent 6311d77509
commit c49e9772a1
6 changed files with 400 additions and 128 deletions

View File

@@ -0,0 +1,26 @@
#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