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

Classes

struct  PhysicalChestRecord
 
struct  PhysicalStreamInfo
 
struct  TorchSegment
 

Functions

bool RoomUsesTrackCornerAliases (const std::vector< RoomObject > &objects)
 
uint8_t Layer2ModeFromHeaderByte (uint8_t byte0)
 
bool IsDarkRoomHeaderByte (uint8_t byte0)
 
const LayerMergeTypeLayerMergeFromHeaderByte (uint8_t byte0)
 
background2 Background2FromHeaderByte (uint8_t byte0)
 
template<typename WriteColor >
void PopulateDungeonRenderPaletteRows (const gfx::SnesPalette &dungeon_palette, const gfx::SnesPalette *hud_palette, WriteColor write_color)
 
PhysicalStreamInfo AnalyzePhysicalStream (const std::vector< int > &room_addresses, int room_id, int known_region_end=-1)
 
absl::Status GetObjectPointerTablePc (const std::vector< uint8_t > &rom_data, int *table_pc)
 
uint32_t ReadRoomObjectAddressSnes (const std::vector< uint8_t > &rom_data, int table_pc, int room_id)
 
int ReadRoomObjectAddressPc (const std::vector< uint8_t > &rom_data, int table_pc, int room_id)
 
absl::StatusOr< PhysicalStreamInfoGetObjectStreamInfo (const std::vector< uint8_t > &rom_data, int room_id)
 
absl::Status GetSpritePointerTablePc (const std::vector< uint8_t > &rom_data, int *table_pc)
 
int ReadRoomSpriteAddressPc (const std::vector< uint8_t > &rom_data, int table_pc, int room_id)
 
absl::StatusOr< PhysicalStreamInfoGetSpriteStreamInfo (const std::vector< uint8_t > &rom_data, int room_id)
 
int MeasureSpriteStreamSize (const std::vector< uint8_t > &rom_data, int sprite_address, int hard_end)
 
absl::Status RelocateDungeonStream (Rom *rom, int room_id, DungeonStreamKind expected_kind, const DungeonStreamLayout &layout, std::vector< uint8_t > encoded_stream)
 
absl::StatusOr< bool > DungeonStreamRequiresCopyOnWrite (const Rom &rom, int room_id, DungeonStreamKind expected_kind, const DungeonStreamLayout &layout, size_t replacement_size)
 
std::vector< TorchSegmentParseRomTorchSegments (const std::vector< uint8_t > &rom_data, int bytes_count)
 
std::vector< uint8_t > EncodeTorchSegmentForRoom (int room_id, const Room &room)
 
absl::Status ValidateSpecialObjectDrawLayerSelector (const RoomObject &object, int room_id, const char *object_type)
 
absl::Status ValidateLightableTorchForSave (const RoomObject &object, int room_id)
 
bool HalfOpenRangesOverlap (int first_begin, int first_end, int second_begin, int second_end)
 
absl::Status ValidateBlocksLoaderPointerOperand (const std::vector< uint8_t > &rom_data, int operand_pc)
 
absl::Status PreflightBlocksLoaderDestinations (const std::vector< uint8_t > &rom_data, std::array< int, 4 > *destination_pcs)
 
std::vector< PhysicalChestRecordParsePhysicalRomChests (const std::vector< uint8_t > &rom_data, int cpos, int byte_length)
 
void AppendChestRecord (std::vector< uint8_t > *bytes, uint16_t word, uint8_t item)
 
void AppendEditedChestRecord (std::vector< uint8_t > *bytes, int room_id, const chest_data &chest)
 
int ReadRoomPotItemAddressPc (const std::vector< uint8_t > &rom_data, int room_id)
 
absl::StatusOr< PhysicalStreamInfoGetPotItemStreamInfo (const std::vector< uint8_t > &rom_data, int room_id)
 

Variables

constexpr int kTorchesMaxSize = 0x120
 
constexpr int kBlocksRegionSize = 0x80
 
constexpr std::array< int, 4 > kBlocksPointerSlots
 

Function Documentation

◆ RoomUsesTrackCornerAliases()

bool yaze::zelda3::anonymous_namespace{room.cc}::RoomUsesTrackCornerAliases ( const std::vector< RoomObject > & objects)

Definition at line 42 of file room.cc.

References RoomUsesTrackCornerAliases().

Referenced by RoomUsesTrackCornerAliases().

Here is the call graph for this function:

◆ Layer2ModeFromHeaderByte()

uint8_t yaze::zelda3::anonymous_namespace{room.cc}::Layer2ModeFromHeaderByte ( uint8_t byte0)

Definition at line 47 of file room.cc.

References Layer2ModeFromHeaderByte().

Referenced by Background2FromHeaderByte(), Layer2ModeFromHeaderByte(), and LayerMergeFromHeaderByte().

Here is the call graph for this function:

◆ IsDarkRoomHeaderByte()

bool yaze::zelda3::anonymous_namespace{room.cc}::IsDarkRoomHeaderByte ( uint8_t byte0)

Definition at line 51 of file room.cc.

References IsDarkRoomHeaderByte().

Referenced by Background2FromHeaderByte(), IsDarkRoomHeaderByte(), and LayerMergeFromHeaderByte().

Here is the call graph for this function:

◆ LayerMergeFromHeaderByte()

const LayerMergeType & yaze::zelda3::anonymous_namespace{room.cc}::LayerMergeFromHeaderByte ( uint8_t byte0)

Definition at line 55 of file room.cc.

References IsDarkRoomHeaderByte(), Layer2ModeFromHeaderByte(), and LayerMergeFromHeaderByte().

Referenced by LayerMergeFromHeaderByte().

Here is the call graph for this function:

◆ Background2FromHeaderByte()

background2 yaze::zelda3::anonymous_namespace{room.cc}::Background2FromHeaderByte ( uint8_t byte0)

Definition at line 61 of file room.cc.

References Background2FromHeaderByte(), IsDarkRoomHeaderByte(), and Layer2ModeFromHeaderByte().

Referenced by Background2FromHeaderByte().

Here is the call graph for this function:

◆ PopulateDungeonRenderPaletteRows()

template<typename WriteColor >
void yaze::zelda3::anonymous_namespace{room.cc}::PopulateDungeonRenderPaletteRows ( const gfx::SnesPalette & dungeon_palette,
const gfx::SnesPalette * hud_palette,
WriteColor write_color )

Definition at line 69 of file room.cc.

References PopulateDungeonRenderPaletteRows(), and yaze::gfx::SnesPalette::size().

Referenced by PopulateDungeonRenderPaletteRows().

Here is the call graph for this function:

◆ AnalyzePhysicalStream()

PhysicalStreamInfo yaze::zelda3::anonymous_namespace{room.cc}::AnalyzePhysicalStream ( const std::vector< int > & room_addresses,
int room_id,
int known_region_end = -1 )

◆ GetObjectPointerTablePc()

absl::Status yaze::zelda3::anonymous_namespace{room.cc}::GetObjectPointerTablePc ( const std::vector< uint8_t > & rom_data,
int * table_pc )

Definition at line 267 of file room.cc.

References GetObjectPointerTablePc(), yaze::zelda3::kNumberOfRooms, yaze::zelda3::kRoomObjectPointer, and yaze::SnesToPc().

Referenced by GetObjectPointerTablePc(), and GetObjectStreamInfo().

Here is the call graph for this function:

◆ ReadRoomObjectAddressSnes()

uint32_t yaze::zelda3::anonymous_namespace{room.cc}::ReadRoomObjectAddressSnes ( const std::vector< uint8_t > & rom_data,
int table_pc,
int room_id )

Definition at line 290 of file room.cc.

References yaze::zelda3::kNumberOfRooms, and ReadRoomObjectAddressSnes().

Referenced by ReadRoomObjectAddressPc(), and ReadRoomObjectAddressSnes().

Here is the call graph for this function:

◆ ReadRoomObjectAddressPc()

int yaze::zelda3::anonymous_namespace{room.cc}::ReadRoomObjectAddressPc ( const std::vector< uint8_t > & rom_data,
int table_pc,
int room_id )

Definition at line 304 of file room.cc.

References ReadRoomObjectAddressPc(), ReadRoomObjectAddressSnes(), and yaze::SnesToPc().

Referenced by GetObjectStreamInfo(), and ReadRoomObjectAddressPc().

Here is the call graph for this function:

◆ GetObjectStreamInfo()

absl::StatusOr< PhysicalStreamInfo > yaze::zelda3::anonymous_namespace{room.cc}::GetObjectStreamInfo ( const std::vector< uint8_t > & rom_data,
int room_id )

◆ GetSpritePointerTablePc()

absl::Status yaze::zelda3::anonymous_namespace{room.cc}::GetSpritePointerTablePc ( const std::vector< uint8_t > & rom_data,
int * table_pc )

Definition at line 334 of file room.cc.

References GetSpritePointerTablePc(), yaze::zelda3::kNumberOfRooms, yaze::zelda3::kRoomsSpritePointer, and yaze::SnesToPc().

Referenced by GetSpritePointerTablePc(), and GetSpriteStreamInfo().

Here is the call graph for this function:

◆ ReadRoomSpriteAddressPc()

int yaze::zelda3::anonymous_namespace{room.cc}::ReadRoomSpriteAddressPc ( const std::vector< uint8_t > & rom_data,
int table_pc,
int room_id )

Definition at line 355 of file room.cc.

References yaze::zelda3::kNumberOfRooms, ReadRoomSpriteAddressPc(), and yaze::SnesToPc().

Referenced by GetSpriteStreamInfo(), and ReadRoomSpriteAddressPc().

Here is the call graph for this function:

◆ GetSpriteStreamInfo()

absl::StatusOr< PhysicalStreamInfo > yaze::zelda3::anonymous_namespace{room.cc}::GetSpriteStreamInfo ( const std::vector< uint8_t > & rom_data,
int room_id )

◆ MeasureSpriteStreamSize()

int yaze::zelda3::anonymous_namespace{room.cc}::MeasureSpriteStreamSize ( const std::vector< uint8_t > & rom_data,
int sprite_address,
int hard_end )

Definition at line 398 of file room.cc.

References MeasureSpriteStreamSize().

Referenced by MeasureSpriteStreamSize().

Here is the call graph for this function:

◆ RelocateDungeonStream()

absl::Status yaze::zelda3::anonymous_namespace{room.cc}::RelocateDungeonStream ( Rom * rom,
int room_id,
DungeonStreamKind expected_kind,
const DungeonStreamLayout & layout,
std::vector< uint8_t > encoded_stream )

◆ DungeonStreamRequiresCopyOnWrite()

◆ ParseRomTorchSegments()

std::vector< TorchSegment > yaze::zelda3::anonymous_namespace{room.cc}::ParseRomTorchSegments ( const std::vector< uint8_t > & rom_data,
int bytes_count )

◆ EncodeTorchSegmentForRoom()

std::vector< uint8_t > yaze::zelda3::anonymous_namespace{room.cc}::EncodeTorchSegmentForRoom ( int room_id,
const Room & room )

◆ ValidateSpecialObjectDrawLayerSelector()

absl::Status yaze::zelda3::anonymous_namespace{room.cc}::ValidateSpecialObjectDrawLayerSelector ( const RoomObject & object,
int room_id,
const char * object_type )

Definition at line 2773 of file room.cc.

References ValidateSpecialObjectDrawLayerSelector().

Referenced by ValidateLightableTorchForSave(), and ValidateSpecialObjectDrawLayerSelector().

Here is the call graph for this function:

◆ ValidateLightableTorchForSave()

absl::Status yaze::zelda3::anonymous_namespace{room.cc}::ValidateLightableTorchForSave ( const RoomObject & object,
int room_id )

Definition at line 2787 of file room.cc.

References RETURN_IF_ERROR, ValidateLightableTorchForSave(), and ValidateSpecialObjectDrawLayerSelector().

Referenced by ValidateLightableTorchForSave().

Here is the call graph for this function:

◆ HalfOpenRangesOverlap()

bool yaze::zelda3::anonymous_namespace{room.cc}::HalfOpenRangesOverlap ( int first_begin,
int first_end,
int second_begin,
int second_end )

Definition at line 2961 of file room.cc.

References HalfOpenRangesOverlap().

Referenced by HalfOpenRangesOverlap(), and PreflightBlocksLoaderDestinations().

Here is the call graph for this function:

◆ ValidateBlocksLoaderPointerOperand()

absl::Status yaze::zelda3::anonymous_namespace{room.cc}::ValidateBlocksLoaderPointerOperand ( const std::vector< uint8_t > & rom_data,
int operand_pc )

Definition at line 2966 of file room.cc.

References ValidateBlocksLoaderPointerOperand().

Referenced by PreflightBlocksLoaderDestinations(), and ValidateBlocksLoaderPointerOperand().

Here is the call graph for this function:

◆ PreflightBlocksLoaderDestinations()

absl::Status yaze::zelda3::anonymous_namespace{room.cc}::PreflightBlocksLoaderDestinations ( const std::vector< uint8_t > & rom_data,
std::array< int, 4 > * destination_pcs )

◆ ParsePhysicalRomChests()

std::vector< PhysicalChestRecord > yaze::zelda3::anonymous_namespace{room.cc}::ParsePhysicalRomChests ( const std::vector< uint8_t > & rom_data,
int cpos,
int byte_length )

Definition at line 3477 of file room.cc.

References yaze::zelda3::kChestTableRecordSize, and ParsePhysicalRomChests().

Referenced by ParsePhysicalRomChests().

Here is the call graph for this function:

◆ AppendChestRecord()

void yaze::zelda3::anonymous_namespace{room.cc}::AppendChestRecord ( std::vector< uint8_t > * bytes,
uint16_t word,
uint8_t item )

Definition at line 3495 of file room.cc.

References AppendChestRecord().

Referenced by AppendChestRecord(), and AppendEditedChestRecord().

Here is the call graph for this function:

◆ AppendEditedChestRecord()

void yaze::zelda3::anonymous_namespace{room.cc}::AppendEditedChestRecord ( std::vector< uint8_t > * bytes,
int room_id,
const chest_data & chest )

Definition at line 3502 of file room.cc.

References AppendChestRecord(), and AppendEditedChestRecord().

Referenced by AppendEditedChestRecord().

Here is the call graph for this function:

◆ ReadRoomPotItemAddressPc()

int yaze::zelda3::anonymous_namespace{room.cc}::ReadRoomPotItemAddressPc ( const std::vector< uint8_t > & rom_data,
int room_id )

Definition at line 3509 of file room.cc.

References yaze::zelda3::kNumberOfRooms, yaze::zelda3::kRoomItemsPointers, ReadRoomPotItemAddressPc(), and yaze::SnesToPc().

Referenced by GetPotItemStreamInfo(), and ReadRoomPotItemAddressPc().

Here is the call graph for this function:

◆ GetPotItemStreamInfo()

absl::StatusOr< PhysicalStreamInfo > yaze::zelda3::anonymous_namespace{room.cc}::GetPotItemStreamInfo ( const std::vector< uint8_t > & rom_data,
int room_id )

Variable Documentation

◆ kTorchesMaxSize

constexpr int yaze::zelda3::anonymous_namespace{room.cc}::kTorchesMaxSize = 0x120
constexpr

Definition at line 2692 of file room.cc.

Referenced by ParseRomTorchSegments().

◆ kBlocksRegionSize

constexpr int yaze::zelda3::anonymous_namespace{room.cc}::kBlocksRegionSize = 0x80
constexpr

Definition at line 2957 of file room.cc.

Referenced by PreflightBlocksLoaderDestinations().

◆ kBlocksPointerSlots

constexpr std::array<int, 4> yaze::zelda3::anonymous_namespace{room.cc}::kBlocksPointerSlots
constexpr
Initial value:

Definition at line 2958 of file room.cc.

Referenced by PreflightBlocksLoaderDestinations().