yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::Rom Class Reference

The Rom class is used to load, save, and modify Rom data. This is a generic SNES ROM container and does not contain game-specific logic. More...

#include <rom.h>

Collaboration diagram for yaze::Rom:

Classes

struct  LoadOptions
 
struct  SaveSettings
 
struct  WriteAction
 

Public Member Functions

 Rom ()=default
 
 ~Rom ()=default
 
absl::Status LoadFromFile (const std::string &filename, const LoadOptions &options=LoadOptions::Defaults())
 
absl::Status LoadFromData (const std::vector< uint8_t > &data, const LoadOptions &options=LoadOptions::Defaults())
 
absl::Status SaveToFile (const SaveSettings &settings)
 
void Expand (int size)
 
void Close ()
 
absl::StatusOr< uint8_tReadByte (int offset)
 
absl::StatusOr< uint16_tReadWord (int offset)
 
absl::StatusOr< uint32_tReadLong (int offset)
 
absl::StatusOr< std::vector< uint8_t > > ReadByteVector (uint32_t offset, uint32_t length) const
 
absl::StatusOr< gfx::Tile16ReadTile16 (uint32_t tile16_id, uint32_t tile16_ptr)
 
absl::Status WriteTile16 (int tile16_id, uint32_t tile16_ptr, 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_toperator[] (unsigned long i)
 
bool is_loaded () const
 
bool dirty () const
 
void set_dirty (bool dirty)
 
void ClearDirty ()
 
auto title () const
 
auto size () const
 
auto data () const
 
auto mutable_data ()
 
auto begin ()
 
auto end ()
 
const auto & vector () const
 
automutable_vector ()
 
auto filename () const
 
auto set_filename (std::string_view name)
 
auto short_name () const
 
project::ResourceLabelManagerresource_label ()
 
absl::Status LoadFromFile (const std::string &filename, bool z3_load=true)
 
absl::Status LoadFromFile (const std::string &filename, const RomLoadOptions &options)
 
absl::Status LoadFromData (const std::vector< uint8_t > &data, bool z3_load=true)
 
absl::Status LoadFromData (const std::vector< uint8_t > &data, const RomLoadOptions &options)
 
absl::Status LoadZelda3 ()
 
absl::Status LoadZelda3 (const RomLoadOptions &options)
 
absl::Status LoadGfxGroups ()
 
absl::Status InitializeForTesting ()
 
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_tReadByte (int offset)
 
absl::StatusOr< uint16_tReadWord (int offset)
 
absl::StatusOr< uint32_tReadLong (int offset)
 
absl::StatusOr< std::vector< uint8_t > > ReadByteVector (uint32_t offset, uint32_t length) const
 
absl::StatusOr< gfx::Tile16ReadTile16 (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_toperator[] (unsigned long i)
 
bool is_loaded () const
 
bool dirty () const
 
void set_dirty (bool dirty)
 
void ClearDirty ()
 
auto title () const
 
auto size () const
 
auto data () const
 
auto mutable_data ()
 
auto begin ()
 
auto end ()
 
const auto & vector () const
 
automutable_vector ()
 
auto filename () const
 
auto set_filename (std::string_view name)
 
auto short_name () const
 
const autographics_buffer () const
 
auto mutable_graphics_buffer ()
 
const autopalette_group () const
 
auto mutable_palette_group ()
 
auto dungeon_palette (int i)
 
auto mutable_dungeon_palette (int i)
 
project::ResourceLabelManagerresource_label ()
 
zelda3_version_pointers version_constants () const
 
const GraphicsLoadDiagnosticsGetDiagnostics () const
 
GraphicsLoadDiagnosticsGetMutableDiagnostics ()
 

Public Attributes

std::array< std::array< uint8_t, 8 >, kNumMainBlocksetsmain_blockset_ids
 
std::array< std::array< uint8_t, 4 >, kNumRoomBlocksetsroom_blockset_ids
 
std::array< std::array< uint8_t, 4 >, kNumSpritesetsspriteset_ids
 
std::array< std::array< uint8_t, 4 >, kNumPalettesetspaletteset_ids
 

Private Attributes

unsigned long size_ = 0
 
std::string title_ = "ROM not loaded"
 
std::string filename_
 
std::string short_name_
 
std::vector< uint8_trom_data_
 
project::ResourceLabelManager resource_label_manager_
 
bool dirty_ = false
 
std::vector< uint8_tgraphics_buffer_
 
GraphicsLoadDiagnostics diagnostics_
 
gfx::PaletteGroupMap palette_groups_
 
zelda3_version version_ = zelda3_version::US
 

Detailed Description

The Rom class is used to load, save, and modify Rom data. This is a generic SNES ROM container and does not contain game-specific logic.

The Rom class is used to load, save, and modify Rom data.

Definition at line 24 of file rom.h.

Constructor & Destructor Documentation

◆ Rom()

yaze::Rom::Rom ( )
default

◆ ~Rom()

yaze::Rom::~Rom ( )
default

Member Function Documentation

◆ LoadFromFile() [1/3]

absl::Status yaze::Rom::LoadFromFile ( const std::string & filename,
const LoadOptions & options = LoadOptions::Defaults() )

Definition at line 74 of file rom.cc.

References filename(), filename_, yaze::Rom::LoadOptions::load_resource_labels, yaze::project::ResourceLabelManager::LoadLabels(), resource_label_manager_, rom_data_, short_name_, size_, yaze::Rom::LoadOptions::strip_header, and vector().

Referenced by yaze::editor::ProposalDrawer::AcceptProposal(), yaze::editor::GraphicsEditor::DrawFileImport(), yaze::editor::GraphicsEditor::DrawObjImport(), yaze::editor::GraphicsEditor::DrawPaletteControls(), yaze::editor::GraphicsEditor::DrawTilemapImport(), yaze::cli::agent::anonymous_namespace{general_commands.cc}::EnsureRomLoaded(), yaze::cli::handlers::ProjectBuildCommandHandler::Execute(), yaze::cli::handlers::RomDiffCommandHandler::Execute(), yaze::cli::handlers::RomGenerateGoldenCommandHandler::Execute(), yaze::cli::HexDumpCommandHandler::Execute(), yaze::cli::HexCompareCommandHandler::Execute(), yaze::cli::HexAnnotateCommandHandler::Execute(), yaze::cli::handlers::ToolsExtractValuesCommandHandler::Execute(), yaze::cli::handlers::ToolsExtractGoldenCommandHandler::Execute(), yaze::cli::handlers::ToolsPatchV3CommandHandler::Execute(), yaze::cli::agent::tools::RomDiffTool::Execute(), yaze::cli::agent::tools::RomChangesTool::Execute(), yaze::cli::handlers::ToolsHarnessStateCommandHandler::GenerateHarnessState(), yaze::cli::agent::HandleAcceptCommand(), yaze::cli::HandleGfxExportLegacy(), yaze::cli::HandleGfxImportLegacy(), yaze::cli::HandleOverworldDescribeMapLegacy(), yaze::cli::HandleOverworldFindTileLegacy(), yaze::cli::HandleOverworldGetTileLegacy(), yaze::cli::HandleOverworldListWarpsLegacy(), yaze::cli::HandleOverworldSetTileLegacy(), yaze::cli::HandlePaletteExportLegacy(), yaze::cli::HandlePaletteImportLegacy(), yaze::cli::agent::HandleRevertCommand(), yaze::cli::resources::CommandContext::Initialize(), yaze::editor::LoadExpandedMessages(), LoadFromFile(), yaze::cli::agent::anonymous_namespace{conversation_test.cc}::LoadRomForAgent(), yaze::editor::RomFileManager::LoadRomFromFile(), yaze::cli::message::anonymous_namespace{message.cc}::LoadRomFromFlag(), main(), main(), yaze::test::IntegratedTestSuite::RunRomBasicTest(), yaze::editor::MessageEditor::SaveExpandedMessages(), and yaze::editor::MemoryEditor::Update().

Here is the call graph for this function:

◆ LoadFromData() [1/3]

◆ SaveToFile() [1/2]

◆ Expand() [1/2]

◆ Close() [1/2]

void yaze::Rom::Close ( )
inline

Definition at line 54 of file rom.h.

References rom_data_, and size_.

◆ ReadByte() [1/2]

absl::StatusOr< uint8_t > yaze::Rom::ReadByte ( int offset)

Definition at line 221 of file rom.cc.

References rom_data_, and vector().

Referenced by yaze::zelda3::TitleScreen::BuildTileset(), yaze::cli::agent::tools::PatchCheckTool::CheckHooks(), yaze::zelda3::OverworldMapScreen::Create(), yaze::zelda3::music::MusicBank::DetectExpandedMusicPatch(), yaze::test::ZSCustomOverworldTestSuite::DrawConfiguration(), yaze::zelda3::LoadDungeonMaps(), yaze::zelda3::LoadEntrances(), yaze::zelda3::LoadGfxGroups(), yaze::zelda3::LoadHoles(), yaze::zelda3::LoadItems(), yaze::zelda3::OverworldMapScreen::LoadMapData(), yaze::editor::PolyhedralEditorPanel::LoadShapes(), yaze::zelda3::TitleScreen::LoadTitleScreen(), ReadHelper(), yaze::test::E2ETestSuite::RunCorruptionDetectionTest(), yaze::test::E2ETestSuite::RunDataIntegrityTest(), yaze::test::ZSCustomOverworldTestSuite::RunDataIntegrityTest(), yaze::test::ZSCustomOverworldTestSuite::RunFeatureToggleTest(), yaze::test::E2ETestSuite::RunLargeScaleEditingTest(), yaze::test::RomDependentTestSuite::RunRomDataAccessTest(), yaze::test::E2ETestSuite::RunTransactionSystemTest(), yaze::test::ZSCustomOverworldTestSuite::RunV2UpgradeTest(), yaze::test::ZSCustomOverworldTestSuite::RunV3UpgradeTest(), yaze::test::ZSCustomOverworldTestSuite::RunVanillaBaselineTest(), yaze::zelda3::TitleScreen::Save(), yaze::zelda3::music::anonymous_namespace{music_bank.cc}::UpdateBankPointerRegisters(), yaze::cli::agent::tools::RomValidateTool::ValidateHeader(), yaze::cli::agent::tools::DataValidateTool::ValidateSprites(), yaze::test::ZSCustomOverworldTestSuite::ValidateVersionAddresses(), yaze::cli::handlers::ToolsExtractGoldenCommandHandler::WriteASMVersionInfo(), and yaze::Transaction::WriteByte().

Here is the call graph for this function:

◆ ReadWord() [1/2]

◆ ReadLong() [1/2]

absl::StatusOr< uint32_t > yaze::Rom::ReadLong ( int offset)

Definition at line 235 of file rom.cc.

References rom_data_, and vector().

Referenced by yaze::zelda3::LoadItems(), and yaze::Transaction::WriteLong().

Here is the call graph for this function:

◆ ReadByteVector() [1/2]

◆ ReadTile16() [1/2]

absl::StatusOr< gfx::Tile16 > yaze::Rom::ReadTile16 ( uint32_t tile16_id,
uint32_t tile16_ptr )

Definition at line 256 of file rom.cc.

References ASSIGN_OR_RETURN, ReadWord(), vector(), and yaze::gfx::WordToTileInfo().

Referenced by yaze::editor::Tile16Editor::GetCurrentTile16Data(), and yaze::editor::Tile16Editor::SetCurrentTile().

Here is the call graph for this function:

◆ WriteTile16() [1/2]

◆ WriteByte() [1/2]

◆ WriteWord() [1/2]

absl::Status yaze::Rom::WriteWord ( int addr,
uint16_t value )

Definition at line 299 of file rom.cc.

References dirty_, rom_data_, and vector().

Referenced by yaze::Transaction::Rollback(), yaze::zelda3::SaveDungeonMapTile16(), WriteColor(), WriteShort(), and yaze::Transaction::WriteWord().

Here is the call graph for this function:

◆ WriteShort() [1/2]

absl::Status yaze::Rom::WriteShort ( int addr,
uint16_t value )

◆ WriteLong() [1/2]

absl::Status yaze::Rom::WriteLong ( uint32_t addr,
uint32_t value )

Definition at line 320 of file rom.cc.

References dirty_, rom_data_, and vector().

Referenced by yaze::Transaction::Rollback(), yaze::zelda3::SaveItems(), and yaze::Transaction::WriteLong().

Here is the call graph for this function:

◆ WriteVector() [1/2]

◆ WriteColor() [1/2]

absl::Status yaze::Rom::WriteColor ( uint32_t address,
const gfx::SnesColor & color )

Definition at line 357 of file rom.cc.

References yaze::gfx::SnesColor::snes(), vector(), and WriteWord().

Referenced by SavePalette(), yaze::Transaction::WriteColor(), yaze::editor::PaletteGroupPanel::WriteColorToRom(), and WriteHelper().

Here is the call graph for this function:

◆ WriteTransaction() [1/2]

template<typename... Args>
absl::Status yaze::Rom::WriteTransaction ( Args... args)
inline

Definition at line 76 of file rom.h.

References WriteHelper().

Here is the call graph for this function:

◆ ReadTransaction() [1/2]

template<typename T , typename... Args>
absl::Status yaze::Rom::ReadTransaction ( T & var,
int address,
Args &&... args )
inline

Definition at line 83 of file rom.h.

References ReadTransaction(), and vector().

Referenced by yaze::zelda3::LoadExits(), and ReadTransaction().

Here is the call graph for this function:

◆ WriteHelper() [1/2]

absl::Status yaze::Rom::WriteHelper ( const WriteAction & action)
virtual

Definition at line 363 of file rom.cc.

References yaze::Rom::WriteAction::address, yaze::Rom::WriteAction::value, WriteByte(), WriteColor(), WriteShort(), and WriteVector().

Referenced by WriteTransaction().

Here is the call graph for this function:

◆ ReadHelper() [1/2]

template<typename T >
absl::Status yaze::Rom::ReadHelper ( T & var,
int address )
inline

Definition at line 105 of file rom.h.

References ReadByte(), ReadByteVector(), ReadWord(), and vector().

Here is the call graph for this function:

◆ operator[]() [1/2]

Definition at line 122 of file rom.h.

References rom_data_, and size_.

◆ is_loaded() [1/2]

bool yaze::Rom::is_loaded ( ) const
inline

Definition at line 128 of file rom.h.

References rom_data_.

Referenced by yaze::net::CollaborationService::ApplyDiff(), yaze::core::PatchManager::ApplyEnabledPatches(), yaze::editor::PaletteControlsPanel::ApplyPaletteToAllSheets(), yaze::gfx::ZsprLoader::ApplyPaletteToRom(), yaze::editor::PaletteControlsPanel::ApplyPaletteToSheet(), yaze::editor::AssemblyEditor::ApplyPatchToRom(), yaze::cli::Tile16ProposalGenerator::ApplyProposal(), yaze::net::CollaborationService::ApplyRomSync(), yaze::editor::LinkSpritePanel::ApplySelectedPalette(), yaze::gfx::ZsprLoader::ApplyToRom(), yaze::emu::render::SaveStateManager::CalculateRomChecksum(), yaze::zelda3::CalculateRoomSize(), yaze::editor::CheckRomState(), yaze::cli::agent::tools::ProjectToolUtils::ComputeRomChecksum(), yaze::net::RomVersionManager::ComputeRomHash(), yaze::zelda3::Room::CopyRoomGraphicsToBuffer(), yaze::zelda3::OverworldMapScreen::Create(), yaze::zelda3::Inventory::Create(), yaze::zelda3::TitleScreen::Create(), yaze::cli::RomSandboxManager::CreateSandbox(), yaze::net::RomVersionManager::CreateSnapshot(), yaze::test::TestManager::CreateTestRomCopy(), yaze::net::RomVersionManager::DetectCorruption(), yaze::zelda3::DiggableTilesPatch::DetectZSDiggingHooks(), yaze::editor::LinkSpritePanel::Draw(), yaze::editor::PaletteControlsPanel::Draw(), yaze::editor::PolyhedralEditorPanel::Draw(), yaze::editor::PaletteGroupPanel::Draw(), yaze::zelda3::RoomLayout::Draw(), yaze::editor::AssemblyEditor::DrawAssembleMenu(), yaze::editor::AssemblyEditor::DrawBuildOutput(), yaze::editor::GraphicsEditor::DrawClipboardImport(), yaze::test::E2ETestSuite::DrawConfiguration(), yaze::test::RomDependentTestSuite::DrawConfiguration(), yaze::test::ZSCustomOverworldTestSuite::DrawConfiguration(), yaze::zelda3::ObjectDrawer::DrawDoor(), yaze::editor::DungeonCanvasViewer::DrawDungeonCanvas(), yaze::editor::DungeonRoomSelector::DrawEntranceSelector(), yaze::zelda3::ObjectDrawer::DrawObject(), yaze::editor::OverworldEditor::DrawOverworldCanvas(), yaze::editor::SettingsPanel::DrawPatchSettings(), yaze::editor::ProjectManagementPanel::DrawRomManagement(), yaze::editor::StatusBar::DrawRomSegment(), yaze::editor::DungeonObjectSelector::DrawRoomGraphics(), yaze::editor::DungeonRoomSelector::DrawRoomSelector(), yaze::editor::UICoordinator::DrawSessionButton(), yaze::editor::AgentEditor::DrawStatusPanel(), yaze::test::TestManager::DrawTestDashboard(), yaze::editor::AssemblyEditor::DrawToolbarContent(), yaze::editor::OverworldEditor::DrawV3Settings(), yaze::gui::FlagsMenu::DrawZSCustomOverworldFlags(), yaze::gui::DungeonObjectEmulatorPreview::EnsureInitialized(), yaze::emu::Emulator::EnsureInitialized(), yaze::cli::agent::anonymous_namespace{general_commands.cc}::EnsureRomLoaded(), yaze::cli::MessageDoctorCommandHandler::Execute(), yaze::cli::handlers::RomInfoCommandHandler::Execute(), yaze::cli::handlers::RomValidateCommandHandler::Execute(), yaze::cli::GraphicsDoctorCommandHandler::Execute(), yaze::cli::SpriteDoctorCommandHandler::Execute(), yaze::cli::agent::tools::ProjectStatusTool::Execute(), yaze::cli::agent::tools::ProjectSnapshotTool::Execute(), yaze::cli::agent::tools::ProjectRestoreTool::Execute(), yaze::cli::ResourceContextBuilder::ExportToJson(), yaze::cli::ResourceContextBuilder::ExtractDungeonLabels(), yaze::cli::ResourceContextBuilder::ExtractEntranceLabels(), yaze::cli::ResourceContextBuilder::ExtractOverworldLabels(), yaze::cli::ResourceContextBuilder::ExtractRoomLabels(), yaze::cli::ResourceContextBuilder::ExtractSpriteLabels(), yaze::rom::HyruleMagicValidator::FixChecksum(), yaze::net::CollaborationService::GenerateDiff(), yaze::cli::Tile16ProposalGenerator::GenerateDiff(), yaze::net::RomVersionManager::GetCurrentHash(), yaze::cli::ResourceContextBuilder::GetLabels(), yaze::zelda3::RoomLayout::GetLayoutAddress(), yaze::editor::DungeonObjectSelector::GetOrCreatePreview(), yaze::editor::DungeonEditorV2::GetRomStatus(), yaze::editor::OverworldEditor::GetRomStatus(), yaze::editor::GetRomStatusMessage(), yaze::cli::agent::HandleCommitCommand(), yaze::cli::agent::HandleDiffCommand(), yaze::cli::agent::ConversationalAgentService::HandleExternalResponse(), yaze::cli::HandleGfxExportLegacy(), yaze::cli::HandleGfxImportLegacy(), yaze::cli::message::HandleMessageListCommand(), yaze::cli::message::HandleMessageReadCommand(), yaze::cli::message::HandleMessageSearchCommand(), yaze::cli::message::HandleMessageStatsCommand(), yaze::cli::HandleOverworldDescribeMapLegacy(), yaze::cli::HandleOverworldFindTileLegacy(), yaze::cli::HandleOverworldGetTileLegacy(), yaze::cli::HandleOverworldListWarpsLegacy(), yaze::cli::HandleOverworldSetTileLegacy(), yaze::cli::HandlePaletteExportLegacy(), yaze::cli::HandlePaletteImportLegacy(), yaze::cli::agent::HandleRevertCommand(), yaze::rom::HyruleMagicValidator::HasBank00Erasure(), yaze::net::CollaborationService::HostSession(), yaze::editor::LinkSpritePanel::ImportZspr(), yaze::emu::render::EmulatorRenderService::Initialize(), yaze::cli::resources::CommandContext::Initialize(), yaze::editor::ScreenEditor::Initialize(), yaze::editor::PaletteEditor::Initialize(), yaze::editor::SpriteEditor::Initialize(), yaze::net::CollaborationService::Initialize(), yaze::editor::DungeonEditorV2::Initialize(), yaze::rom::HyruleMagicValidator::IsParallelWorlds(), yaze::editor::DungeonEditorV2::IsRomLoaded(), yaze::editor::OverworldEditor::IsRomLoaded(), yaze::editor::RomFileManager::IsRomLoaded(), yaze::editor::IsRomReadyForEditing(), yaze::net::CollaborationService::JoinSession(), yaze::editor::DungeonEditorV2::Load(), yaze::editor::OverworldEditor::Load(), yaze::editor::DungeonRoomLoader::LoadAllRooms(), yaze::editor::DungeonRoomLoader::LoadAndRenderRoomGraphics(), yaze::zelda3::Room::LoadAnimatedGraphics(), yaze::zelda3::music::MusicBank::LoadFromRom(), yaze::zelda3::ObjectDimensionTable::LoadFromRom(), yaze::zelda3::Room::LoadLayoutTilesToBuffer(), yaze::editor::LinkSpritePanel::LoadLinkSheets(), yaze::zelda3::Room::LoadPotItems(), yaze::cli::agent::anonymous_namespace{conversation_test.cc}::LoadRomForAgent(), yaze::editor::DungeonRoomLoader::LoadRoom(), yaze::editor::DungeonRoomLoader::LoadRoomEntrances(), yaze::zelda3::LoadRoomHeaderFromRom(), yaze::editor::PolyhedralEditorPanel::LoadShapes(), yaze::editor::SpriteEditor::LoadSpritePalettes(), main(), yaze::editor::RomLoadOptionsDialog::Open(), yaze::editor::ObjectEditorPanel::OpenStaticObjectEditor(), yaze::cli::Tile16ProposalGenerator::ParseReplaceTileCommand(), yaze::cli::Tile16ProposalGenerator::ParseSetAreaCommand(), yaze::cli::Tile16ProposalGenerator::ParseSetTileCommand(), yaze::zelda3::music::SpcParser::ParseSong(), yaze::zelda3::music::SpcParser::ParseTrackInternal(), yaze::zelda3::music::SpcParser::ReadSongPointerTable(), yaze::test::TestManager::RefreshCurrentRom(), yaze::editor::DungeonRoomLoader::ReloadAllRoomGraphics(), yaze::gui::DungeonObjectEmulatorPreview::Render(), yaze::cli::HexViewerComponent::Render(), yaze::editor::DungeonObjectInteraction::RenderGhostPreviewBitmap(), yaze::zelda3::Room::RenderObjectsToBackground(), yaze::editor::RequireRomLoaded(), yaze::cli::agent::tools::ProjectManager::RestoreSnapshot(), yaze::net::RomVersionManager::RestoreSnapshot(), yaze::emu::Emulator::Run(), yaze::test::IntegratedTestSuite::RunRomBasicTest(), yaze::test::E2ETestSuite::RunTests(), yaze::test::RomDependentTestSuite::RunTests(), yaze::test::ZSCustomOverworldTestSuite::RunTests(), yaze::editor::DungeonEditorV2::Save(), yaze::editor::GraphicsEditor::Save(), yaze::editor::PaletteEditor::Save(), yaze::zelda3::TitleScreen::Save(), yaze::editor::MessageEditor::SaveExpandedMessages(), yaze::zelda3::music::MusicBank::SaveToRom(), yaze::cli::agent::ConversationalAgentService::SendMessage(), yaze::test::TestManager::SetCurrentRom(), yaze::editor::DungeonEditorV2::SetRom(), yaze::net::CollaborationService::SubmitChangesAsProposal(), yaze::test::TestManager::TestRomDataIntegrity(), yaze::test::TestManager::TestRomSaveLoad(), yaze::test::TestManager::TestRomWithCopy(), yaze::gui::DungeonObjectEmulatorPreview::TriggerEmulatedRender(), yaze::gui::DungeonObjectEmulatorPreview::TriggerStaticRender(), yaze::cli::UnifiedLayout::UnifiedLayout(), yaze::editor::LinkSpritePanel::Update(), yaze::editor::PaletteControlsPanel::Update(), yaze::editor::PolyhedralEditorPanel::Update(), yaze::editor::OverworldEditor::Update(), yaze::editor::OverworldEditor::UpdateGfxGroupEditor(), and yaze::net::RomVersionManager::ValidateRomIntegrity().

◆ dirty() [1/2]

◆ set_dirty() [1/2]

◆ ClearDirty() [1/2]

void yaze::Rom::ClearDirty ( )
inline

Definition at line 131 of file rom.h.

References dirty_.

◆ title() [1/2]

auto yaze::Rom::title ( ) const
inline

Definition at line 133 of file rom.h.

References title_.

Referenced by yaze::cli::tui::ChatTUI::ChatTUI(), yaze::cli::EnhancedStatusPanel::CollectRomInfo(), yaze::cli::UnifiedLayout::CreateChatPanel(), yaze::cli::UnifiedLayout::CreateStatusPanel(), yaze::test::TestManager::CreateTestRomCopy(), yaze::test::E2ETestSuite::DrawConfiguration(), yaze::test::RomDependentTestSuite::DrawConfiguration(), yaze::test::ZSCustomOverworldTestSuite::DrawConfiguration(), yaze::editor::ProjectManagementPanel::DrawRomManagement(), yaze::test::TestManager::DrawTestDashboard(), yaze::cli::handlers::RomInfoCommandHandler::Execute(), yaze::cli::handlers::RomValidateCommandHandler::Execute(), yaze::cli::agent::tools::RomChangesTool::Execute(), yaze::editor::RomSession::GetDisplayName(), yaze::editor::DungeonEditorV2::GetRomStatus(), yaze::editor::OverworldEditor::GetRomStatus(), yaze::editor::GetRomStatusMessage(), yaze::cli::agent::HandleTestConversationCommand(), yaze::editor::IsRomReadyForEditing(), yaze::editor::RomFileManager::LoadRomFromFile(), yaze::cli::EnhancedChatComponent::ProcessMessage(), yaze::test::TestManager::RefreshCurrentRom(), yaze::test::RomDependentTestSuite::RunComprehensiveSaveTest(), yaze::test::IntegratedTestSuite::RunRomBasicTest(), yaze::test::RomDependentTestSuite::RunRomHeaderValidationTest(), yaze::test::RomDependentTestSuite::RunTests(), yaze::test::RomDependentTestSuite::RunTile16EditorTest(), yaze::test::TestManager::SetCurrentRom(), yaze::cli::tui::ChatTUI::SetRomContext(), yaze::cli::UnifiedLayout::SetRomContext(), yaze::test::TestManager::TestRomDataIntegrity(), yaze::test::TestManager::TestRomSaveLoad(), yaze::cli::UnifiedLayout::UnifiedLayout(), yaze::cli::agent::tools::RomValidateTool::ValidateHeader(), yaze::editor::RomFileManager::ValidateRom(), and yaze::cli::handlers::ToolsExtractGoldenCommandHandler::WriteBasicROMInfo().

◆ size() [1/2]

auto yaze::Rom::size ( ) const
inline

Definition at line 134 of file rom.h.

References size_.

Referenced by yaze::cli::anonymous_namespace{overworld_doctor_commands.cc}::ApplyTailExpansion(), yaze::emu::render::SaveStateManager::CalculateRomChecksum(), yaze::zelda3::CalculateRoomSize(), yaze::cli::tui::ChatTUI::ChatTUI(), yaze::cli::anonymous_namespace{sprite_doctor_commands.cc}::CheckCommonSpriteIssues(), yaze::cli::anonymous_namespace{rom_doctor_commands.cc}::CheckCorruptionHeuristics(), yaze::cli::agent::tools::PatchCheckTool::CheckFreeSpace(), yaze::cli::agent::tools::PatchCheckTool::CheckHooks(), yaze::cli::anonymous_namespace{graphics_doctor_commands.cc}::CheckSheetIntegrity(), yaze::cli::anonymous_namespace{overworld_doctor_commands.cc}::CheckTile16Corruption(), yaze::cli::anonymous_namespace{rom_doctor_commands.cc}::CheckZScreamHeuristics(), yaze::cli::EnhancedStatusPanel::CollectRomInfo(), yaze::cli::agent::tools::ProjectToolUtils::ComputeRomChecksum(), yaze::net::RomVersionManager::ComputeRomHash(), yaze::cli::UnifiedLayout::CreateChatPanel(), yaze::cli::UnifiedLayout::CreateHexViewerPanel(), yaze::net::RomVersionManager::CreateSnapshot(), yaze::editor::GraphicsEditor::DecompressImportData(), yaze::editor::GraphicsEditor::DecompressSuperDonkey(), yaze::net::RomVersionManager::DetectCorruption(), yaze::zelda3::music::MusicBank::DetectExpandedMusicPatch(), yaze::zelda3::DiggableTilesPatch::DetectZSDiggingHooks(), yaze::test::E2ETestSuite::DrawConfiguration(), yaze::test::RomDependentTestSuite::DrawConfiguration(), yaze::zelda3::ObjectDrawer::DrawDoor(), yaze::editor::GraphicsEditor::DrawMemoryEditor(), yaze::editor::ProjectManagementPanel::DrawRomManagement(), yaze::cli::agent::EnhancedTUI::DrawSidebar(), yaze::test::TestManager::DrawTestDashboard(), yaze::editor::GraphicsEditor::DrawTilemapImport(), yaze::zelda3::RoomObject::EnsureTilesLoaded(), yaze::cli::handlers::HexReadCommandHandler::Execute(), yaze::cli::handlers::HexWriteCommandHandler::Execute(), yaze::cli::handlers::HexSearchCommandHandler::Execute(), yaze::cli::handlers::RomInfoCommandHandler::Execute(), yaze::cli::handlers::RomValidateCommandHandler::Execute(), yaze::cli::handlers::RomDiffCommandHandler::Execute(), yaze::cli::handlers::RomGenerateGoldenCommandHandler::Execute(), yaze::cli::GraphicsDoctorCommandHandler::Execute(), yaze::cli::HexDumpCommandHandler::Execute(), yaze::cli::HexCompareCommandHandler::Execute(), yaze::cli::HexAnnotateCommandHandler::Execute(), yaze::cli::RomDoctorCommandHandler::Execute(), yaze::cli::handlers::ToolsExtractValuesCommandHandler::Execute(), yaze::cli::agent::tools::ProjectStatusTool::Execute(), yaze::cli::agent::tools::RomChangesTool::Execute(), Expand(), yaze::rom::HyruleMagicValidator::FixChecksum(), yaze::net::RomVersionManager::GetCurrentHash(), yaze::zelda3::RoomLayout::GetLayoutAddress(), yaze::zelda3::music::SpcParser::GetSpcData(), yaze::zelda3::OverworldVersionHelper::GetVersion(), yaze::cli::agent::HandleAcceptCommand(), yaze::rom::HyruleMagicValidator::HasBank00Erasure(), yaze::zelda3::Overworld::HasExpandedPointerTables(), yaze::emu::render::EmulatorRenderService::InjectRoomContext(), yaze::rom::HyruleMagicValidator::IsParallelWorlds(), yaze::Load2BppGraphics(), yaze::zelda3::Load2BppGraphics(), yaze::LoadAllGraphicsData(), yaze::zelda3::music::MusicBank::LoadExpandedSongTable(), yaze::LoadFontGraphics(), yaze::zelda3::LoadGameData(), yaze::zelda3::LoadGraphics(), yaze::zelda3::music::MusicBank::LoadInstruments(), yaze::zelda3::RoomLayout::LoadLayout(), yaze::zelda3::LoadMetadata(), yaze::zelda3::Room::LoadObjects(), yaze::zelda3::LoadRoomHeaderFromRom(), yaze::zelda3::music::MusicBank::LoadSamples(), yaze::zelda3::OverworldMap::LoadVanillaOverlayData(), yaze::emu::render::EmulatorRenderService::LookupHandlerAddress(), main(), yaze::zelda3::Room::ParseObjectsFromLocation(), yaze::zelda3::ObjectParser::ParseSubtype1(), yaze::zelda3::ObjectParser::ParseSubtype2(), yaze::zelda3::ObjectParser::ParseSubtype3(), yaze::cli::EnhancedChatComponent::ProcessMessage(), yaze::cli::anonymous_namespace{rom_doctor_commands.cc}::ReadRomHeader(), yaze::zelda3::ObjectParser::ReadTileData(), yaze::test::TestManager::RefreshCurrentRom(), yaze::cli::HexViewerComponent::Render(), yaze::cli::anonymous_namespace{overworld_doctor_commands.cc}::RepairTile16Region(), yaze::net::RomVersionManager::RestoreSnapshot(), yaze::test::IntegratedTestSuite::RunRomBasicTest(), yaze::test::RomDependentTestSuite::RunRomHeaderValidationTest(), yaze::test::E2ETestSuite::RunRomLoadSaveTest(), yaze::test::RomDependentTestSuite::RunTests(), yaze::editor::GraphicsEditor::Save(), yaze::SaveAllGraphicsData(), yaze::editor::MessageEditor::SaveExpandedMessages(), yaze::zelda3::Room::SaveObjects(), yaze::zelda3::music::MusicBank::SaveSongTable(), yaze::zelda3::Room::SaveSprites(), yaze::cli::tui::ChatTUI::SetRomContext(), yaze::test::TestManager::ShowRomComparisonResults(), yaze::zelda3::music::SpcParser::SpcAddressToRomOffset(), yaze::test::TestManager::TestRomDataIntegrity(), yaze::gui::DungeonObjectEmulatorPreview::TriggerEmulatedRender(), yaze::gui::DungeonObjectEmulatorPreview::TriggerStaticRender(), yaze::editor::MemoryEditor::Update(), yaze::editor::music::MusicPlayer::UploadSoundBankFromRom(), yaze::cli::anonymous_namespace{graphics_doctor_commands.cc}::ValidateBlocksets(), yaze::cli::agent::tools::RomValidateTool::ValidateChecksum(), yaze::cli::anonymous_namespace{graphics_doctor_commands.cc}::ValidateCompression(), yaze::gfx::lc_lz2::ValidateCompressionResult(), yaze::gfx::lc_lz2::ValidateCompressionResultV3(), yaze::cli::anonymous_namespace{rom_doctor_commands.cc}::ValidateExpandedTables(), yaze::cli::anonymous_namespace{graphics_doctor_commands.cc}::ValidateGraphicsPointerTable(), yaze::cli::anonymous_namespace{overworld_doctor_commands.cc}::ValidateMapPointers(), yaze::editor::RomFileManager::ValidateRom(), yaze::net::RomVersionManager::ValidateRomIntegrity(), yaze::cli::anonymous_namespace{sprite_doctor_commands.cc}::ValidateRoomSprites(), yaze::cli::agent::tools::RomValidateTool::ValidateSize(), yaze::cli::anonymous_namespace{sprite_doctor_commands.cc}::ValidateSpritePointerTable(), yaze::cli::agent::tools::DataValidateTool::ValidateSprites(), yaze::cli::anonymous_namespace{sprite_doctor_commands.cc}::ValidateSpritesets(), yaze::cli::anonymous_namespace{overworld_validate_commands.cc}::ValidateTile16Region(), and yaze::cli::handlers::ToolsExtractGoldenCommandHandler::WriteBasicROMInfo().

◆ data() [1/2]

auto yaze::Rom::data ( ) const
inline

Definition at line 135 of file rom.h.

References rom_data_.

Referenced by yaze::cli::anonymous_namespace{overworld_doctor_commands.cc}::ApplyTailExpansion(), yaze::editor::BuildDictionaryEntries(), yaze::emu::render::SaveStateManager::CalculateRomChecksum(), yaze::zelda3::CalculateRoomSize(), yaze::cli::anonymous_namespace{rom_doctor_commands.cc}::CheckCorruptionHeuristics(), yaze::cli::anonymous_namespace{overworld_doctor_commands.cc}::CheckTile16Corruption(), yaze::cli::anonymous_namespace{rom_doctor_commands.cc}::CheckZScreamHeuristics(), yaze::cli::agent::tools::ProjectToolUtils::ComputeRomChecksum(), yaze::net::RomVersionManager::ComputeRomHash(), yaze::net::RomVersionManager::CreateSnapshot(), yaze::editor::GraphicsEditor::DecompressImportData(), yaze::editor::GraphicsEditor::DecompressSuperDonkey(), yaze::net::RomVersionManager::DetectCorruption(), yaze::cli::anonymous_namespace{overworld_doctor_commands.cc}::DetectRomFeatures(), yaze::cli::anonymous_namespace{rom_doctor_commands.cc}::DetectRomFeaturesLocal(), yaze::zelda3::DiggableTilesPatch::DetectZSDiggingHooks(), yaze::zelda3::ObjectDrawer::DrawDoor(), yaze::test::TestManager::DrawTestDashboard(), yaze::editor::GraphicsEditor::DrawTilemapImport(), yaze::zelda3::RoomObject::EnsureTilesLoaded(), yaze::cli::MessageDoctorCommandHandler::Execute(), yaze::cli::handlers::HexReadCommandHandler::Execute(), yaze::cli::handlers::HexSearchCommandHandler::Execute(), yaze::cli::RomDoctorCommandHandler::Execute(), yaze::zelda3::OverworldVersionHelper::GetAsmVersion(), yaze::net::RomVersionManager::GetCurrentHash(), yaze::zelda3::music::SpcParser::GetSpcData(), yaze::zelda3::OverworldVersionHelper::GetVersion(), yaze::rom::HyruleMagicValidator::HasBank00Erasure(), yaze::zelda3::Overworld::HasExpandedPointerTables(), yaze::editor::MessageEditor::Initialize(), yaze::emu::render::EmulatorRenderService::InjectRoomContext(), yaze::Load2BppGraphics(), yaze::zelda3::Load2BppGraphics(), yaze::LoadAllGraphicsData(), yaze::zelda3::LoadDungeonMaps(), yaze::zelda3::LoadDungeonMapTile16(), yaze::zelda3::LoadEntrances(), yaze::zelda3::LoadExits(), yaze::LoadFontGraphics(), LoadFromData(), LoadFromData(), LoadFromData(), yaze::zelda3::LoadGraphics(), yaze::zelda3::RoomLayout::LoadLayout(), yaze::cli::message::anonymous_namespace{message.cc}::LoadMessages(), yaze::zelda3::LoadMetadata(), yaze::zelda3::LoadRoomHeaderFromRom(), yaze::zelda3::music::MusicBank::LoadSamples(), yaze::emu::render::EmulatorRenderService::LookupHandlerAddress(), yaze::zelda3::ObjectParser::ParseSubtype1(), yaze::zelda3::ObjectParser::ParseSubtype2(), yaze::zelda3::ObjectParser::ParseSubtype3(), yaze::cli::anonymous_namespace{rom_doctor_commands.cc}::ReadRomHeader(), yaze::zelda3::ObjectParser::ReadTileData(), yaze::zelda3::Room::RenderObjectsToBackground(), yaze::zelda3::RoomEntrance::RoomEntrance(), yaze::editor::GraphicsEditor::Save(), yaze::SaveAllGraphicsData(), yaze::zelda3::SaveDungeonMapTile16(), yaze::zelda3::music::SpcParser::SpcAddressToRomOffset(), yaze::gui::DungeonObjectEmulatorPreview::TriggerEmulatedRender(), yaze::gui::DungeonObjectEmulatorPreview::TriggerStaticRender(), yaze::editor::music::MusicPlayer::UploadSoundBankFromRom(), yaze::gfx::lc_lz2::ValidateCompressionResult(), yaze::gfx::lc_lz2::ValidateCompressionResultV3(), yaze::cli::anonymous_namespace{rom_doctor_commands.cc}::ValidateExpandedTables(), yaze::cli::anonymous_namespace{overworld_doctor_commands.cc}::ValidateMapPointers(), yaze::cli::anonymous_namespace{overworld_validate_commands.cc}::ValidateTile16Region(), and WriteVector().

◆ mutable_data() [1/2]

◆ begin() [1/2]

auto yaze::Rom::begin ( )
inline

◆ end() [1/2]

auto yaze::Rom::end ( )
inline

Definition at line 138 of file rom.h.

References rom_data_.

◆ vector() [1/2]

const auto & yaze::Rom::vector ( ) const
inline

Definition at line 139 of file rom.h.

References rom_data_.

Referenced by yaze::editor::ProposalDrawer::AcceptProposal(), yaze::editor::AssemblyEditor::ApplyPatchToRom(), yaze::editor::OverworldEditor::ApplyZSCustomOverworldASM(), yaze::cli::anonymous_namespace{sprite_doctor_commands.cc}::CheckCommonSpriteIssues(), yaze::cli::anonymous_namespace{rom_doctor_commands.cc}::CheckParallelWorldsHeuristics(), yaze::cli::anonymous_namespace{graphics_doctor_commands.cc}::CheckSheetIntegrity(), yaze::cli::EnhancedStatusPanel::CollectRomInfo(), yaze::cli::UnifiedLayout::CreateHexViewerPanel(), yaze::test::TestManager::CreateTestRomCopy(), yaze::gui::DungeonObjectEmulatorPreview::EnsureInitialized(), yaze::emu::Emulator::EnsureInitialized(), yaze::cli::handlers::ProjectBuildCommandHandler::Execute(), yaze::cli::handlers::RomDiffCommandHandler::Execute(), yaze::cli::handlers::RomGenerateGoldenCommandHandler::Execute(), yaze::cli::GraphicsDoctorCommandHandler::Execute(), yaze::cli::HexDumpCommandHandler::Execute(), yaze::cli::HexCompareCommandHandler::Execute(), yaze::cli::HexAnnotateCommandHandler::Execute(), yaze::cli::RomCompareCommandHandler::Execute(), yaze::cli::agent::tools::RomDiffTool::Execute(), yaze::cli::handlers::ToolsHarnessStateCommandHandler::GenerateHarnessState(), yaze::cli::agent::HandleAcceptCommand(), yaze::emu::render::EmulatorRenderService::Initialize(), LoadFromData(), LoadFromFile(), LoadFromFile(), LoadFromFile(), LoadGfxGroups(), yaze::zelda3::LoadPalettes(), LoadZelda3(), main(), ReadByte(), ReadByteVector(), ReadHelper(), ReadLong(), ReadTile16(), ReadTransaction(), ReadWord(), yaze::cli::HexViewerComponent::Render(), yaze::emu::Emulator::Run(), yaze::editor::MessageEditor::Save(), SaveGfxGroups(), SavePalette(), SaveToFile(), yaze::cli::anonymous_namespace{graphics_doctor_commands.cc}::ValidateBlocksets(), yaze::cli::anonymous_namespace{graphics_doctor_commands.cc}::ValidateCompression(), yaze::cli::anonymous_namespace{graphics_doctor_commands.cc}::ValidateGraphicsPointerTable(), yaze::cli::anonymous_namespace{sprite_doctor_commands.cc}::ValidateRoomSprites(), yaze::cli::anonymous_namespace{sprite_doctor_commands.cc}::ValidateSpritePointerTable(), yaze::cli::anonymous_namespace{sprite_doctor_commands.cc}::ValidateSpritesets(), WriteByte(), WriteColor(), WriteLong(), WriteTile16(), WriteVector(), and WriteWord().

◆ mutable_vector() [1/2]

auto & yaze::Rom::mutable_vector ( )
inline

Definition at line 140 of file rom.h.

References rom_data_.

Referenced by yaze::core::PatchManager::ApplyEnabledPatches().

◆ filename() [1/2]

◆ set_filename() [1/2]

auto yaze::Rom::set_filename ( std::string_view name)
inline

Definition at line 142 of file rom.h.

References filename_.

Referenced by yaze::editor::MessageEditor::SaveExpandedMessages().

◆ short_name() [1/2]

auto yaze::Rom::short_name ( ) const
inline

◆ resource_label() [1/2]

◆ LoadFromFile() [2/3]

absl::Status yaze::Rom::LoadFromFile ( const std::string & filename,
bool z3_load = true )

◆ LoadFromFile() [3/3]

◆ LoadFromData() [2/3]

absl::Status yaze::Rom::LoadFromData ( const std::vector< uint8_t > & data,
bool z3_load = true )

◆ LoadFromData() [3/3]

absl::Status yaze::Rom::LoadFromData ( const std::vector< uint8_t > & data,
const RomLoadOptions & options )

Definition at line 830 of file rom_old.cc.

References data(), yaze::RomLoadOptions::load_zelda3_content, LoadZelda3(), RETURN_IF_ERROR, rom_data_, size_, and yaze::RomLoadOptions::strip_header.

Here is the call graph for this function:

◆ LoadZelda3() [1/2]

absl::Status yaze::Rom::LoadZelda3 ( )

Definition at line 851 of file rom_old.cc.

References yaze::RomLoadOptions::AppDefaults(), and LoadZelda3().

Referenced by InitializeForTesting(), LoadFromData(), LoadFromFile(), and LoadZelda3().

Here is the call graph for this function:

◆ LoadZelda3() [2/2]

◆ LoadGfxGroups()

◆ InitializeForTesting()

absl::Status yaze::Rom::InitializeForTesting ( )
inline

Definition at line 107 of file rom_old.h.

References yaze::RomLoadOptions::AppDefaults(), LoadZelda3(), and RETURN_IF_ERROR.

Here is the call graph for this function:

◆ SaveGfxGroups()

◆ SaveToFile() [2/2]

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 ( )

Definition at line 1232 of file rom_old.cc.

References yaze::gfx::PaletteGroupMap::for_each(), palette_groups_, and RETURN_IF_ERROR.

Here is the call graph for this function:

◆ Expand() [2/2]

void yaze::Rom::Expand ( int size)
inline

Definition at line 118 of file rom_old.h.

References rom_data_, size(), and size_.

Here is the call graph for this function:

◆ Close() [2/2]

void yaze::Rom::Close ( )
inline

Definition at line 123 of file rom_old.h.

References yaze::gfx::PaletteGroupMap::clear(), palette_groups_, rom_data_, and size_.

Here is the call graph for this function:

◆ ReadByte() [2/2]

absl::StatusOr< uint8_t > yaze::Rom::ReadByte ( int offset)

◆ ReadWord() [2/2]

absl::StatusOr< uint16_t > yaze::Rom::ReadWord ( int offset)

◆ ReadLong() [2/2]

absl::StatusOr< uint32_t > yaze::Rom::ReadLong ( int offset)

◆ ReadByteVector() [2/2]

absl::StatusOr< std::vector< uint8_t > > yaze::Rom::ReadByteVector ( uint32_t offset,
uint32_t length ) const

◆ ReadTile16() [2/2]

absl::StatusOr< gfx::Tile16 > yaze::Rom::ReadTile16 ( uint32_t tile16_id)

Definition at line 1290 of file rom_old.cc.

References ASSIGN_OR_RETURN, and yaze::kTile16Ptr.

◆ WriteTile16() [2/2]

absl::Status yaze::Rom::WriteTile16 ( int tile16_id,
const gfx::Tile16 & tile )

◆ WriteByte() [2/2]

absl::Status yaze::Rom::WriteByte ( int addr,
uint8_t value )

◆ WriteWord() [2/2]

absl::Status yaze::Rom::WriteWord ( int addr,
uint16_t value )

◆ WriteShort() [2/2]

absl::Status yaze::Rom::WriteShort ( int addr,
uint16_t value )

◆ WriteLong() [2/2]

absl::Status yaze::Rom::WriteLong ( uint32_t addr,
uint32_t value )

◆ WriteVector() [2/2]

absl::Status yaze::Rom::WriteVector ( int addr,
std::vector< uint8_t > data )

◆ WriteColor() [2/2]

absl::Status yaze::Rom::WriteColor ( uint32_t address,
const gfx::SnesColor & color )

◆ WriteTransaction() [2/2]

template<typename... Args>
absl::Status yaze::Rom::WriteTransaction ( Args... args)
inline

Definition at line 145 of file rom_old.h.

References WriteHelper().

Here is the call graph for this function:

◆ ReadTransaction() [2/2]

template<typename T , typename... Args>
absl::Status yaze::Rom::ReadTransaction ( T & var,
int address,
Args &&... args )
inline

Definition at line 153 of file rom_old.h.

References ReadTransaction(), and vector().

Here is the call graph for this function:

◆ WriteHelper() [2/2]

virtual absl::Status yaze::Rom::WriteHelper ( const WriteAction & action)
inlinevirtual

Definition at line 172 of file rom_old.h.

References WriteByte(), WriteColor(), WriteShort(), and WriteVector().

Here is the call graph for this function:

◆ ReadHelper() [2/2]

template<typename T >
absl::Status yaze::Rom::ReadHelper ( T & var,
int address )
inline

Definition at line 194 of file rom_old.h.

References ASSIGN_OR_RETURN, ReadByte(), ReadByteVector(), ReadWord(), and vector().

Here is the call graph for this function:

◆ operator[]() [2/2]

Definition at line 208 of file rom_old.h.

References rom_data_, and size_.

◆ is_loaded() [2/2]

bool yaze::Rom::is_loaded ( ) const
inline

Definition at line 214 of file rom_old.h.

References rom_data_.

◆ dirty() [2/2]

bool yaze::Rom::dirty ( ) const
inline

Definition at line 215 of file rom_old.h.

References dirty_.

◆ set_dirty() [2/2]

void yaze::Rom::set_dirty ( bool dirty)
inline

Definition at line 216 of file rom_old.h.

References dirty(), and dirty_.

Here is the call graph for this function:

◆ ClearDirty() [2/2]

void yaze::Rom::ClearDirty ( )
inline

Definition at line 217 of file rom_old.h.

References dirty_.

◆ title() [2/2]

auto yaze::Rom::title ( ) const
inline

Definition at line 218 of file rom_old.h.

References title_.

◆ size() [2/2]

auto yaze::Rom::size ( ) const
inline

Definition at line 219 of file rom_old.h.

References size_.

◆ data() [2/2]

auto yaze::Rom::data ( ) const
inline

Definition at line 220 of file rom_old.h.

References rom_data_.

◆ mutable_data() [2/2]

auto yaze::Rom::mutable_data ( )
inline

Definition at line 221 of file rom_old.h.

References rom_data_.

◆ begin() [2/2]

auto yaze::Rom::begin ( )
inline

Definition at line 222 of file rom_old.h.

References rom_data_.

◆ end() [2/2]

auto yaze::Rom::end ( )
inline

Definition at line 223 of file rom_old.h.

References rom_data_.

◆ vector() [2/2]

const auto & yaze::Rom::vector ( ) const
inline

Definition at line 224 of file rom_old.h.

References rom_data_.

◆ mutable_vector() [2/2]

auto & yaze::Rom::mutable_vector ( )
inline

Definition at line 225 of file rom_old.h.

References rom_data_.

◆ filename() [2/2]

auto yaze::Rom::filename ( ) const
inline

Definition at line 226 of file rom_old.h.

References filename_.

◆ set_filename() [2/2]

auto yaze::Rom::set_filename ( std::string_view name)
inline

Definition at line 227 of file rom_old.h.

References filename_.

◆ short_name() [2/2]

auto yaze::Rom::short_name ( ) const
inline

Definition at line 228 of file rom_old.h.

References short_name_.

◆ graphics_buffer()

const auto & yaze::Rom::graphics_buffer ( ) const
inline

Definition at line 229 of file rom_old.h.

References graphics_buffer_.

◆ mutable_graphics_buffer()

auto yaze::Rom::mutable_graphics_buffer ( )
inline

Definition at line 230 of file rom_old.h.

References graphics_buffer_.

Referenced by yaze::LoadAllGraphicsData().

◆ palette_group()

const auto & yaze::Rom::palette_group ( ) const
inline

Definition at line 231 of file rom_old.h.

References palette_groups_.

Referenced by yaze::LoadAllGraphicsData(), and yaze::LoadLinkGraphics().

◆ mutable_palette_group()

auto yaze::Rom::mutable_palette_group ( )
inline

Definition at line 232 of file rom_old.h.

References palette_groups_.

◆ dungeon_palette()

auto yaze::Rom::dungeon_palette ( int i)
inline

Definition at line 233 of file rom_old.h.

References yaze::gfx::PaletteGroupMap::dungeon_main, and palette_groups_.

◆ mutable_dungeon_palette()

auto yaze::Rom::mutable_dungeon_palette ( int i)
inline

Definition at line 234 of file rom_old.h.

References yaze::gfx::PaletteGroupMap::dungeon_main, yaze::gfx::PaletteGroup::mutable_palette(), and palette_groups_.

Here is the call graph for this function:

◆ resource_label() [2/2]

project::ResourceLabelManager * yaze::Rom::resource_label ( )
inline

Definition at line 238 of file rom_old.h.

References resource_label_manager_.

◆ version_constants()

zelda3_version_pointers yaze::Rom::version_constants ( ) const
inline

◆ GetDiagnostics()

const GraphicsLoadDiagnostics & yaze::Rom::GetDiagnostics ( ) const
inline

Definition at line 250 of file rom_old.h.

References diagnostics_.

◆ GetMutableDiagnostics()

GraphicsLoadDiagnostics & yaze::Rom::GetMutableDiagnostics ( )
inline

Definition at line 251 of file rom_old.h.

References diagnostics_.

Referenced by yaze::LoadAllGraphicsData().

Member Data Documentation

◆ size_

unsigned long yaze::Rom::size_ = 0
private

◆ title_

std::string yaze::Rom::title_ = "ROM not loaded"
private

Definition at line 155 of file rom.h.

Referenced by LoadZelda3(), and title().

◆ filename_

std::string yaze::Rom::filename_
private

Definition at line 158 of file rom.h.

Referenced by filename(), LoadFromFile(), LoadFromFile(), SaveToFile(), and set_filename().

◆ short_name_

std::string yaze::Rom::short_name_
private

Definition at line 161 of file rom.h.

Referenced by LoadFromFile(), LoadFromFile(), and short_name().

◆ rom_data_

◆ resource_label_manager_

project::ResourceLabelManager yaze::Rom::resource_label_manager_
private

Definition at line 167 of file rom.h.

Referenced by LoadFromFile(), LoadFromFile(), and resource_label().

◆ dirty_

bool yaze::Rom::dirty_ = false
private

Definition at line 170 of file rom.h.

Referenced by ClearDirty(), dirty(), SaveToFile(), set_dirty(), WriteByte(), WriteLong(), WriteVector(), and WriteWord().

◆ main_blockset_ids

std::array<std::array<uint8_t, 8>, kNumMainBlocksets> yaze::Rom::main_blockset_ids

Definition at line 245 of file rom_old.h.

Referenced by LoadGfxGroups(), LoadZelda3(), and SaveGfxGroups().

◆ room_blockset_ids

std::array<std::array<uint8_t, 4>, kNumRoomBlocksets> yaze::Rom::room_blockset_ids

Definition at line 246 of file rom_old.h.

Referenced by LoadGfxGroups(), LoadZelda3(), and SaveGfxGroups().

◆ spriteset_ids

std::array<std::array<uint8_t, 4>, kNumSpritesets> yaze::Rom::spriteset_ids

Definition at line 247 of file rom_old.h.

Referenced by LoadGfxGroups(), LoadZelda3(), and SaveGfxGroups().

◆ paletteset_ids

std::array<std::array<uint8_t, 4>, kNumPalettesets> yaze::Rom::paletteset_ids

Definition at line 248 of file rom_old.h.

Referenced by LoadGfxGroups(), LoadZelda3(), and SaveGfxGroups().

◆ graphics_buffer_

std::vector<uint8_t> yaze::Rom::graphics_buffer_
private

Definition at line 270 of file rom_old.h.

Referenced by graphics_buffer(), and mutable_graphics_buffer().

◆ diagnostics_

GraphicsLoadDiagnostics yaze::Rom::diagnostics_
private

Definition at line 273 of file rom_old.h.

Referenced by GetDiagnostics(), and GetMutableDiagnostics().

◆ palette_groups_

gfx::PaletteGroupMap yaze::Rom::palette_groups_
private

◆ version_

zelda3_version yaze::Rom::version_ = zelda3_version::US
private

Definition at line 282 of file rom_old.h.

Referenced by LoadGfxGroups(), LoadZelda3(), and version_constants().


The documentation for this class was generated from the following files: