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. More...

#include <rom.h>

Inheritance diagram for yaze::Rom:
Collaboration diagram for yaze::Rom:

Classes

struct  SaveSettings
 
struct  WriteAction
 

Public Member Functions

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 ()
 
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)
 
core::ResourceLabelManagerresource_label ()
 
zelda3_version_pointers version_constants () const
 

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_
 
std::vector< uint8_tgraphics_buffer_
 
core::ResourceLabelManager resource_label_manager_
 
gfx::PaletteGroupMap palette_groups_
 
zelda3_version version_ = zelda3_version::US
 
bool dirty_ = false
 

Detailed Description

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

Definition at line 71 of file rom.h.

Member Function Documentation

◆ LoadFromFile() [1/2]

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

Definition at line 289 of file rom.cc.

References yaze::RomLoadOptions::AppDefaults(), filename(), LoadFromFile(), yaze::RomLoadOptions::RawDataOnly(), and vector().

Referenced by yaze::editor::ProposalDrawer::AcceptProposal(), yaze::cli::agent::CreateProposalFromAgentResponse(), ROMPatchUtility::CreateV3PatchedROM(), 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(), OverworldGoldenDataExtractor::ExtractAllData(), DungeonTestHarness::GenerateHarnessState(), yaze::cli::agent::HandleAcceptCommand(), yaze::cli::HandleDungeonExportLegacy(), yaze::cli::HandleDungeonListObjectsLegacy(), 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::editor::EditorManager::LoadRom(), yaze::cli::agent::anonymous_namespace{conversation_test.cc}::LoadRomForAgent(), yaze::cli::message::anonymous_namespace{message.cc}::LoadRomFromFlag(), main(), main(), main(), yaze::editor::EditorManager::OpenProject(), yaze::editor::EditorManager::OpenRomOrProject(), yaze::cli::ModernCLI::Run(), yaze::test::IntegratedTestSuite::RunRomBasicTest(), yaze::test::DungeonRoomTest::SetUp(), yaze::test::MessageRomTest::SetUp(), yaze::test::TEST_F(), and yaze::editor::MemoryEditorWithDiffChecker::Update().

◆ LoadFromFile() [2/2]

◆ LoadFromData() [1/2]

◆ LoadFromData() [2/2]

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

Definition at line 387 of file rom.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 408 of file rom.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 91 of file rom.h.

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

Here is the call graph for this function:

◆ SaveGfxGroups()

◆ SaveToFile()

◆ 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 645 of file rom.cc.

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

Referenced by SaveToFile().

Here is the call graph for this function:

◆ Expand()

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

Definition at line 102 of file rom.h.

References rom_data_, size(), and size_.

Referenced by yaze::cli::agent::HandleAcceptCommand().

Here is the call graph for this function:

◆ Close()

void yaze::Rom::Close ( )
inline

Definition at line 107 of file rom.h.

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

Referenced by yaze::editor::EditorManager::Initialize().

Here is the call graph for this function:

◆ ReadByte()

◆ ReadWord()

◆ ReadLong()

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

Definition at line 673 of file rom.cc.

Referenced by yaze::Transaction::WriteLong().

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

◆ WriteWord()

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

◆ WriteShort()

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

Definition at line 750 of file rom.cc.

References LOG_DEBUG.

Referenced by yaze::zelda3::RoomEntrance::Save(), and WriteHelper().

◆ WriteLong()

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

Definition at line 763 of file rom.cc.

References LOG_DEBUG.

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

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

Definition at line 792 of file rom.cc.

References LOG_DEBUG, and yaze::gfx::SnesColor::snes().

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

Here is the call graph for this function:

◆ WriteTransaction()

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

Definition at line 129 of file rom.h.

References WriteHelper().

Referenced by yaze::test::TEST_F(), and yaze::test::TEST_F().

Here is the call graph for this function:

◆ ReadTransaction()

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

Definition at line 137 of file rom.h.

