The Rom class is used to load, save, and modify Rom data.
More...
#include <rom.h>
|
absl::Status | LoadFromFile (const std::string &filename, bool z3_load=true) |
|
absl::Status | LoadFromData (const std::vector< uint8_t > &data, bool z3_load=true) |
|
absl::Status | LoadZelda3 () |
|
absl::Status | LoadGfxGroups () |
|
absl::Status | SaveGfxGroups () |
|
absl::Status | SaveToFile (const SaveSettings &settings) |
|
absl::Status | SavePalette (int index, const std::string &group_name, gfx::SnesPalette &palette) |
|
absl::Status | SaveAllPalettes () |
|
void | Expand (int size) |
|
void | Close () |
|
absl::StatusOr< uint8_t > | ReadByte (int offset) |
|
absl::StatusOr< uint16_t > | ReadWord (int offset) |
|
absl::StatusOr< uint32_t > | ReadLong (int offset) |
|
absl::StatusOr< std::vector< uint8_t > > | ReadByteVector (uint32_t offset, uint32_t length) const |
|
absl::StatusOr< gfx::Tile16 > | ReadTile16 (uint32_t tile16_id) |
|
absl::Status | WriteTile16 (int tile16_id, const gfx::Tile16 &tile) |
|
absl::Status | WriteByte (int addr, uint8_t value) |
|
absl::Status | WriteWord (int addr, uint16_t value) |
|
absl::Status | WriteShort (int addr, uint16_t value) |
|
absl::Status | WriteLong (uint32_t addr, uint32_t value) |
|
absl::Status | WriteVector (int addr, std::vector< uint8_t > data) |
|
absl::Status | WriteColor (uint32_t address, const gfx::SnesColor &color) |
|
template<typename... Args> |
absl::Status | WriteTransaction (Args... args) |
|
template<typename T, typename... Args> |
absl::Status | ReadTransaction (T &var, int address, Args &&... args) |
|
virtual absl::Status | WriteHelper (const WriteAction &action) |
|
template<typename T> |
absl::Status | ReadHelper (T &var, int address) |
|
uint8_t & | operator[] (unsigned long i) |
|
bool | is_loaded () const |
|
auto | title () const |
|
auto | size () const |
|
auto | data () const |
|
auto | mutable_data () |
|
auto | begin () |
|
auto | end () |
|
auto | vector () const |
|
auto | filename () const |
|
auto | set_filename (std::string_view name) |
|
auto | short_name () const |
|
auto | graphics_buffer () const |
|
auto | mutable_graphics_buffer () |
|
auto | palette_group () const |
|
auto | mutable_palette_group () |
|
auto | dungeon_palette (int i) |
|
auto | mutable_dungeon_palette (int i) |
|
ResourceLabelManager * | resource_label () |
|
zelda3_version_pointers | version_constants () const |
|
The Rom class is used to load, save, and modify Rom data.
Definition at line 58 of file rom.h.
◆ LoadFromFile()
absl::Status yaze::Rom::LoadFromFile |
( |
const std::string & | filename, |
|
|
bool | z3_load = true ) |
◆ LoadFromData()
absl::Status yaze::Rom::LoadFromData |
( |
const std::vector< uint8_t > & | data, |
|
|
bool | z3_load = true ) |
◆ LoadZelda3()
absl::Status yaze::Rom::LoadZelda3 |
( |
| ) |
|
◆ LoadGfxGroups()
absl::Status yaze::Rom::LoadGfxGroups |
( |
| ) |
|
◆ SaveGfxGroups()
absl::Status yaze::Rom::SaveGfxGroups |
( |
| ) |
|
◆ SaveToFile()
absl::Status yaze::Rom::SaveToFile |
( |
const SaveSettings & | settings | ) |
|
◆ SavePalette()
absl::Status yaze::Rom::SavePalette |
( |
int | index, |
|
|
const std::string & | group_name, |
|
|
gfx::SnesPalette & | palette ) |
◆ SaveAllPalettes()
absl::Status yaze::Rom::SaveAllPalettes |
( |
| ) |
|
◆ Expand()
void yaze::Rom::Expand |
( |
int | size | ) |
|
|
inline |
Definition at line 79 of file rom.h.
◆ Close()
void yaze::Rom::Close |
( |
| ) |
|
|
inline |
Definition at line 84 of file rom.h.
◆ ReadByte()
absl::StatusOr< uint8_t > yaze::Rom::ReadByte |
( |
int | offset | ) |
|
◆ ReadWord()
absl::StatusOr< uint16_t > yaze::Rom::ReadWord |
( |
int | offset | ) |
|
◆ ReadLong()
absl::StatusOr< uint32_t > yaze::Rom::ReadLong |
( |
int | offset | ) |
|
◆ ReadByteVector()
absl::StatusOr< std::vector< uint8_t > > yaze::Rom::ReadByteVector |
( |
uint32_t | offset, |
|
|
uint32_t | length ) const |
◆ ReadTile16()
absl::StatusOr< gfx::Tile16 > yaze::Rom::ReadTile16 |
( |
uint32_t | tile16_id | ) |
|
◆ WriteTile16()
absl::Status yaze::Rom::WriteTile16 |
( |
int | tile16_id, |
|
|
const gfx::Tile16 & | tile ) |
◆ WriteByte()
absl::Status yaze::Rom::WriteByte |
( |
int | addr, |
|
|
uint8_t | value ) |
◆ WriteWord()
absl::Status yaze::Rom::WriteWord |
( |
int | addr, |
|
|
uint16_t | value ) |
◆ WriteShort()
absl::Status yaze::Rom::WriteShort |
( |
int | addr, |
|
|
uint16_t | value ) |
◆ WriteLong()
absl::Status yaze::Rom::WriteLong |
( |
uint32_t | addr, |
|
|
uint32_t | value ) |
◆ WriteVector()
absl::Status yaze::Rom::WriteVector |
( |
int | addr, |
|
|
std::vector< uint8_t > | data ) |
◆ WriteColor()
absl::Status yaze::Rom::WriteColor |
( |
uint32_t | address, |
|
|
const gfx::SnesColor & | color ) |
◆ WriteTransaction()
template<typename... Args>
absl::Status yaze::Rom::WriteTransaction |
( |
Args... | args | ) |
|
|
inline |
◆ ReadTransaction()
template<typename T, typename... Args>
absl::Status yaze::Rom::ReadTransaction |
( |
T & | var, |
|
|
int | address, |
|
|
Args &&... | args ) |
|
inline |
◆ WriteHelper()
virtual absl::Status yaze::Rom::WriteHelper |
( |
const WriteAction & | action | ) |
|
|
inlinevirtual |
◆ ReadHelper()
template<typename T>
absl::Status yaze::Rom::ReadHelper |
( |
T & | var, |
|
|
int | address ) |
|
inline |
◆ operator[]()
uint8_t & yaze::Rom::operator[] |
( |
unsigned long | i | ) |
|
|
inline |
◆ is_loaded()
bool yaze::Rom::is_loaded |
( |
| ) |
const |
|
inline |
◆ title()
auto yaze::Rom::title |
( |
| ) |
const |
|
inline |
◆ size()
auto yaze::Rom::size |
( |
| ) |
const |
|
inline |
◆ data()
auto yaze::Rom::data |
( |
| ) |
const |
|
inline |
◆ mutable_data()
auto yaze::Rom::mutable_data |
( |
| ) |
|
|
inline |
◆ begin()
auto yaze::Rom::begin |
( |
| ) |
|
|
inline |
◆ end()
◆ vector()
auto yaze::Rom::vector |
( |
| ) |
const |
|
inline |
◆ filename()
auto yaze::Rom::filename |
( |
| ) |
const |
|
inline |
◆ set_filename()
auto yaze::Rom::set_filename |
( |
std::string_view | name | ) |
|
|
inline |
◆ short_name()
auto yaze::Rom::short_name |
( |
| ) |
const |
|
inline |
◆ graphics_buffer()
auto yaze::Rom::graphics_buffer |
( |
| ) |
const |
|
inline |
◆ mutable_graphics_buffer()
auto yaze::Rom::mutable_graphics_buffer |
( |
| ) |
|
|
inline |
◆ palette_group()
auto yaze::Rom::palette_group |
( |
| ) |
const |
|
inline |
◆ mutable_palette_group()
auto yaze::Rom::mutable_palette_group |
( |
| ) |
|
|
inline |
◆ dungeon_palette()
auto yaze::Rom::dungeon_palette |
( |
int | i | ) |
|
|
inline |
◆ mutable_dungeon_palette()
auto yaze::Rom::mutable_dungeon_palette |
( |
int | i | ) |
|
|
inline |
◆ resource_label()
◆ version_constants()
◆ main_blockset_ids
◆ room_blockset_ids
◆ spriteset_ids
std::array<std::array<uint8_t, 4>, kNumSpritesets> yaze::Rom::spriteset_ids |
◆ paletteset_ids
std::array<std::array<uint8_t, 4>, kNumPalettesets> yaze::Rom::paletteset_ids |
◆ size_
unsigned long yaze::Rom::size_ = 0 |
|
private |
◆ title_
std::string yaze::Rom::title_ = "ROM not loaded" |
|
private |
◆ filename_
std::string yaze::Rom::filename_ = "" |
|
private |
◆ short_name_
std::string yaze::Rom::short_name_ = "" |
|
private |
◆ rom_data_
std::vector<uint8_t> yaze::Rom::rom_data_ |
|
private |
◆ graphics_buffer_
std::vector<uint8_t> yaze::Rom::graphics_buffer_ |
|
private |
◆ resource_label_manager_
◆ palette_groups_
◆ version_
The documentation for this class was generated from the following files: