yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::zelda3::anonymous_namespace{overworld_allocation.cc} Namespace Reference

Typedefs

using ordered_json = nlohmann::ordered_json
 

Functions

uint32_t LoRomSnesToPc (uint32_t snes)
 
uint32_t LoRomPcToSnes (uint32_t pc)
 
std::string SnesText (uint32_t snes)
 
std::string HexByte (int value)
 
std::string AreaText (int area)
 
std::string RangeText (int first, int last)
 
bool IsZsV3 (uint8_t asm_version)
 
uint8_t ReadAsmVersion (const Rom &rom)
 
bool InRom (const Rom &rom, uint32_t pc, size_t length)
 
uint32_t ReadLong (const Rom &rom, uint32_t pc)
 
uint16_t ReadWord (const Rom &rom, uint32_t pc)
 
std::string HexBytes (const uint8_t *data, size_t count)
 
AreaTableInfo RomTable (const char *id, const char *label, const char *group, uint32_t pc, int entry_bytes, int first_area, int last_area, std::string past_end, std::string note="")
 
AreaTableInfo RamTable (const char *id, const char *label, const char *group, uint32_t snes, int entry_bytes, int first_area, int last_area, std::string past_end, std::string note="")
 
std::vector< AreaTableInfo > ZsCustomV3Tables ()
 
std::vector< AreaTableInfo > VanillaTables ()
 
AllocationAreaSize DecodeAreaSize (uint8_t value, bool zs_v3)
 
int VanillaSpecialParent (int area)
 
void ScanAreaMap (const Rom &rom, uint32_t high_table_pc, uint32_t low_table_pc, int index, AreaAllocation *area)
 
int CountSpriteList (const Rom &rom, uint16_t pointer, bool *valid)
 
std::string EvidenceCount (int count, const char *singular, const char *plural)
 
std::string JoinAreas (const std::vector< int > &areas)
 
TailCheckRegion MakeRegion (const Rom &rom, const TailCheckAnnotator &annotator, const char *id, const char *label, uint32_t snes, int length)
 
TailStreamCheck CheckBlankStream (const Rom &rom, const char *id, uint32_t snes, const std::vector< uint8_t > &planned, bool applied)
 
ordered_json TableJson (const AreaTableInfo &table)
 
ordered_json StreamJson (const MapStreamScan &scan)
 
ordered_json AreaJson (const AreaAllocation &area)
 
ordered_json TailJson (const TailMapExpansionCheck &check)
 
std::string MapColumn (const AreaAllocation &area)
 

Variables

constexpr uint32_t kAsmVersionPc = 0x140145
 
constexpr uint32_t kZsFunctionSpacePc = 0x141940
 
constexpr int kMap32PerScreen = 256
 
constexpr uint32_t kMap32HighPc = 0x1794D
 
constexpr uint32_t kMap32LowPc = 0x17B2D
 
constexpr uint32_t kPoolParentPc = 0x140998
 
constexpr uint32_t kPoolOverlayPc = 0x140340
 
constexpr uint32_t kAreaSizePc = 0x1788D
 
constexpr uint32_t kVanillaParentPc = 0x125EC
 
constexpr std::array< uint32_t, 3 > kPoolSpritePointerPcs
 
constexpr uint32_t kOverworldSpriteBankPc = 0x48000
 
constexpr int kMaxSpritesPerList = 0x80
 
constexpr std::array< int, 8 > kZsCodeOverlayIds
 
constexpr std::array< int, 9 > kVanillaCodeOverlayIds
 

Typedef Documentation

◆ ordered_json

using yaze::zelda3::anonymous_namespace{overworld_allocation.cc}::ordered_json = nlohmann::ordered_json

Definition at line 21 of file overworld_allocation.cc.

Function Documentation

◆ LoRomSnesToPc()

uint32_t yaze::zelda3::anonymous_namespace{overworld_allocation.cc}::LoRomSnesToPc ( uint32_t snes)

Definition at line 44 of file overworld_allocation.cc.

References LoRomSnesToPc().

Referenced by CheckBlankStream(), LoRomSnesToPc(), MakeRegion(), and ScanAreaMap().

Here is the call graph for this function:

◆ LoRomPcToSnes()

uint32_t yaze::zelda3::anonymous_namespace{overworld_allocation.cc}::LoRomPcToSnes ( uint32_t pc)

Definition at line 48 of file overworld_allocation.cc.

References LoRomPcToSnes().

Referenced by CheckBlankStream(), LoRomPcToSnes(), and RomTable().

Here is the call graph for this function:

◆ SnesText()

std::string yaze::zelda3::anonymous_namespace{overworld_allocation.cc}::SnesText ( uint32_t snes)

Definition at line 52 of file overworld_allocation.cc.

References SnesText().

Referenced by CheckBlankStream(), SnesText(), StreamJson(), TableJson(), and TailJson().

Here is the call graph for this function:

◆ HexByte()

std::string yaze::zelda3::anonymous_namespace{overworld_allocation.cc}::HexByte ( int value)

Definition at line 56 of file overworld_allocation.cc.

◆ AreaText()

std::string yaze::zelda3::anonymous_namespace{overworld_allocation.cc}::AreaText ( int area)

Definition at line 60 of file overworld_allocation.cc.

References AreaText().

Referenced by AreaText(), JoinAreas(), and MapColumn().

Here is the call graph for this function:

◆ RangeText()

std::string yaze::zelda3::anonymous_namespace{overworld_allocation.cc}::RangeText ( int first,
int last )

Definition at line 64 of file overworld_allocation.cc.

◆ IsZsV3()

bool yaze::zelda3::anonymous_namespace{overworld_allocation.cc}::IsZsV3 ( uint8_t asm_version)

Definition at line 68 of file overworld_allocation.cc.

References IsZsV3().

Referenced by IsZsV3().

Here is the call graph for this function:

◆ ReadAsmVersion()

uint8_t yaze::zelda3::anonymous_namespace{overworld_allocation.cc}::ReadAsmVersion ( const Rom & rom)

Definition at line 72 of file overworld_allocation.cc.

References yaze::Rom::data(), kAsmVersionPc, ReadAsmVersion(), and yaze::Rom::size().

Referenced by ReadAsmVersion().

Here is the call graph for this function:

◆ InRom()

bool yaze::zelda3::anonymous_namespace{overworld_allocation.cc}::InRom ( const Rom & rom,
uint32_t pc,
size_t length )

Definition at line 76 of file overworld_allocation.cc.

References InRom(), and yaze::Rom::size().

Referenced by InRom(), MakeRegion(), and ScanAreaMap().

Here is the call graph for this function:

◆ ReadLong()

uint32_t yaze::zelda3::anonymous_namespace{overworld_allocation.cc}::ReadLong ( const Rom & rom,
uint32_t pc )

Definition at line 80 of file overworld_allocation.cc.

References yaze::Rom::data(), and ReadLong().

Referenced by ReadLong(), and ScanAreaMap().

Here is the call graph for this function:

◆ ReadWord()

uint16_t yaze::zelda3::anonymous_namespace{overworld_allocation.cc}::ReadWord ( const Rom & rom,
uint32_t pc )

Definition at line 85 of file overworld_allocation.cc.

References yaze::Rom::data(), and ReadWord().

Referenced by ReadWord().

Here is the call graph for this function:

◆ HexBytes()

std::string yaze::zelda3::anonymous_namespace{overworld_allocation.cc}::HexBytes ( const uint8_t * data,
size_t count )

Definition at line 90 of file overworld_allocation.cc.

References HexBytes().

Referenced by HexBytes(), and MakeRegion().

Here is the call graph for this function:

◆ RomTable()

AreaTableInfo yaze::zelda3::anonymous_namespace{overworld_allocation.cc}::RomTable ( const char * id,
const char * label,
const char * group,
uint32_t pc,
int entry_bytes,
int first_area,
int last_area,
std::string past_end,
std::string note = "" )