References ReadTransaction(), and vector().

Referenced by ReadTransaction(), yaze::test::TEST_F(), and yaze::test::TEST_F().

Here is the call graph for this function:

◆ WriteHelper()

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

Definition at line 156 of file rom.h.

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

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

Definition at line 178 of file rom.h.

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

Here is the call graph for this function:

◆ operator[]()

Definition at line 192 of file rom.h.

References rom_data_, and size_.

◆ is_loaded()

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

Definition at line 197 of file rom.h.

References rom_data_.

Referenced by yaze::net::CollaborationService::ApplyDiff(), yaze::cli::Tile16ProposalGenerator::ApplyProposal(), yaze::net::CollaborationService::ApplyRomSync(), yaze::editor::EditorManager::BuildModernMenu(), yaze::net::RomVersionManager::ComputeRomHash(), yaze::zelda3::Room::CopyRoomGraphicsToBuffer(), yaze::cli::agent::CreateProposalFromAgentResponse(), yaze::cli::RomSandboxManager::CreateSandbox(), yaze::net::RomVersionManager::CreateSnapshot(), yaze::test::TestManager::CreateTestRomCopy(), yaze::net::RomVersionManager::DetectCorruption(), yaze::gui::PaletteEditorWidget::Draw(), yaze::editor::GraphicsEditor::DrawClipboardImport(), yaze::test::E2ETestSuite::DrawConfiguration(), yaze::test::RomDependentTestSuite::DrawConfiguration(), yaze::test::ZSCustomOverworldTestSuite::DrawConfiguration(), yaze::editor::DungeonCanvasViewer::DrawDungeonCanvas(), yaze::editor::DungeonRoomSelector::DrawEntranceSelector(), yaze::editor::DungeonEditorV2::DrawEntrancesListCard(), yaze::zelda3::ObjectDrawer::DrawObject(), yaze::editor::DungeonObjectSelector::DrawObjectBrowser(), yaze::editor::OverworldEditor::DrawOverworldCanvas(), yaze::editor::EditorManager::DrawRomSelector(), yaze::editor::DungeonObjectSelector::DrawRoomGraphics(), yaze::editor::DungeonEditorV2::DrawRoomGraphicsCard(), yaze::editor::DungeonRoomSelector::DrawRoomSelector(), yaze::editor::DungeonEditorV2::DrawRoomsListCard(), yaze::editor::AgentEditor::DrawStatusPanel(), yaze::test::TestManager::DrawTestDashboard(), yaze::cli::agent::anonymous_namespace{general_commands.cc}::EnsureRomLoaded(), yaze::cli::handlers::RomInfoCommandHandler::Execute(), yaze::cli::handlers::RomValidateCommandHandler::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::net::CollaborationService::GenerateDiff(), yaze::cli::Tile16ProposalGenerator::GenerateDiff(), yaze::net::RomVersionManager::GetCurrentHash(), yaze::cli::ResourceContextBuilder::GetLabels(), yaze::zelda3::RoomLayout::GetLayoutAddress(), yaze::editor::DungeonEditorV2::GetRomStatus(), yaze::editor::OverworldEditor::GetRomStatus(), yaze::editor::GetRomStatusMessage(), yaze::cli::agent::HandleCommitCommand(), yaze::cli::agent::HandleDiffCommand(), yaze::cli::HandleDungeonExportLegacy(), yaze::cli::HandleDungeonListObjectsLegacy(), 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::net::CollaborationService::HostSession(), yaze::cli::resources::CommandContext::Initialize(), yaze::net::CollaborationService::Initialize(), yaze::editor::DungeonEditorV2::IsRomLoaded(), yaze::editor::OverworldEditor::IsRomLoaded(), yaze::editor::IsRomReadyForEditing(), yaze::test::MockRom::IsValid(), yaze::net::CollaborationService::JoinSession(), yaze::editor::DungeonEditorV2::Load(), yaze::editor::OverworldEditor::Load(), yaze::editor::DungeonRoomLoader::LoadAllRooms(), yaze::editor::DungeonCanvasViewer::LoadAndRenderRoomGraphics(), yaze::editor::DungeonRoomLoader::LoadAndRenderRoomGraphics(), yaze::zelda3::Room::LoadAnimatedGraphics(), yaze::zelda3::Room::LoadLayoutTilesToBuffer(), yaze::cli::agent::anonymous_namespace{conversation_test.cc}::LoadRomForAgent(), yaze::editor::DungeonRoomLoader::LoadRoom(), yaze::editor::DungeonRoomLoader::LoadRoomEntrances(), main(), yaze::cli::Tile16ProposalGenerator::ParseReplaceTileCommand(), yaze::cli::Tile16ProposalGenerator::ParseSetAreaCommand(), yaze::cli::Tile16ProposalGenerator::ParseSetTileCommand(), yaze::test::TestManager::RefreshCurrentRom(), yaze::editor::DungeonRoomLoader::ReloadAllRoomGraphics(), yaze::gui::DungeonObjectEmulatorPreview::Render(), yaze::cli::HexViewerComponent::Render(), yaze::zelda3::Room::RenderObjectsToBackground(), yaze::net::RomVersionManager::RestoreSnapshot(), yaze::cli::ModernCLI::Run(), 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::cli::agent::ConversationalAgentService::SendMessage(), yaze::test::TestManager::SetCurrentRom(), yaze::editor::AgentChatWidget::SetRomContext(), yaze::net::CollaborationService::SubmitChangesAsProposal(), yaze::test::TestManager::TestRomDataIntegrity(), yaze::test::TestManager::TestRomSaveLoad(), yaze::test::TestManager::TestRomWithCopy(), yaze::gui::DungeonObjectEmulatorPreview::TriggerEmulatedRender(), yaze::cli::UnifiedLayout::UnifiedLayout(), yaze::editor::EditorManager::Update(), yaze::editor::OverworldEditor::Update(), and yaze::net::RomVersionManager::ValidateRomIntegrity().

