13 data_.reserve(256 * 256);
14 for (
int i = 0; i < 256 * 256; i++) {
15 data_.push_back(0xFF);
18 for (
int i = 0; i < 0x500; i += 0x08) {
28 const int offsets[] = {0x00, 0x08, 0x800, 0x808};
33 for (
const auto& tile :
tiles_) {
34 int offset = offsets[i];
35 for (
auto y = 0; y < 0x08; ++y) {
36 for (
auto x = 0; x < 0x08; ++x) {
40 if (tile.horizontal_mirror_ != 0) {
44 if (tile.vertical_mirror_ != 0) {
48 int xpos = ((tile.id_ % 0x10) * 0x08);
49 int ypos = (((tile.id_ / 0x10)) * 0x400);
50 int source = ypos + xpos + (x + (y * 0x80));
52 auto destination = xx + yy + offset + (mx + (my * 0x100));
73 return absl::OkStatus();
78 for (
int i = 0; i < 6 * 0x2000; i++)
tilesheets_.push_back(0xFF);
80 std::vector<uint8_t> test;
81 for (
int i = 0; i < 0x4000; i++) {
84 for (
int i = 0x8000; i < +0x8000 + 0x2000; i++) {
88 auto hud_pal_group =
rom()->palette_group().hud;
93 return absl::OkStatus();
void Create(int width, int height, int depth, std::span< uint8_t > data)
Create a bitmap with the given dimensions and data.
void SetPalette(const SnesPalette &palette)
Set the palette for the bitmap.
absl::Status BuildTileset()
gfx::SnesPalette palette_
std::vector< uint8_t > data_
gfx::Bitmap tilesheets_bmp_
std::vector< uint8_t > test_
std::vector< gfx::TileInfo > tiles_
std::vector< uint8_t > tilesheets_
#define RETURN_IF_ERROR(expression)
#define ASSIGN_OR_RETURN(type_variable_name, expression)
TileInfo GetTilesInfo(uint16_t tile)
constexpr int kBowItemPos
Main namespace for the application.
absl::StatusOr< std::vector< uint8_t > > Load2BppGraphics(const Rom &rom)
Loads 2bpp graphics from Rom data.
Room transition destination.