◆ RamTable()

AreaTableInfo yaze::zelda3::anonymous_namespace{overworld_allocation.cc}::RamTable ( const char * id,
const char * label,
const char * group,
uint32_t snes,
int entry_bytes,
int first_area,
int last_area,
std::string past_end,
std::string note = "" )

◆ ZsCustomV3Tables()

std::vector< AreaTableInfo > yaze::zelda3::anonymous_namespace{overworld_allocation.cc}::ZsCustomV3Tables ( )

Definition at line 139 of file overworld_allocation.cc.

References kAreaSizePc, kMap32HighPc, kMap32LowPc, kPoolOverlayPc, kPoolParentPc, kPoolSpritePointerPcs, RamTable(), RomTable(), and ZsCustomV3Tables().

Referenced by ZsCustomV3Tables().

Here is the call graph for this function:

◆ VanillaTables()

std::vector< AreaTableInfo > yaze::zelda3::anonymous_namespace{overworld_allocation.cc}::VanillaTables ( )

Definition at line 258 of file overworld_allocation.cc.

References kAreaSizePc, kMap32HighPc, kMap32LowPc, kVanillaParentPc, RamTable(), RomTable(), and VanillaTables().

Referenced by VanillaTables().

Here is the call graph for this function:

◆ DecodeAreaSize()

AllocationAreaSize yaze::zelda3::anonymous_namespace{overworld_allocation.cc}::DecodeAreaSize ( uint8_t value,
bool zs_v3 )

Definition at line 310 of file overworld_allocation.cc.

References DecodeAreaSize(), yaze::zelda3::kLarge, yaze::zelda3::kSmall, yaze::zelda3::kTall, and yaze::zelda3::kWide.

Referenced by DecodeAreaSize().

Here is the call graph for this function:

◆ VanillaSpecialParent()

int yaze::zelda3::anonymous_namespace{overworld_allocation.cc}::VanillaSpecialParent ( int area)

Definition at line 328 of file overworld_allocation.cc.

References VanillaSpecialParent().

Referenced by VanillaSpecialParent().

Here is the call graph for this function:

◆ ScanAreaMap()

◆ CountSpriteList()

int yaze::zelda3::anonymous_namespace{overworld_allocation.cc}::CountSpriteList ( const Rom & rom,
uint16_t pointer,
bool * valid )

Definition at line 374 of file overworld_allocation.cc.

References CountSpriteList(), yaze::Rom::data(), kMaxSpritesPerList, kOverworldSpriteBankPc, and yaze::Rom::size().

Referenced by CountSpriteList().

Here is the call graph for this function:

◆ EvidenceCount()

std::string yaze::zelda3::anonymous_namespace{overworld_allocation.cc}::EvidenceCount ( int count,
const char * singular,
const char * plural )

Definition at line 394 of file overworld_allocation.cc.

References EvidenceCount().

Referenced by EvidenceCount().

Here is the call graph for this function:

◆ JoinAreas()

std::string yaze::zelda3::anonymous_namespace{overworld_allocation.cc}::JoinAreas ( const std::vector< int > & areas)

Definition at line 398 of file overworld_allocation.cc.

References AreaText(), and JoinAreas().

Referenced by JoinAreas().

Here is the call graph for this function:

◆ MakeRegion()

◆ CheckBlankStream()

◆ TableJson()

◆ StreamJson()

ordered_json yaze::zelda3::anonymous_namespace{overworld_allocation.cc}::StreamJson ( const MapStreamScan & scan)

◆ AreaJson()

◆ TailJson()

◆ MapColumn()

std::string yaze::zelda3::anonymous_namespace{overworld_allocation.cc}::MapColumn ( const AreaAllocation & area)

Variable Documentation

◆ kAsmVersionPc

constexpr uint32_t yaze::zelda3::anonymous_namespace{overworld_allocation.cc}::kAsmVersionPc = 0x140145
constexpr

Definition at line 23 of file overworld_allocation.cc.

Referenced by ReadAsmVersion().

◆ kZsFunctionSpacePc