◆ dirty()

◆ set_dirty()

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

Definition at line 199 of file rom.h.

References dirty(), and dirty_.

Referenced by yaze::editor::OverworldEditor::DrawOverworldCanvas(), and yaze::editor::OverworldEditor::Update().

Here is the call graph for this function:

◆ ClearDirty()

void yaze::Rom::ClearDirty ( )
inline

Definition at line 200 of file rom.h.

References dirty_.

◆ title()

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

Definition at line 201 of file rom.h.

References title_.

Referenced by yaze::editor::EditorManager::BuildModernMenu(), 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::EditorManager::DrawMenuBar(), yaze::editor::AgentEditor::DrawStatusPanel(), yaze::test::TestManager::DrawTestDashboard(), yaze::cli::handlers::RomInfoCommandHandler::Execute(), yaze::cli::handlers::RomValidateCommandHandler::Execute(), yaze::editor::EditorManager::RomSession::GetDisplayName(), yaze::editor::DungeonEditorV2::GetRomStatus(), yaze::editor::OverworldEditor::GetRomStatus(), yaze::editor::GetRomStatusMessage(), yaze::cli::agent::HandleTestConversationCommand(), yaze::editor::IsRomReadyForEditing(), yaze::editor::EditorManager::LoadRom(), yaze::editor::EditorManager::OpenProject(), 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::editor::EditorManager::SwitchToSession(), yaze::test::TestManager::TestRomDataIntegrity(), yaze::test::TestManager::TestRomSaveLoad(), yaze::cli::UnifiedLayout::UnifiedLayout(), yaze::test::OverworldE2ETest::ValidateROMAgainstGoldenData(), and OverworldGoldenDataExtractor::WriteBasicROMInfo().

◆ size()

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

Definition at line 202 of file rom.h.

References size_.

