1#ifndef YAZE_ZELDA3_GFX_SHEET_PNG_H
2#define YAZE_ZELDA3_GFX_SHEET_PNG_H
9#include "absl/status/statusor.h"
48 const std::vector<uint8_t>& snes_3bpp,
const SheetPalette& palette,
49 int first_block = 0,
int block_count = 16);
88 uint8_t header_blockset);
106 Rom& rom, GameData& data,
int room,
int slot,
int row);
110 const Rom& rom,
const GameData& data);
116 const Rom& rom,
const RoomBackgroundSet& set,
const SheetPalette& palette);
The Rom class is used to load, save, and modify Rom data. This is a generic SNES ROM container and do...
Zelda 3 specific classes and functions.
std::vector< RoomBackgroundSet > ResolveAllRoomBackgroundSets(const Rom &rom, const GameData &data)
All 296 rooms' background sets (header bytes read from the ROM).
absl::StatusOr< RoomSheetPaletteContext > ResolveRoomSheetPalette(Rom &rom, GameData &data, int room, int slot, int row)
absl::StatusOr< std::vector< uint8_t > > ExportRoomBackgroundPng(const Rom &rom, const RoomBackgroundSet &set, const SheetPalette &palette)
absl::StatusOr< SheetImportResult > ImportSheetBlocksPng(const std::vector< uint8_t > &snes_3bpp, const util::PngImage &png, int first_block, const SheetPalette &palette)
Places a PNG's 16x16 blocks over a sheet from first_block.
RoomBackgroundSet ResolveRoomBackgroundSet(const GameData &data, int room, uint8_t header_blockset)
std::array< uint8_t, 3 > SheetColor
std::array< SheetColor, 8 > SheetPalette
Colors for 3bpp indices 0-7. Index 0 is exported as transparent.
absl::StatusOr< SheetPalette > RoomSpriteSheetPalette(Rom &rom, GameData &data, int room, int row)
Sprite palette row (OAM palette 0-7, CGRAM row 8 + row) of room room.
absl::StatusOr< std::vector< uint8_t > > ExportSheetBlocksPng(const std::vector< uint8_t > &snes_3bpp, const SheetPalette &palette, int first_block, int block_count)
SheetPalette GrayscaleSheetPalette()
absl::StatusOr< SheetPalette > RoomBackgroundSheetPalette(Rom &rom, GameData &data, int room, int row)
absl::StatusOr< std::vector< RoomSheetImport > > ImportRoomBackgroundPng(const Rom &rom, const RoomBackgroundSet &set, const util::PngImage &png, const SheetPalette &palette)
A decoded PNG: palette indices for indexed files, RGBA otherwise.
std::array< uint8_t, 8 > sheets
std::array< bool, 8 > from_room_blockset
std::array< uint8_t, 8 > cgram_indices
RoomDefaultEntrance entrance
RoomMainBlocksetResolution main
RoomBackgroundSet background
std::vector< std::pair< int, int > > changed_ranges
std::vector< uint8_t > snes_3bpp
std::vector< int > changed_tiles
std::vector< int > changed_blocks