constexpr uint32_t yaze::zelda3::anonymous_namespace{overworld_allocation.cc}::kZsFunctionSpacePc = 0x141940
constexpr

Definition at line 24 of file overworld_allocation.cc.

◆ kMap32PerScreen

constexpr int yaze::zelda3::anonymous_namespace{overworld_allocation.cc}::kMap32PerScreen = 256
constexpr

Definition at line 25 of file overworld_allocation.cc.

Referenced by CheckBlankStream(), and ScanAreaMap().

◆ kMap32HighPc

constexpr uint32_t yaze::zelda3::anonymous_namespace{overworld_allocation.cc}::kMap32HighPc = 0x1794D
constexpr

Definition at line 26 of file overworld_allocation.cc.

Referenced by VanillaTables(), and ZsCustomV3Tables().

◆ kMap32LowPc

constexpr uint32_t yaze::zelda3::anonymous_namespace{overworld_allocation.cc}::kMap32LowPc = 0x17B2D
constexpr

Definition at line 27 of file overworld_allocation.cc.

Referenced by VanillaTables(), and ZsCustomV3Tables().

◆ kPoolParentPc

constexpr uint32_t yaze::zelda3::anonymous_namespace{overworld_allocation.cc}::kPoolParentPc = 0x140998
constexpr

Definition at line 28 of file overworld_allocation.cc.

Referenced by ZsCustomV3Tables().

◆ kPoolOverlayPc

constexpr uint32_t yaze::zelda3::anonymous_namespace{overworld_allocation.cc}::kPoolOverlayPc = 0x140340
constexpr

Definition at line 29 of file overworld_allocation.cc.

Referenced by ZsCustomV3Tables().

◆ kAreaSizePc

constexpr uint32_t yaze::zelda3::anonymous_namespace{overworld_allocation.cc}::kAreaSizePc = 0x1788D
constexpr

Definition at line 30 of file overworld_allocation.cc.

Referenced by VanillaTables(), and ZsCustomV3Tables().

◆ kVanillaParentPc

constexpr uint32_t yaze::zelda3::anonymous_namespace{overworld_allocation.cc}::kVanillaParentPc = 0x125EC
constexpr

Definition at line 31 of file overworld_allocation.cc.

Referenced by VanillaTables().

◆ kPoolSpritePointerPcs

constexpr std::array<uint32_t, 3> yaze::zelda3::anonymous_namespace{overworld_allocation.cc}::kPoolSpritePointerPcs
constexpr
Initial value:
= {0x141438, 0x141578,
0x1416B8}

Definition at line 32 of file overworld_allocation.cc.

Referenced by ZsCustomV3Tables().

◆ kOverworldSpriteBankPc

constexpr uint32_t yaze::zelda3::anonymous_namespace{overworld_allocation.cc}::kOverworldSpriteBankPc = 0x48000
constexpr

Definition at line 34 of file overworld_allocation.cc.

Referenced by CountSpriteList().

◆ kMaxSpritesPerList

constexpr int yaze::zelda3::anonymous_namespace{overworld_allocation.cc}::kMaxSpritesPerList = 0x80
constexpr

Definition at line 35 of file overworld_allocation.cc.

Referenced by CountSpriteList().

◆ kZsCodeOverlayIds

constexpr std::array<int, 8> yaze::zelda3::anonymous_namespace{overworld_allocation.cc}::kZsCodeOverlayIds
constexpr
Initial value:
= {0x93, 0x94, 0x95, 0x96,
0x9C, 0x9D, 0x9E, 0x9F}

Definition at line 39 of file overworld_allocation.cc.

◆ kVanillaCodeOverlayIds

constexpr std::array<int, 9> yaze::zelda3::anonymous_namespace{overworld_allocation.cc}::kVanillaCodeOverlayIds
constexpr
Initial value:
= {
0x93, 0x94, 0x95, 0x96, 0x97, 0x9C, 0x9D, 0x9E, 0x9F}

Definition at line 41 of file overworld_allocation.cc.