Referenced by yaze::cli::tui::ChatTUI::ChatTUI(), yaze::cli::EnhancedStatusPanel::CollectRomInfo(), yaze::net::RomVersionManager::ComputeRomHash(), yaze::cli::UnifiedLayout::CreateChatPanel(), yaze::cli::UnifiedLayout::CreateHexViewerPanel(), yaze::net::RomVersionManager::CreateSnapshot(), yaze::net::RomVersionManager::DetectCorruption(), yaze::test::E2ETestSuite::DrawConfiguration(), yaze::test::RomDependentTestSuite::DrawConfiguration(), yaze::editor::GraphicsEditor::DrawMemoryEditor(), yaze::editor::EditorManager::DrawRomSelector(), yaze::cli::agent::EnhancedTUI::DrawSidebar(), yaze::test::TestManager::DrawTestDashboard(), 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(), Expand(), yaze::net::RomVersionManager::GetCurrentHash(), yaze::zelda3::RoomLayout::GetLayoutAddress(), yaze::cli::agent::HandleAcceptCommand(), yaze::test::MockRom::IsValid(), yaze::zelda3::RoomLayout::LoadLayout(), yaze::zelda3::Room::LoadObjects(), yaze::editor::Tile16Editor::LoadTile8(), yaze::zelda3::OverworldMap::LoadVanillaOverlayData(), main(), yaze::zelda3::Room::ParseObjectsFromLocation(), yaze::zelda3::ObjectParser::ParseSubtype1(), yaze::zelda3::ObjectParser::ParseSubtype2(), yaze::zelda3::ObjectParser::ParseSubtype3(), yaze::cli::EnhancedChatComponent::ProcessMessage(), yaze::zelda3::ObjectParser::ReadTileData(), yaze::test::TestManager::RefreshCurrentRom(), yaze::cli::HexViewerComponent::Render(), yaze::net::RomVersionManager::RestoreSnapshot(), yaze::test::IntegratedTestSuite::RunRomBasicTest(), yaze::test::RomDependentTestSuite::RunRomHeaderValidationTest(), yaze::test::E2ETestSuite::RunRomLoadSaveTest(), yaze::test::RomDependentTestSuite::RunTests(), yaze::zelda3::Room::SaveObjects(), yaze::editor::AgentChatWidget::SetRomContext(), yaze::cli::tui::ChatTUI::SetRomContext(), yaze::test::TestManager::ShowRomComparisonResults(), yaze::test::TEST_F(), yaze::test::TestManager::TestRomDataIntegrity(), yaze::editor::MemoryEditorWithDiffChecker::Update(), yaze::gfx::lc_lz2::ValidateCompressionResult(), yaze::gfx::lc_lz2::ValidateCompressionResultV3(), yaze::test::OverworldE2ETest::ValidateROMAgainstGoldenData(), yaze::net::RomVersionManager::ValidateRomIntegrity(), and OverworldGoldenDataExtractor::WriteBasicROMInfo().

◆ data()

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

Definition at line 203 of file rom.h.

References rom_data_.

