Oracle of Secrets game progression state parsed from SRAM. More...
#include <oracle_progression.h>
Public Member Functions | |
| int | GetCrystalCount () const |
| Count completed dungeons using popcount on crystal bitfield. | |
| bool | IsDungeonComplete (int dungeon_number) const |
| Check if a specific dungeon is complete. | |
| std::string | GetGameStateName () const |
| Get human-readable name for the current game state. | |
Static Public Member Functions | |
| static OracleProgressionState | ParseFromSRAM (const uint8_t *data, size_t len) |
| Parse progression state from raw SRAM data. | |
| static std::string | GetDungeonName (int dungeon_number) |
| Get the dungeon name for a dungeon number (1-7). | |
| static uint8_t | GetCrystalMask (int dungeon_number) |
| Get the crystal bitmask for a dungeon number (1-7). | |
Public Attributes | |
| uint8_t | crystal_bitfield = 0 |
| uint8_t | game_state = 0 |
| uint8_t | oosprog = 0 |
| uint8_t | oosprog2 = 0 |
| uint8_t | side_quest = 0 |
| uint8_t | pendants = 0 |
Static Public Attributes | |
| static constexpr uint16_t | kCrystalOffset = 0x37A |
| static constexpr uint16_t | kGameStateOffset = 0x3C5 |
| static constexpr uint16_t | kOosProgOffset = 0x3D6 |
| static constexpr uint16_t | kOosProg2Offset = 0x3C6 |
| static constexpr uint16_t | kSideQuestOffset = 0x3D7 |
| static constexpr uint16_t | kPendantOffset = 0x374 |
| static constexpr uint8_t | kCrystalD1 = 0x01 |
| static constexpr uint8_t | kCrystalD6 = 0x02 |
| static constexpr uint8_t | kCrystalD5 = 0x04 |
| static constexpr uint8_t | kCrystalD7 = 0x08 |
| static constexpr uint8_t | kCrystalD2 = 0x10 |
| static constexpr uint8_t | kCrystalD4 = 0x20 |
| static constexpr uint8_t | kCrystalD3 = 0x40 |
Oracle of Secrets game progression state parsed from SRAM.
This struct represents the key SRAM variables that track game progress:
Crystal bit mapping (intentionally non-sequential for non-linear design): D1 Mushroom Grotto = 0x01 D2 Tail Palace = 0x10 D6 Goron Mines = 0x02 D4 Zora Temple = 0x20 D5 Glacia Estate = 0x04 D3 Kalyxo Castle = 0x40 D7 Dragon Ship = 0x08
Definition at line 26 of file oracle_progression.h.
|
static |
Parse progression state from raw SRAM data.
| data | Pointer to SRAM data starting at $7EF000. |
| len | Length of the data buffer. |
Definition at line 5 of file oracle_progression.cc.
References crystal_bitfield, game_state, kCrystalOffset, kGameStateOffset, kOosProg2Offset, kOosProgOffset, kPendantOffset, kSideQuestOffset, oosprog, oosprog2, pendants, and side_quest.
Referenced by yaze::core::LoadOracleProgressionFromSrmFile().
| int yaze::core::OracleProgressionState::GetCrystalCount | ( | ) | const |
Count completed dungeons using popcount on crystal bitfield.
Only counts the 7 valid crystal bits (D1-D7). Upper bit is unused.
Definition at line 24 of file oracle_progression.cc.
References crystal_bitfield.
Referenced by yaze::editor::ProgressionDashboardPanel::DrawCrystalTracker().
| bool yaze::core::OracleProgressionState::IsDungeonComplete | ( | int | dungeon_number | ) | const |
Check if a specific dungeon is complete.
| dungeon_number | 1-7 (D1-D7). Returns false for out-of-range. |
Definition at line 35 of file oracle_progression.cc.
References crystal_bitfield, and GetCrystalMask().
Referenced by yaze::editor::ProgressionDashboardPanel::DrawDungeonGrid().

