1#ifndef YAZE_APP_GFX_SNES_TILE_H
2#define YAZE_APP_GFX_SNES_TILE_H
19 0x08, 0x04, 0x02, 0x01};
38std::vector<uint8_t>
ConvertBpp(
const std::vector<uint8_t>& tiles,
39 uint32_t from_bpp, uint32_t to_bpp);
60 TileInfo(uint16_t
id, uint8_t palette,
bool v,
bool h,
bool o)
95 Tile32(uint16_t t0, uint16_t t1, uint16_t t2, uint16_t t3)
107 tile0_ = (uint16_t)packedVal;
108 tile1_ = (uint16_t)(packedVal >> 16);
109 tile2_ = (uint16_t)(packedVal >> 32);
110 tile3_ = (uint16_t)(packedVal >> 48);
115 return static_cast<uint64_t
>(
tile3_) << 48 |
116 (
static_cast<uint64_t
>(
tile2_) << 32) |
170 OamTile(
int x,
int y, uint16_t tile,
int pal,
bool upper =
false,
int mx = 0,
174 tile_ = (uint16_t)(tile + 512);
176 tile_ = (uint16_t)(tile + 256 + 512);
Object Attribute Memory tile abstraction container.
OamTile(int x, int y, uint16_t tile, int pal, bool upper=false, int mx=0, int my=0)
Tile composition of four 8x8 tiles.
std::vector< TileInfo > tiles_info
bool operator==(const Tile16 &other) const
bool operator!=(const Tile16 &other) const
Tile16(TileInfo t0, TileInfo t1, TileInfo t2, TileInfo t3)
Tile composition of four 16x16 tiles.
Tile32(const Tile32 &other)
bool operator!=(const Tile32 &other) const
Tile32(uint16_t t0, uint16_t t1, uint16_t t2, uint16_t t3)
uint64_t GetPackedValue() const
bool operator==(const Tile32 &other) const
Tile32(uint64_t packedVal)
SNES 16-bit tile metadata container.
TileInfo(uint16_t id, uint8_t palette, bool v, bool h, bool o)
bool operator==(const TileInfo &other) const
std::vector< uint8_t > Convert4bppTo3bpp(const std::vector< uint8_t > &tiles)
TileInfo WordToTileInfo(uint16_t word)
constexpr int kTilesheetDepth
std::vector< uint8_t > PackBppTile(const tile8 &tile, const uint32_t bpp)
std::vector< uint8_t > Bpp8SnesToIndexed(std::vector< uint8_t > data, uint64_t bpp)
constexpr int kTilesheetWidth
std::vector< uint8_t > SnesTo8bppSheet(const std::vector< uint8_t > &sheet, int bpp)
uint16_t TileInfoToShort(TileInfo tile_info)
tile8 UnpackBppTile(const std::vector< uint8_t > &data, const uint32_t offset, const uint32_t bpp)
constexpr uint8_t kGraphicsBitmap[8]
std::vector< uint8_t > ConvertBpp(const std::vector< uint8_t > &tiles, uint32_t from_bpp, uint32_t to_bpp)
std::vector< uint8_t > Convert3bppTo4bpp(const std::vector< uint8_t > &tiles)
constexpr int kTilesheetHeight
uint16_t TileInfoToWord(TileInfo tile_info)
TileInfo GetTilesInfo(uint16_t tile)