Referenced by yaze::editor::BuildDictionaryEntries(), yaze::zelda3::CalculateRoomSize(), yaze::net::RomVersionManager::ComputeRomHash(), yaze::net::RomVersionManager::CreateSnapshot(), yaze::editor::GraphicsEditor::DecompressImportData(), yaze::editor::GraphicsEditor::DecompressSuperDonkey(), yaze::net::RomVersionManager::DetectCorruption(), yaze::test::TestManager::DrawTestDashboard(), yaze::editor::GraphicsEditor::DrawTilemapImport(), yaze::zelda3::RoomObject::EnsureTilesLoaded(), yaze::cli::handlers::HexReadCommandHandler::Execute(), yaze::cli::handlers::HexSearchCommandHandler::Execute(), yaze::test::anonymous_namespace{compression_test.cc}::ExpectDecompressBytesOk(), yaze::test::anonymous_namespace{compression_test.cc}::ExpectDecompressOk(), yaze::net::RomVersionManager::GetCurrentHash(), yaze::editor::MessageEditor::Initialize(), yaze::Load2BppGraphics(), yaze::LoadAllGraphicsData(), yaze::zelda3::LoadDungeonMaps(), yaze::zelda3::LoadDungeonMapTile16(), yaze::LoadFontGraphics(), LoadFromData(), LoadFromData(), yaze::zelda3::RoomLayout::LoadLayout(), yaze::cli::message::anonymous_namespace{message.cc}::LoadMessages(), yaze::zelda3::LoadRoomFromRom(), yaze::zelda3::ObjectParser::ParseSubtype1(), yaze::zelda3::ObjectParser::ParseSubtype2(), yaze::zelda3::ObjectParser::ParseSubtype3(), yaze::zelda3::ObjectParser::ReadTileData(), yaze::zelda3::anonymous_namespace{room_layout.cc}::ReadWord(), yaze::zelda3::Room::RenderObjectsToBackground(), yaze::zelda3::RoomEntrance::RoomEntrance(), yaze::SaveAllGraphicsData(), yaze::zelda3::SaveDungeonMapTile16(), yaze::test::MockRom::SetObjectData(), yaze::test::MockRom::SetRoomData(), yaze::test::MockRom::SetTestData(), yaze::gui::DungeonObjectEmulatorPreview::TriggerEmulatedRender(), yaze::gfx::lc_lz2::ValidateCompressionResult(), and yaze::gfx::lc_lz2::ValidateCompressionResultV3().

◆ mutable_data()

◆ begin()

auto yaze::Rom::begin ( )
inline

◆ end()

auto yaze::Rom::end ( )
inline

Definition at line 206 of file rom.h.

References rom_data_.

◆ vector()

◆ filename()

◆ set_filename()

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

Definition at line 209 of file rom.h.

References filename_.

◆ short_name()

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

Definition at line 210 of file rom.h.

References short_name_.

Referenced by yaze::editor::EditorManager::DrawRomSelector().

◆ graphics_buffer()

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

◆ mutable_graphics_buffer()

auto yaze::Rom::mutable_graphics_buffer ( )
inline

Definition at line 212 of file rom.h.

References graphics_buffer_.

Referenced by yaze::LoadAllGraphicsData().

◆ palette_group()

◆ mutable_palette_group()

◆ dungeon_palette()

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

Definition at line 215 of file rom.h.

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

◆ mutable_dungeon_palette()

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

◆ resource_label()

◆ version_constants()

Member Data Documentation

◆ main_blockset_ids

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

◆ room_blockset_ids

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

◆ spriteset_ids

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

◆ paletteset_ids

◆ size_

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

Definition at line 232 of file rom.h.

Referenced by Close(), Expand(), LoadFromData(), LoadFromFile(), LoadZelda3(), operator[](), and size().

◆ title_

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

Definition at line 235 of file rom.h.

Referenced by LoadZelda3(), and title().

◆ filename_

std::string yaze::Rom::filename_ = ""
private

Definition at line 238 of file rom.h.

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

◆ short_name_

std::string yaze::Rom::short_name_ = ""
private

Definition at line 241 of file rom.h.

Referenced by LoadFromFile(), and short_name().

◆ rom_data_

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

◆ graphics_buffer_

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

Definition at line 247 of file rom.h.

Referenced by graphics_buffer(), and mutable_graphics_buffer().

◆ resource_label_manager_

core::ResourceLabelManager yaze::Rom::resource_label_manager_
private

Definition at line 250 of file rom.h.

Referenced by LoadFromFile(), and resource_label().

◆ palette_groups_

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

◆ version_

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

Definition at line 256 of file rom.h.

Referenced by LoadZelda3(), and version_constants().

◆ dirty_

bool yaze::Rom::dirty_ = false
private

Definition at line 259 of file rom.h.

Referenced by ClearDirty(), dirty(), SaveToFile(), and set_dirty().


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