| std::string yaze::core::OracleProgressionState::GetGameStateName | ( | ) | const |
Get human-readable name for the current game state.
Definition at line 40 of file oracle_progression.cc.
References game_state.
Referenced by yaze::editor::ProgressionDashboardPanel::DrawGameState().
|
static |
Get the dungeon name for a dungeon number (1-7).
Definition at line 55 of file oracle_progression.cc.
|
static |
Get the crystal bitmask for a dungeon number (1-7).
Returns 0 for out-of-range values.
Definition at line 76 of file oracle_progression.cc.
References kCrystalD1, kCrystalD2, kCrystalD3, kCrystalD4, kCrystalD5, kCrystalD6, and kCrystalD7.
Referenced by yaze::editor::ProgressionDashboardPanel::DrawCrystalTracker(), and IsDungeonComplete().
| uint8_t yaze::core::OracleProgressionState::crystal_bitfield = 0 |
Definition at line 27 of file oracle_progression.h.
Referenced by yaze::editor::ProgressionDashboardPanel::DrawCrystalTracker(), yaze::editor::ProgressionDashboardPanel::DrawManualControls(), yaze::core::StoryEventGraph::GetCompletedNodes(), yaze::core::StoryEventGraph::GetCompletedNodes(), GetCrystalCount(), yaze::core::anonymous_namespace{story_event_graph.cc}::GetRegisterValue(), IsDungeonComplete(), ParseFromSRAM(), yaze::editor::ProgressionDashboardPanel::RefreshStateFromLiveSram(), yaze::editor::StoryEventGraphPanel::RefreshStateFromLiveSram(), yaze::editor::ProgressionDashboardPanel::StatesEqual(), and yaze::core::StoryEventGraph::UpdateStatus().
| uint8_t yaze::core::OracleProgressionState::game_state = 0 |
Definition at line 28 of file oracle_progression.h.
Referenced by yaze::editor::ProgressionDashboardPanel::DrawGameState(), yaze::editor::ProgressionDashboardPanel::DrawManualControls(), yaze::editor::ProgressionDashboardPanel::DrawSrmImportControls(), yaze::core::StoryEventGraph::GetCompletedNodes(), yaze::core::StoryEventGraph::GetCompletedNodes(), GetGameStateName(), yaze::core::anonymous_namespace{story_event_graph.cc}::GetRegisterValue(), ParseFromSRAM(), yaze::editor::ProgressionDashboardPanel::RefreshStateFromLiveSram(), yaze::editor::StoryEventGraphPanel::RefreshStateFromLiveSram(), yaze::editor::ProgressionDashboardPanel::StatesEqual(), and yaze::core::StoryEventGraph::UpdateStatus().
| uint8_t yaze::core::OracleProgressionState::oosprog = 0 |
Definition at line 29 of file oracle_progression.h.
Referenced by yaze::editor::ProgressionDashboardPanel::DrawStoryFlags(), yaze::core::anonymous_namespace{story_event_graph.cc}::GetRegisterValue(), ParseFromSRAM(), yaze::editor::ProgressionDashboardPanel::RefreshStateFromLiveSram(), yaze::editor::StoryEventGraphPanel::RefreshStateFromLiveSram(), and yaze::editor::ProgressionDashboardPanel::StatesEqual().
| uint8_t yaze::core::OracleProgressionState::oosprog2 = 0 |
Definition at line 30 of file oracle_progression.h.
Referenced by yaze::editor::ProgressionDashboardPanel::DrawStoryFlags(), yaze::core::anonymous_namespace{story_event_graph.cc}::GetRegisterValue(), ParseFromSRAM(), yaze::editor::ProgressionDashboardPanel::RefreshStateFromLiveSram(), yaze::editor::StoryEventGraphPanel::RefreshStateFromLiveSram(), and yaze::editor::ProgressionDashboardPanel::StatesEqual().
| uint8_t yaze::core::OracleProgressionState::side_quest = 0 |
Definition at line 31 of file oracle_progression.h.
Referenced by yaze::editor::ProgressionDashboardPanel::DrawStoryFlags(), yaze::core::anonymous_namespace{story_event_graph.cc}::GetRegisterValue(), ParseFromSRAM(), yaze::editor::ProgressionDashboardPanel::RefreshStateFromLiveSram(), yaze::editor::StoryEventGraphPanel::RefreshStateFromLiveSram(), and yaze::editor::ProgressionDashboardPanel::StatesEqual().
| uint8_t yaze::core::OracleProgressionState::pendants = 0 |
Definition at line 32 of file oracle_progression.h.
Referenced by yaze::core::anonymous_namespace{story_event_graph.cc}::GetRegisterValue(), ParseFromSRAM(), yaze::editor::ProgressionDashboardPanel::RefreshStateFromLiveSram(), yaze::editor::StoryEventGraphPanel::RefreshStateFromLiveSram(), and yaze::editor::ProgressionDashboardPanel::StatesEqual().
|
staticconstexpr |
Definition at line 36 of file oracle_progression.h.
Referenced by ParseFromSRAM(), yaze::editor::ProgressionDashboardPanel::RefreshStateFromLiveSram(), and yaze::editor::StoryEventGraphPanel::RefreshStateFromLiveSram().
|
staticconstexpr |
Definition at line 37 of file oracle_progression.h.
Referenced by ParseFromSRAM(), yaze::editor::ProgressionDashboardPanel::RefreshStateFromLiveSram(), and yaze::editor::StoryEventGraphPanel::RefreshStateFromLiveSram().
|
staticconstexpr |
Definition at line 38 of file oracle_progression.h.
Referenced by ParseFromSRAM(), yaze::editor::ProgressionDashboardPanel::RefreshStateFromLiveSram(), and yaze::editor::StoryEventGraphPanel::RefreshStateFromLiveSram().
|
staticconstexpr |
Definition at line 39 of file oracle_progression.h.
Referenced by ParseFromSRAM(), yaze::editor::ProgressionDashboardPanel::RefreshStateFromLiveSram(), and yaze::editor::StoryEventGraphPanel::RefreshStateFromLiveSram().
|
staticconstexpr |
Definition at line 40 of file oracle_progression.h.
Referenced by ParseFromSRAM(), yaze::editor::ProgressionDashboardPanel::RefreshStateFromLiveSram(), and yaze::editor::StoryEventGraphPanel::RefreshStateFromLiveSram().
|
staticconstexpr |
Definition at line 41 of file oracle_progression.h.
Referenced by ParseFromSRAM(), yaze::editor::ProgressionDashboardPanel::RefreshStateFromLiveSram(), and yaze::editor::StoryEventGraphPanel::RefreshStateFromLiveSram().
|
staticconstexpr |
Definition at line 45 of file oracle_progression.h.
Referenced by GetCrystalMask().
|
staticconstexpr |
Definition at line 46 of file oracle_progression.h.
Referenced by GetCrystalMask().
|
staticconstexpr |
Definition at line 47 of file oracle_progression.h.
Referenced by GetCrystalMask().
|
staticconstexpr |
Definition at line 48 of file oracle_progression.h.
Referenced by GetCrystalMask().
|
staticconstexpr |
Definition at line 49 of file oracle_progression.h.
Referenced by GetCrystalMask().
|
staticconstexpr |
Definition at line 50 of file oracle_progression.h.
Referenced by GetCrystalMask().
|
staticconstexpr |
Definition at line 51 of file oracle_progression.h.
Referenced by GetCrystalMask().