turned zarby 3bpp to 8bpp code into a routine

This commit is contained in:
Justin Scofield
2022-06-17 23:46:18 -04:00
parent 320b1a5e8b
commit 192a05c041
2 changed files with 49 additions and 45 deletions

View File

@@ -30,6 +30,7 @@ class ROM {
void LoadFromFile(const std::string& path);
std::vector<tile8> ExtractTiles(Graphics::TilePreset& preset);
Graphics::SNESPalette ExtractPalette(Graphics::TilePreset& preset);
uchar* SNES3bppTo8bppSheet(uchar *sheet_buffer_in);
uint32_t GetRomPosition(int direct_addr, uint snes_addr) const;
inline uchar* GetRawData() { return current_rom_; }
@@ -54,6 +55,8 @@ class ROM {
std::shared_ptr<uchar> rom_ptr_;
std::unordered_map<unsigned int, std::shared_ptr<uchar[2048]>>
decompressed_sheets;
const uchar bitmmask[8] = { 0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01};
};
} // namespace Data