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

#include <room.h>

Classes

struct  DirtyState
 
struct  Door
 Represents a door in a dungeon room. More...
 
struct  SaveDirtySnapshot
 
struct  SaveDirtyState
 

Public Member Functions

 Room ()
 
 Room (int room_id, Rom *rom, GameData *game_data=nullptr)
 
 ~Room ()
 
 Room (Room &&)
 
Roomoperator= (Room &&)
 
 Room (const Room &)=delete
 
Roomoperator= (const Room &)=delete
 
void LoadRoomGraphics (std::optional< uint8_t > entrance_blockset=std::nullopt)
 
void CopyRoomGraphicsToBuffer ()
 
void RenderRoomGraphics ()
 
void RenderObjectsToBackground ()
 
void LoadAnimatedGraphics ()
 
void LoadObjects ()
 
void EnsureObjectsLoaded ()
 
void LoadSprites ()
 
void EnsureSpritesLoaded ()
 
void LoadChests ()
 
void LoadPotItems ()
 
void EnsurePotItemsLoaded ()
 
void LoadDoors ()
 
void LoadTorches ()
 
void LoadBlocks ()
 
void LoadPits ()
 
void LoadLayoutTilesToBuffer ()
 
void ReloadGraphics (std::optional< uint8_t > entrance_blockset=std::nullopt)
 
void PrepareForRender (std::optional< uint8_t > entrance_blockset=std::nullopt)
 
const std::vector< zelda3::Sprite > & GetSprites () const
 
std::vector< zelda3::Sprite > & GetSprites ()
 
bool sprites_dirty () const
 
void MarkSpritesDirty ()
 
void ClearSpritesDirty ()
 
const std::vector< chest_data > & GetChests () const
 
std::vector< chest_data > & GetChests ()
 
bool chests_dirty () const
 
void MarkChestsDirty ()
 
void ClearChestsDirty ()
 
const std::vector< staircase > & GetStairs () const
 
std::vector< staircase > & GetStairs ()
 
const std::vector< Door > & GetDoors () const
 
std::vector< Door > & GetDoors ()
 
void AddDoor (const Door &door)
 
void RemoveDoor (size_t index)
 
const std::vector< PotItem > & GetPotItems () const
 
std::vector< PotItem > & GetPotItems ()
 
bool pot_items_dirty () const
 
void MarkPotItemsDirty ()
 
void ClearPotItemsDirty ()
 
bool torches_dirty () const
 
void MarkTorchesDirty ()
 
void ClearTorchesDirty ()
 
bool blocks_dirty () const
 
void MarkBlocksDirty ()
 
void ClearBlocksDirty ()
 
const RoomLayoutGetLayout () const
 
const std::vector< RoomObject > & GetTileObjects () const
 
std::vector< RoomObject > & GetTileObjects ()
 
void ClearTileObjects ()
 
void AddTileObject (const RoomObject &object)
 
absl::Status AddObject (const RoomObject &object)
 
absl::Status RemoveObject (size_t index)
 
absl::Status UpdateObject (size_t index, const RoomObject &object)
 
absl::StatusOr< size_t > FindObjectAt (int x, int y, int layer) const
 
bool ValidateObject (const RoomObject &object) const
 
void MarkObjectsDirty ()
 
void MarkObjectStreamDirty ()
 
void MarkSaveDirtyForTileObject (const RoomObject &object)
 
void MarkTileObjectDomainsDirtyForSnapshot (const std::vector< RoomObject > &objects)
 
void MarkTileObjectCollectionDirty ()
 
bool object_stream_dirty () const
 
void ClearObjectStreamDirty ()
 
bool object_stream_header_dirty () const
 
void ClearObjectStreamHeaderDirty ()
 
void MarkGraphicsDirty ()
 
void MarkLayoutDirty ()
 
void RemoveTileObject (size_t index)
 
size_t GetTileObjectCount () const
 
RoomObjectGetTileObject (size_t index)
 
const RoomObjectGetTileObject (size_t index) const
 
std::map< DungeonLimit, int > GetLimitedObjectCounts () const
 Count limited objects in this room.
 
bool HasExceededLimits () const
 Check if any object limits are exceeded.
 
std::vector< DungeonLimitInfoGetExceededLimitDetails () const
 Get list of exceeded limits with details.
 
const CustomCollisionMapcustom_collision () const
 
CustomCollisionMapcustom_collision ()
 
bool has_custom_collision () const
 
void set_has_custom_collision (bool has)
 
uint8_t GetCollisionTile (int x, int y) const
 
void SetCollisionTile (int x, int y, uint8_t tile)
 
bool custom_collision_dirty () const
 
void ClearCustomCollisionDirty ()
 
void MarkCustomCollisionDirty ()
 
const WaterFillZoneMapwater_fill_zone () const
 
WaterFillZoneMapwater_fill_zone ()
 
bool has_water_fill_zone () const
 
bool GetWaterFillTile (int x, int y) const
 
void SetWaterFillTile (int x, int y, bool filled)
 
void ClearWaterFillZone ()
 
int WaterFillTileCount () const
 
uint8_t water_fill_sram_bit_mask () const
 
void set_water_fill_sram_bit_mask (uint8_t mask)
 
bool water_fill_dirty () const
 
void ClearWaterFillDirty ()
 
void MarkWaterFillDirty ()
 
bool header_dirty () const
 
void MarkHeaderDirty ()
 
void ClearHeaderDirty ()
 
bool HasUnsavedChanges () const
 
void ClearSaveDirtyState ()
 
SaveDirtySnapshot CaptureSaveDirtySnapshot () const
 
void RestoreSaveDirtySnapshot (const SaveDirtySnapshot &snapshot)
 
void SetTileObjects (const std::vector< RoomObject > &objects)
 
void SetBg2 (background2 bg2)
 
void SetCollision (CollisionKey collision)
 
void SetIsLight (bool is_light)
 
void SetPalette (uint8_t pal)
 
void SetBlockset (uint8_t bs)
 
void SetSpriteset (uint8_t ss)
 
void SetRenderEntranceBlockset (uint8_t entrance_blockset)
 
void SetEffect (EffectKey effect)
 
void SetTag1 (TagKey tag1)
 
void SetTag2 (TagKey tag2)
 
void SetStaircasePlane (int index, uint8_t plane)
 
void SetHolewarp (uint8_t hw)
 
void SetStaircaseRoom (int index, uint8_t room)
 
void SetMessageId (uint16_t mid)
 
bool IsLight () const
 
void SetMessageIdDirect (uint16_t mid)
 
void SetLayer2Mode (uint8_t mode)
 
void SetLayerMerging (LayerMergeType merging)
 
void SetIsDark (bool is_dark)
 
void SetBackgroundTileset (uint8_t tileset)
 
void SetSpriteTileset (uint8_t tileset)
 
void SetLayer2Behavior (uint8_t behavior)
 
void SetTag1Direct (TagKey tag1)
 
void SetTag2Direct (TagKey tag2)
 
void SetPitsTargetLayer (uint8_t layer)
 
void SetStair1TargetLayer (uint8_t layer)
 
void SetStair2TargetLayer (uint8_t layer)
 
void SetStair3TargetLayer (uint8_t layer)
 
void SetStair4TargetLayer (uint8_t layer)
 
void SetPitsTarget (uint8_t target)
 
void SetStair1Target (uint8_t target)
 
void SetStair2Target (uint8_t target)
 
void SetStair3Target (uint8_t target)
 
void SetStair4Target (uint8_t target)
 
bool IsLoaded () const
 
void SetLoaded (bool loaded)
 
bool AreObjectsLoaded () const
 
bool AreSpritesLoaded () const
 
bool AreChestsLoaded () const
 
bool ArePotItemsLoaded () const
 
bool AreTorchesLoaded () const
 
bool AreBlocksLoaded () const
 
background2 bg2 () const
 
EffectKey effect () const
 
TagKey tag1 () const
 
TagKey tag2 () const
 
CollisionKey collision () const
 
const LayerMergeTypelayer_merging () const
 
uint8_t staircase_plane (int index) const
 
uint8_t staircase_room (int index) const
 
int id () const
 
uint8_t blockset () const
 
uint8_t render_entrance_blockset () const
 
uint8_t spriteset () const
 
uint8_t palette () const
 
int ResolveDungeonPaletteId () const
 
uint8_t layout_id () const
 
uint8_t holewarp () const
 
uint16_t message_id () const
 
void SetLayoutId (uint8_t id)
 
uint8_t floor1 () const
 
uint8_t floor2 () const
 
void set_floor1 (uint8_t value)
 
void set_floor2 (uint8_t value)
 
void ParseObjectsFromLocation (int objects_location)
 
void HandleSpecialObjects (short oid, uint8_t posX, uint8_t posY, int &nbr_of_staircase)
 
absl::Status SaveObjects (const DungeonStreamLayout *layout=nullptr)
 
absl::Status SaveObjectStreamHeader (const DungeonStreamLayout *layout=nullptr)
 
std::vector< uint8_t > EncodeObjects () const
 
absl::Status SaveSprites (const DungeonStreamLayout *layout=nullptr)
 
std::vector< uint8_t > EncodeSprites () const
 
absl::Status SaveRoomHeader ()
 
auto blocks () const
 
auto & mutable_blocks ()
 
auto rom () const
 
auto rom ()
 
auto mutable_rom ()
 
void SetRom (Rom *rom)
 
auto game_data ()
 
void SetGameData (GameData *data)
 
zelda3_version_pointers version_constants () const
 
const std::array< uint8_t, 0x10000 > & get_gfx_buffer () const
 
auto & bg1_buffer ()
 
auto & bg2_buffer ()
 
const auto & bg1_buffer () const
 
const auto & bg2_buffer () const
 
auto & object_bg1_buffer ()
 
const auto & object_bg1_buffer () const
 
auto & object_bg2_buffer ()
 
const auto & object_bg2_buffer () const
 
gfx::BitmapGetCompositeBitmap (RoomLayerManager &layer_mgr)
 Get a composite bitmap of all layers merged.
 
const gfx::Bitmapcomposite_bitmap () const
 
void MarkCompositeDirty ()
 Mark composite bitmap as needing regeneration.
 
bool IsCompositeDirty () const
 
DungeonStateGetDungeonState ()
 

Private Attributes

Romrom_
 
GameDatagame_data_ = nullptr
 
std::array< uint8_t, 0x10000 > current_gfx16_
 
gfx::BackgroundBuffer bg1_buffer_ {512, 512}
 
gfx::BackgroundBuffer bg2_buffer_ {512, 512}
 
gfx::BackgroundBuffer object_bg1_buffer_ {512, 512}
 
gfx::BackgroundBuffer object_bg2_buffer_ {512, 512}
 
gfx::Bitmap composite_bitmap_
 
uint64_t composite_signature_ = 0
 
bool has_composite_signature_ = false
 
DirtyState dirty_state_
 
SaveDirtyState save_dirty_state_
 
bool is_light_ = false
 
bool is_loaded_ = false
 
bool objects_loaded_ = false
 
bool sprites_loaded_ = false
 
bool chests_loaded_ = false
 
bool pot_items_loaded_ = false
 
bool torches_loaded_ = false
 
bool blocks_loaded_ = false
 
bool is_dark_ = false
 
bool is_floor_ = true
 
uint8_t cached_blockset_ = 0xFF
 
uint8_t cached_spriteset_ = 0xFF
 
uint8_t cached_palette_ = 0xFF
 
uint8_t cached_layout_ = 0xFF
 
uint8_t cached_floor1_graphics_ = 0xFF
 
uint8_t cached_floor2_graphics_ = 0xFF
 
uint8_t cached_effect_ = 0xFF
 
TagKey cached_tag1_ = TagKey::Nothing
 
TagKey cached_tag2_ = TagKey::Nothing
 
int room_id_ = 0
 
int animated_frame_ = 0
 
uint8_t staircase_plane_ [4]
 
uint8_t staircase_rooms_ [4]
 
uint8_t blockset_ = 0
 
uint8_t render_entrance_blockset_ = 0xFF
 
uint8_t resolved_main_blockset_ = 0xFF
 
uint8_t spriteset_ = 0
 
uint8_t palette_ = 0
 
uint8_t layout_id_ = 0
 
uint8_t holewarp_ = 0
 
uint16_t message_id_ = 0
 
uint8_t background_tileset_ = 0
 
uint8_t sprite_tileset_ = 0
 
uint8_t layer2_behavior_ = 0
 
uint8_t floor1_graphics_ = 0
 
uint8_t floor2_graphics_ = 0
 
uint8_t layer2_mode_ = 0
 
std::array< uint8_t, 16 > blocks_
 
std::array< chest, 16 > chest_list_
 
std::vector< RoomObjecttile_objects_
 
std::vector< zelda3::Spritesprites_
 
std::vector< staircasez3_staircases_
 
std::vector< chest_datachests_in_room_
 
std::vector< Doordoors_
 
std::vector< PotItempot_items_
 
RoomLayout layout_
 
LayerMergeType layer_merging_ = LayerMerge00
 
CollisionKey collision_ = One_Collision
 
EffectKey effect_ = Effect_Nothing
 
TagKey tag1_ = Nothing
 
TagKey tag2_ = Nothing
 
background2 bg2_ {}
 
destination pits_ {}
 
destination stair1_ {}
 
destination stair2_ {}
 
destination stair3_ {}
 
destination stair4_ {}
 
CustomCollisionMap custom_collision_
 
bool custom_collision_dirty_ = false
 
WaterFillZoneMap water_fill_zone_
 
bool water_fill_dirty_ = false
 
int water_fill_tile_count_ = 0
 
std::unique_ptr< DungeonStatedungeon_state_
 

Static Private Attributes

static constexpr uint8_t kObjectHeaderFloor1Dirty = 1u << 0
 
static constexpr uint8_t kObjectHeaderFloor2Dirty = 1u << 1
 
static constexpr uint8_t kObjectHeaderLayoutDirty = 1u << 2
 

Detailed Description

Definition at line 197 of file room.h.

Constructor & Destructor Documentation

◆ Room() [1/4]

yaze::zelda3::Room::Room ( )
default

◆ Room() [2/4]

yaze::zelda3::Room::Room ( int room_id,
Rom * rom,
GameData * game_data = nullptr )

Definition at line 713 of file room.cc.

◆ ~Room()

yaze::zelda3::Room::~Room ( )
default

◆ Room() [3/4]

yaze::zelda3::Room::Room ( Room && )
default

◆ Room() [4/4]

yaze::zelda3::Room::Room ( const Room & )
delete

Member Function Documentation

◆ operator=() [1/2]

Room & yaze::zelda3::Room::operator= ( Room && )
default

◆ operator=() [2/2]

Room & yaze::zelda3::Room::operator= ( const Room & )
delete

◆ LoadRoomGraphics()

◆ CopyRoomGraphicsToBuffer()

◆ RenderRoomGraphics()

void yaze::zelda3::Room::RenderRoomGraphics ( )

Definition at line 987 of file room.cc.

References bg1_buffer_, bg2_buffer_, yaze::gfx::BackgroundBuffer::bitmap(), blocks_, blockset_, yaze::zelda3::BuildDungeonRenderPalette(), cached_blockset_, cached_effect_, cached_floor1_graphics_, cached_floor2_graphics_, cached_layout_, cached_palette_, cached_spriteset_, cached_tag1_, cached_tag2_, yaze::zelda3::Room::DirtyState::composite, CopyRoomGraphicsToBuffer(), current_gfx16_, yaze::gfx::Arena::DESTROY, dirty_state_, yaze::gfx::BackgroundBuffer::DrawBackground(), yaze::gfx::BackgroundBuffer::DrawFloor(), yaze::gfx::PaletteGroupMap::dungeon_main, effect_, yaze::gfx::PaletteGroup::empty(), yaze::gfx::BackgroundBuffer::EnsureBitmapInitialized(), floor1_graphics_, floor2_graphics_, game_data_, yaze::gfx::Arena::Get(), yaze::zelda3::PaletteDebugger::Get(), yaze::platform::GetSurfacePalette(), yaze::zelda3::Room::DirtyState::graphics, yaze::gfx::PaletteGroupMap::hud, yaze::zelda3::LayerMergeType::ID, yaze::zelda3::kTileAddress, yaze::zelda3::kTileAddressFloor, yaze::zelda3::LayerMergeType::Layer2Translucent, layer_merging_, yaze::zelda3::Room::DirtyState::layout, layout_id_, LoadLayoutTilesToBuffer(), LoadRoomGraphics(), LOG_DEBUG, yaze::zelda3::PaletteDebugger::LogPaletteApplication(), yaze::zelda3::PaletteDebugger::LogPaletteLoad(), yaze::zelda3::PaletteDebugger::LogSurfaceState(), object_bg1_buffer_, object_bg2_buffer_, yaze::zelda3::Room::DirtyState::objects, palette(), palette_, yaze::zelda3::GameData::palette_groups, yaze::gfx::PaletteGroup::palette_ref(), yaze::gfx::Arena::QueueTextureCommand(), RenderObjectsToBackground(), ResolveDungeonPaletteId(), rom(), room_id_, yaze::zelda3::PaletteDebugger::SetCurrentBitmap(), yaze::zelda3::PaletteDebugger::SetCurrentPalette(), yaze::zelda3::PaletteDebugger::SetCurrentRenderPalette(), spriteset_, tag1_, tag2_, and yaze::zelda3::Room::DirtyState::textures.

Referenced by yaze::editor::DungeonRoomPanel::Draw(), yaze::editor::DungeonCanvasViewer::DrawRoomPropertyTable(), yaze::editor::DungeonRoomPanel::OnResourceModified(), PrepareForRender(), ReloadGraphics(), and yaze::app::service::RenderService::RenderDungeonRoom().

◆ RenderObjectsToBackground()

◆ LoadAnimatedGraphics()

void yaze::zelda3::Room::LoadAnimatedGraphics ( )

◆ LoadObjects()

◆ EnsureObjectsLoaded()

void yaze::zelda3::Room::EnsureObjectsLoaded ( )

Definition at line 818 of file room.cc.

References LoadObjects(), and objects_loaded_.

Referenced by PrepareForRender(), and ReloadGraphics().

Here is the call graph for this function:

◆ LoadSprites()

◆ EnsureSpritesLoaded()

void yaze::zelda3::Room::EnsureSpritesLoaded ( )

Definition at line 825 of file room.cc.

References LoadSprites(), and sprites_loaded_.

Here is the call graph for this function:

◆ LoadChests()

◆ LoadPotItems()

◆ EnsurePotItemsLoaded()

void yaze::zelda3::Room::EnsurePotItemsLoaded ( )

Definition at line 832 of file room.cc.

References LoadPotItems(), and pot_items_loaded_.

Here is the call graph for this function:

◆ LoadDoors()

void yaze::zelda3::Room::LoadDoors ( )

Definition at line 2589 of file room.cc.

References LOG_DEBUG, rom(), and room_id_.

Here is the call graph for this function:

◆ LoadTorches()

◆ LoadBlocks()

◆ LoadPits()

void yaze::zelda3::Room::LoadPits ( )

Definition at line 3977 of file room.cc.

References yaze::zelda3::kPitCount, yaze::zelda3::kPitPointer, LOG_DEBUG, pits_, rom(), room_id_, destination::target, and destination::target_layer.

Referenced by yaze::zelda3::LoadRoomFromRom().

Here is the call graph for this function:

◆ LoadLayoutTilesToBuffer()

◆ ReloadGraphics()

◆ PrepareForRender()

◆ GetSprites() [1/2]

const std::vector< zelda3::Sprite > & yaze::zelda3::Room::GetSprites ( ) const
inline

◆ GetSprites() [2/2]

std::vector< zelda3::Sprite > & yaze::zelda3::Room::GetSprites ( )
inline

Definition at line 254 of file room.h.

References sprites_.

◆ sprites_dirty()

bool yaze::zelda3::Room::sprites_dirty ( ) const
inline

◆ MarkSpritesDirty()

◆ ClearSpritesDirty()

void yaze::zelda3::Room::ClearSpritesDirty ( )
inline

Definition at line 257 of file room.h.

References save_dirty_state_, and yaze::zelda3::Room::SaveDirtyState::sprites.

Referenced by SaveSprites().

◆ GetChests() [1/2]

◆ GetChests() [2/2]

std::vector< chest_data > & yaze::zelda3::Room::GetChests ( )
inline

Definition at line 261 of file room.h.

References chests_in_room_.

◆ chests_dirty()

◆ MarkChestsDirty()

void yaze::zelda3::Room::MarkChestsDirty ( )
inline

Definition at line 263 of file room.h.

References yaze::zelda3::Room::SaveDirtyState::chests, and save_dirty_state_.

◆ ClearChestsDirty()

void yaze::zelda3::Room::ClearChestsDirty ( )
inline

Definition at line 264 of file room.h.

References yaze::zelda3::Room::SaveDirtyState::chests, and save_dirty_state_.

◆ GetStairs() [1/2]

const std::vector< staircase > & yaze::zelda3::Room::GetStairs ( ) const
inline

◆ GetStairs() [2/2]

std::vector< staircase > & yaze::zelda3::Room::GetStairs ( )
inline

Definition at line 268 of file room.h.

References z3_staircases_.

◆ GetDoors() [1/2]

◆ GetDoors() [2/2]

std::vector< Door > & yaze::zelda3::Room::GetDoors ( )
inline

Definition at line 351 of file room.h.

References doors_.

◆ AddDoor()

void yaze::zelda3::Room::AddDoor ( const Door & door)
inline

Definition at line 352 of file room.h.

References doors_, MarkObjectStreamDirty(), and objects_loaded_.

Here is the call graph for this function:

◆ RemoveDoor()

void yaze::zelda3::Room::RemoveDoor ( size_t index)
inline

Definition at line 357 of file room.h.

References doors_, MarkObjectStreamDirty(), and objects_loaded_.

Here is the call graph for this function:

◆ GetPotItems() [1/2]

◆ GetPotItems() [2/2]

std::vector< PotItem > & yaze::zelda3::Room::GetPotItems ( )
inline

Definition at line 367 of file room.h.

References pot_items_.

◆ pot_items_dirty()

◆ MarkPotItemsDirty()

void yaze::zelda3::Room::MarkPotItemsDirty ( )
inline

Definition at line 369 of file room.h.

References yaze::zelda3::Room::SaveDirtyState::pot_items, and save_dirty_state_.

◆ ClearPotItemsDirty()

void yaze::zelda3::Room::ClearPotItemsDirty ( )
inline

Definition at line 370 of file room.h.

References yaze::zelda3::Room::SaveDirtyState::pot_items, and save_dirty_state_.

◆ torches_dirty()

bool yaze::zelda3::Room::torches_dirty ( ) const
inline

◆ MarkTorchesDirty()

void yaze::zelda3::Room::MarkTorchesDirty ( )
inline

Definition at line 373 of file room.h.

References save_dirty_state_, and yaze::zelda3::Room::SaveDirtyState::torches.

◆ ClearTorchesDirty()

void yaze::zelda3::Room::ClearTorchesDirty ( )
inline

Definition at line 374 of file room.h.

References save_dirty_state_, and yaze::zelda3::Room::SaveDirtyState::torches.

◆ blocks_dirty()

bool yaze::zelda3::Room::blocks_dirty ( ) const
inline

Definition at line 375 of file room.h.

References yaze::zelda3::Room::SaveDirtyState::blocks, and save_dirty_state_.

Referenced by yaze::zelda3::SaveAllBlocks().

◆ MarkBlocksDirty()

void yaze::zelda3::Room::MarkBlocksDirty ( )
inline

Definition at line 376 of file room.h.

References yaze::zelda3::Room::SaveDirtyState::blocks, and save_dirty_state_.

◆ ClearBlocksDirty()

void yaze::zelda3::Room::ClearBlocksDirty ( )
inline

Definition at line 377 of file room.h.

References yaze::zelda3::Room::SaveDirtyState::blocks, and save_dirty_state_.

◆ GetLayout()

const RoomLayout & yaze::zelda3::Room::GetLayout ( ) const
inline

Definition at line 379 of file room.h.

References layout_.

◆ GetTileObjects() [1/2]

const std::vector< RoomObject > & yaze::zelda3::Room::GetTileObjects ( ) const
inline

Definition at line 382 of file room.h.

References tile_objects_.

Referenced by yaze::app::service::RenderService::ApplyOverlays(), yaze::zelda3::ApplyRoomLayoutTemplate(), yaze::cli::handlers::anonymous_namespace{minecart_commands.cc}::AuditRoom(), yaze::zelda3::DungeonObjectEditor::BatchChangeObjectLayer(), yaze::cli::agent::anonymous_namespace{conversational_agent_service.cc}::BuildAutoOracleStateHook(), yaze::editor::DungeonCanvasViewer::BuildDrawIssueReport(), yaze::editor::DungeonCanvasViewer::BuildSelectionIssueReport(), yaze::editor::CollectDungeonConnectedRoomLinkDiagnostics(), yaze::zelda3::DungeonObjectEditor::CreateUndoPoint(), yaze::editor::InteractionCoordinator::DescribeEntity(), yaze::cli::anonymous_namespace{dungeon_doctor_commands.cc}::DiagnoseRoom(), yaze::editor::DungeonRoomPanel::Draw(), yaze::editor::DungeonCanvasViewer::DrawChangePingOverlay(), yaze::editor::TileObjectHandler::DrawGhostPreview(), yaze::editor::DungeonCanvasViewer::DrawMaskHighlights(), yaze::editor::DungeonCanvasViewer::DrawObjectPositionOutlines(), yaze::editor::DungeonCanvasViewer::DrawRoomCanvasContent(), yaze::editor::DungeonCanvasViewer::DrawRoomCanvasOverlays(), yaze::editor::DungeonCanvasViewer::DrawRoomDebugWindow(), yaze::editor::DungeonRenderingHelpers::DrawTrackGapOverlay(), yaze::zelda3::anonymous_namespace{room.cc}::EncodeTorchSegmentForRoom(), yaze::cli::handlers::DungeonDescribeRoomCommandHandler::Execute(), yaze::cli::handlers::DungeonPlaceObjectCommandHandler::Execute(), yaze::cli::handlers::DungeonMapCommandHandler::Execute(), yaze::cli::DungeonObjectValidateCommandHandler::Execute(), yaze::zelda3::ExportRoomLayoutTemplate(), yaze::zelda3::GenerateTrackCollision(), yaze::app::service::RenderService::GetDungeonRoomMetadata(), yaze::editor::TileObjectHandler::GetEntityAtPosition(), yaze::zelda3::DungeonObjectEditor::GetObjectCount(), yaze::zelda3::DungeonObjectEditor::GetObjects(), yaze::editor::TileObjectHandler::GetPlacementGhostCapacityState(), yaze::editor::DungeonCanvasViewer::HandleRoomCanvasDropTargets(), yaze::editor::DungeonCanvasViewer::HandleTouchLongPressContextMenu(), yaze::zelda3::DungeonObjectEditor::InsertObject(), yaze::zelda3::DungeonObjectEditor::InsertTemplate(), yaze::zelda3::DungeonObjectEditor::MoveObject(), yaze::zelda3::DungeonObjectEditor::Redo(), yaze::zelda3::DungeonObjectEditor::RenderLayerControls(), yaze::zelda3::DungeonObjectEditor::RenderLayerVisualization(), yaze::zelda3::SaveAllBlocks(), yaze::zelda3::SaveAllTorchesImpl(), yaze::zelda3::DungeonObjectEditor::Undo(), yaze::zelda3::DungeonObjectEditor::ValidateRoom(), and yaze::zelda3::DungeonValidator::ValidateRoom().

◆ GetTileObjects() [2/2]

std::vector< RoomObject > & yaze::zelda3::Room::GetTileObjects ( )
inline

Definition at line 385 of file room.h.

References tile_objects_.

◆ ClearTileObjects()

void yaze::zelda3::Room::ClearTileObjects ( )
inline

◆ AddTileObject()

void yaze::zelda3::Room::AddTileObject ( const RoomObject & object)
inline

Definition at line 394 of file room.h.

References MarkSaveDirtyForTileObject(), objects_loaded_, and tile_objects_.

Here is the call graph for this function:

◆ AddObject()

◆ RemoveObject()

absl::Status yaze::zelda3::Room::RemoveObject ( size_t index)

Definition at line 2386 of file room.cc.

References MarkObjectsDirty(), MarkSaveDirtyForTileObject(), objects_loaded_, and tile_objects_.

Referenced by yaze::zelda3::DungeonObjectEditor::DeleteObject().

Here is the call graph for this function:

◆ UpdateObject()

absl::Status yaze::zelda3::Room::UpdateObject ( size_t index,
const RoomObject & object )

Definition at line 2399 of file room.cc.

References MarkSaveDirtyForTileObject(), objects_loaded_, tile_objects_, and ValidateObject().

Here is the call graph for this function:

◆ FindObjectAt()

absl::StatusOr< size_t > yaze::zelda3::Room::FindObjectAt ( int x,
int y,
int layer ) const

Definition at line 2416 of file room.cc.

References tile_objects_.

◆ ValidateObject()

bool yaze::zelda3::Room::ValidateObject ( const RoomObject & object) const

Definition at line 2426 of file room.cc.

Referenced by AddObject(), and UpdateObject().

◆ MarkObjectsDirty()

◆ MarkObjectStreamDirty()

void yaze::zelda3::Room::MarkObjectStreamDirty ( )
inline

Definition at line 413 of file room.h.

References MarkObjectsDirty(), yaze::zelda3::Room::SaveDirtyState::object_stream, and save_dirty_state_.

Referenced by AddDoor(), and RemoveDoor().

Here is the call graph for this function:

◆ MarkSaveDirtyForTileObject()

◆ MarkTileObjectDomainsDirtyForSnapshot()

void yaze::zelda3::Room::MarkTileObjectDomainsDirtyForSnapshot ( const std::vector< RoomObject > & objects)
inline

Definition at line 432 of file room.h.

References MarkSaveDirtyForTileObject().

Referenced by ClearTileObjects(), MarkTileObjectCollectionDirty(), and SetTileObjects().

Here is the call graph for this function:

◆ MarkTileObjectCollectionDirty()

void yaze::zelda3::Room::MarkTileObjectCollectionDirty ( )
inline

Definition at line 438 of file room.h.

References MarkTileObjectDomainsDirtyForSnapshot(), and tile_objects_.

Referenced by yaze::editor::TileObjectHandler::NotifyChange().

Here is the call graph for this function:

◆ object_stream_dirty()

bool yaze::zelda3::Room::object_stream_dirty ( ) const
inline

◆ ClearObjectStreamDirty()

void yaze::zelda3::Room::ClearObjectStreamDirty ( )
inline

Definition at line 442 of file room.h.

References yaze::zelda3::Room::SaveDirtyState::object_stream, and save_dirty_state_.

Referenced by SaveObjects().

◆ object_stream_header_dirty()

bool yaze::zelda3::Room::object_stream_header_dirty ( ) const
inline

◆ ClearObjectStreamHeaderDirty()

void yaze::zelda3::Room::ClearObjectStreamHeaderDirty ( )
inline

◆ MarkGraphicsDirty()

◆ MarkLayoutDirty()

◆ RemoveTileObject()

void yaze::zelda3::Room::RemoveTileObject ( size_t index)
inline

Definition at line 459 of file room.h.

References MarkObjectsDirty(), MarkSaveDirtyForTileObject(), objects_loaded_, and tile_objects_.

Referenced by yaze::zelda3::DungeonObjectEditor::DeleteSelectedObjects().

Here is the call graph for this function:

◆ GetTileObjectCount()

◆ GetTileObject() [1/2]

◆ GetTileObject() [2/2]

const RoomObject & yaze::zelda3::Room::GetTileObject ( size_t index) const
inline

Definition at line 469 of file room.h.

References tile_objects_.

◆ GetLimitedObjectCounts()

◆ HasExceededLimits()

bool yaze::zelda3::Room::HasExceededLimits ( ) const

Check if any object limits are exceeded.

Definition at line 4112 of file room.cc.

References GetLimitedObjectCounts(), and yaze::zelda3::HasExceededLimits().

Here is the call graph for this function:

◆ GetExceededLimitDetails()

std::vector< DungeonLimitInfo > yaze::zelda3::Room::GetExceededLimitDetails ( ) const

Get list of exceeded limits with details.

Definition at line 4117 of file room.cc.

References yaze::zelda3::GetExceededLimits(), and GetLimitedObjectCounts().

Here is the call graph for this function:

◆ custom_collision() [1/2]

◆ custom_collision() [2/2]

CustomCollisionMap & yaze::zelda3::Room::custom_collision ( )
inline

Definition at line 499 of file room.h.

References custom_collision_.

◆ has_custom_collision()

◆ set_has_custom_collision()

void yaze::zelda3::Room::set_has_custom_collision ( bool has)
inline

◆ GetCollisionTile()

uint8_t yaze::zelda3::Room::GetCollisionTile ( int x,
int y ) const
inline

◆ SetCollisionTile()

void yaze::zelda3::Room::SetCollisionTile ( int x,
int y,
uint8_t tile )
inline

◆ custom_collision_dirty()

bool yaze::zelda3::Room::custom_collision_dirty ( ) const
inline

◆ ClearCustomCollisionDirty()

void yaze::zelda3::Room::ClearCustomCollisionDirty ( )
inline

◆ MarkCustomCollisionDirty()

void yaze::zelda3::Room::MarkCustomCollisionDirty ( )
inline

Definition at line 524 of file room.h.

References custom_collision_dirty_.

Referenced by yaze::editor::CustomCollisionPanel::ApplyRoomEntry().

◆ water_fill_zone() [1/2]

◆ water_fill_zone() [2/2]

WaterFillZoneMap & yaze::zelda3::Room::water_fill_zone ( )
inline

Definition at line 528 of file room.h.

References water_fill_zone_.

◆ has_water_fill_zone()

bool yaze::zelda3::Room::has_water_fill_zone ( ) const
inline

◆ GetWaterFillTile()

bool yaze::zelda3::Room::GetWaterFillTile ( int x,
int y ) const
inline

Definition at line 531 of file room.h.

References yaze::zelda3::WaterFillZoneMap::tiles, and water_fill_zone_.

◆ SetWaterFillTile()

◆ ClearWaterFillZone()

◆ WaterFillTileCount()

int yaze::zelda3::Room::WaterFillTileCount ( ) const
inline

◆ water_fill_sram_bit_mask()

◆ set_water_fill_sram_bit_mask()

◆ water_fill_dirty()

bool yaze::zelda3::Room::water_fill_dirty ( ) const
inline

◆ ClearWaterFillDirty()

◆ MarkWaterFillDirty()

void yaze::zelda3::Room::MarkWaterFillDirty ( )
inline

Definition at line 582 of file room.h.

References water_fill_dirty_.

◆ header_dirty()

bool yaze::zelda3::Room::header_dirty ( ) const
inline

◆ MarkHeaderDirty()

◆ ClearHeaderDirty()

void yaze::zelda3::Room::ClearHeaderDirty ( )
inline

Definition at line 586 of file room.h.

References yaze::zelda3::Room::SaveDirtyState::header, and save_dirty_state_.

Referenced by SaveRoomHeader().

◆ HasUnsavedChanges()

◆ ClearSaveDirtyState()

void yaze::zelda3::Room::ClearSaveDirtyState ( )
inline

Definition at line 597 of file room.h.

References save_dirty_state_.

Referenced by yaze::zelda3::LoadRoomFromRom(), and yaze::zelda3::LoadRoomHeaderFromRom().

◆ CaptureSaveDirtySnapshot()

◆ RestoreSaveDirtySnapshot()

◆ SetTileObjects()

void yaze::zelda3::Room::SetTileObjects ( const std::vector< RoomObject > & objects)
inline

Definition at line 647 of file room.h.

References MarkObjectsDirty(), MarkTileObjectDomainsDirtyForSnapshot(), objects_loaded_, and tile_objects_.

Referenced by yaze::zelda3::DungeonObjectEditor::ApplyUndoPoint().

Here is the call graph for this function:

◆ SetBg2()

void yaze::zelda3::Room::SetBg2 ( background2 bg2)
inline

Definition at line 656 of file room.h.

References bg2(), bg2_, and MarkHeaderDirty().

Referenced by yaze::zelda3::LoadRoomHeaderFromRom().

Here is the call graph for this function:

◆ SetCollision()

void yaze::zelda3::Room::SetCollision ( CollisionKey collision)
inline

Definition at line 662 of file room.h.

References collision(), collision_, and MarkHeaderDirty().

Referenced by yaze::zelda3::LoadRoomHeaderFromRom().

Here is the call graph for this function:

◆ SetIsLight()

void yaze::zelda3::Room::SetIsLight ( bool is_light)
inline

Definition at line 668 of file room.h.

References is_light_, and MarkHeaderDirty().

Referenced by yaze::zelda3::LoadRoomHeaderFromRom().

Here is the call graph for this function:

◆ SetPalette()

void yaze::zelda3::Room::SetPalette ( uint8_t pal)
inline

◆ SetBlockset()

◆ SetSpriteset()

void yaze::zelda3::Room::SetSpriteset ( uint8_t ss)
inline

◆ SetRenderEntranceBlockset()

void yaze::zelda3::Room::SetRenderEntranceBlockset ( uint8_t entrance_blockset)
inline

Definition at line 696 of file room.h.

References MarkGraphicsDirty(), render_entrance_blockset_, and resolved_main_blockset_.

Referenced by PrepareForRender(), and ReloadGraphics().

Here is the call graph for this function:

◆ SetEffect()

void yaze::zelda3::Room::SetEffect ( EffectKey effect)
inline

Definition at line 703 of file room.h.

References effect(), effect_, MarkHeaderDirty(), and MarkObjectsDirty().

Referenced by yaze::cli::handlers::DungeonSetRoomPropertyCommandHandler::Execute(), and yaze::zelda3::LoadRoomHeaderFromRom().

Here is the call graph for this function:

◆ SetTag1()

void yaze::zelda3::Room::SetTag1 ( TagKey tag1)
inline

Definition at line 710 of file room.h.

References MarkHeaderDirty(), MarkObjectsDirty(), tag1(), and tag1_.

Referenced by yaze::cli::handlers::DungeonSetRoomPropertyCommandHandler::Execute(), and yaze::zelda3::LoadRoomHeaderFromRom().

Here is the call graph for this function:

◆ SetTag2()

void yaze::zelda3::Room::SetTag2 ( TagKey tag2)
inline

Definition at line 717 of file room.h.

References MarkHeaderDirty(), MarkObjectsDirty(), tag2(), and tag2_.

Referenced by yaze::cli::handlers::DungeonSetRoomPropertyCommandHandler::Execute(), and yaze::zelda3::LoadRoomHeaderFromRom().

Here is the call graph for this function:

◆ SetStaircasePlane()

void yaze::zelda3::Room::SetStaircasePlane ( int index,
uint8_t plane )
inline

Definition at line 724 of file room.h.

References MarkHeaderDirty(), and staircase_plane_.

Referenced by yaze::zelda3::LoadRoomHeaderFromRom().

Here is the call graph for this function:

◆ SetHolewarp()

void yaze::zelda3::Room::SetHolewarp ( uint8_t hw)
inline

Definition at line 730 of file room.h.

References holewarp_, and MarkHeaderDirty().

Referenced by yaze::cli::handlers::DungeonSetRoomPropertyCommandHandler::Execute(), and yaze::zelda3::LoadRoomHeaderFromRom().

Here is the call graph for this function:

◆ SetStaircaseRoom()

void yaze::zelda3::Room::SetStaircaseRoom ( int index,
uint8_t room )
inline

Definition at line 736 of file room.h.

References MarkHeaderDirty(), and staircase_rooms_.

Referenced by yaze::editor::DungeonCanvasViewer::ApplyConnectedStaircaseIssueAutoFixes(), and yaze::zelda3::LoadRoomHeaderFromRom().

Here is the call graph for this function:

◆ SetMessageId()

void yaze::zelda3::Room::SetMessageId ( uint16_t mid)
inline

Definition at line 744 of file room.h.

References MarkHeaderDirty(), and message_id_.

Referenced by yaze::zelda3::LoadRoomHeaderFromRom().

Here is the call graph for this function:

◆ IsLight()

bool yaze::zelda3::Room::IsLight ( ) const
inline

Definition at line 752 of file room.h.

References is_light_.

Referenced by SaveRoomHeader().

◆ SetMessageIdDirect()

void yaze::zelda3::Room::SetMessageIdDirect ( uint16_t mid)
inline

Definition at line 755 of file room.h.

References MarkHeaderDirty(), and message_id_.

Here is the call graph for this function:

◆ SetLayer2Mode()

void yaze::zelda3::Room::SetLayer2Mode ( uint8_t mode)
inline

Definition at line 761 of file room.h.

References layer2_mode_, and MarkHeaderDirty().

Referenced by yaze::zelda3::LoadRoomHeaderFromRom().

Here is the call graph for this function:

◆ SetLayerMerging()

void yaze::zelda3::Room::SetLayerMerging ( LayerMergeType merging)
inline

Definition at line 767 of file room.h.

References layer_merging_, and MarkHeaderDirty().

Referenced by yaze::zelda3::LoadRoomHeaderFromRom().

Here is the call graph for this function:

◆ SetIsDark()

void yaze::zelda3::Room::SetIsDark ( bool is_dark)
inline

Definition at line 773 of file room.h.

References is_dark_, and MarkHeaderDirty().

Referenced by yaze::zelda3::LoadRoomHeaderFromRom().

Here is the call graph for this function:

◆ SetBackgroundTileset()

void yaze::zelda3::Room::SetBackgroundTileset ( uint8_t tileset)
inline

Definition at line 779 of file room.h.

References background_tileset_, and MarkHeaderDirty().

Referenced by yaze::zelda3::LoadRoomHeaderFromRom().

Here is the call graph for this function:

◆ SetSpriteTileset()

void yaze::zelda3::Room::SetSpriteTileset ( uint8_t tileset)
inline

Definition at line 785 of file room.h.

References MarkHeaderDirty(), and sprite_tileset_.

Referenced by yaze::zelda3::LoadRoomHeaderFromRom().

Here is the call graph for this function:

◆ SetLayer2Behavior()

void yaze::zelda3::Room::SetLayer2Behavior ( uint8_t behavior)
inline

Definition at line 791 of file room.h.

References layer2_behavior_, and MarkHeaderDirty().

Referenced by yaze::zelda3::LoadRoomHeaderFromRom().

Here is the call graph for this function:

◆ SetTag1Direct()

void yaze::zelda3::Room::SetTag1Direct ( TagKey tag1)
inline

Definition at line 797 of file room.h.

References MarkHeaderDirty(), tag1(), and tag1_.

Referenced by yaze::zelda3::LoadRoomHeaderFromRom().

Here is the call graph for this function:

◆ SetTag2Direct()

void yaze::zelda3::Room::SetTag2Direct ( TagKey tag2)
inline

Definition at line 803 of file room.h.

References MarkHeaderDirty(), tag2(), and tag2_.

Referenced by yaze::zelda3::LoadRoomHeaderFromRom().

Here is the call graph for this function:

◆ SetPitsTargetLayer()

void yaze::zelda3::Room::SetPitsTargetLayer ( uint8_t layer)
inline

Definition at line 809 of file room.h.

References MarkHeaderDirty(), pits_, and destination::target_layer.

Referenced by yaze::zelda3::LoadRoomHeaderFromRom().

Here is the call graph for this function:

◆ SetStair1TargetLayer()

void yaze::zelda3::Room::SetStair1TargetLayer ( uint8_t layer)
inline

Definition at line 815 of file room.h.

References MarkHeaderDirty(), stair1_, and destination::target_layer.

Referenced by yaze::zelda3::LoadRoomHeaderFromRom().

Here is the call graph for this function:

◆ SetStair2TargetLayer()

void yaze::zelda3::Room::SetStair2TargetLayer ( uint8_t layer)
inline

Definition at line 821 of file room.h.

References MarkHeaderDirty(), stair2_, and destination::target_layer.

Referenced by yaze::zelda3::LoadRoomHeaderFromRom().

Here is the call graph for this function:

◆ SetStair3TargetLayer()

void yaze::zelda3::Room::SetStair3TargetLayer ( uint8_t layer)
inline

Definition at line 827 of file room.h.

References MarkHeaderDirty(), stair3_, and destination::target_layer.

Referenced by yaze::zelda3::LoadRoomHeaderFromRom().

Here is the call graph for this function:

◆ SetStair4TargetLayer()

void yaze::zelda3::Room::SetStair4TargetLayer ( uint8_t layer)
inline

Definition at line 833 of file room.h.

References MarkHeaderDirty(), stair4_, and destination::target_layer.

Referenced by yaze::zelda3::LoadRoomHeaderFromRom().

Here is the call graph for this function:

◆ SetPitsTarget()

void yaze::zelda3::Room::SetPitsTarget ( uint8_t target)
inline

Definition at line 839 of file room.h.

References MarkHeaderDirty(), pits_, and destination::target.

Referenced by yaze::zelda3::LoadRoomHeaderFromRom().

Here is the call graph for this function:

◆ SetStair1Target()

void yaze::zelda3::Room::SetStair1Target ( uint8_t target)
inline

Definition at line 845 of file room.h.

References MarkHeaderDirty(), stair1_, and destination::target.

Referenced by yaze::zelda3::LoadRoomHeaderFromRom().

Here is the call graph for this function:

◆ SetStair2Target()

void yaze::zelda3::Room::SetStair2Target ( uint8_t target)
inline

Definition at line 851 of file room.h.

References MarkHeaderDirty(), stair2_, and destination::target.

Referenced by yaze::zelda3::LoadRoomHeaderFromRom().

Here is the call graph for this function:

◆ SetStair3Target()

void yaze::zelda3::Room::SetStair3Target ( uint8_t target)
inline

Definition at line 857 of file room.h.

References MarkHeaderDirty(), stair3_, and destination::target.

Referenced by yaze::zelda3::LoadRoomHeaderFromRom().

Here is the call graph for this function:

◆ SetStair4Target()

void yaze::zelda3::Room::SetStair4Target ( uint8_t target)
inline

Definition at line 863 of file room.h.

References MarkHeaderDirty(), stair4_, and destination::target.

Referenced by yaze::zelda3::LoadRoomHeaderFromRom().

Here is the call graph for this function:

◆ IsLoaded()

◆ SetLoaded()

void yaze::zelda3::Room::SetLoaded ( bool loaded)
inline

Definition at line 872 of file room.h.

References is_loaded_.

Referenced by yaze::zelda3::LoadRoomFromRom().

◆ AreObjectsLoaded()

bool yaze::zelda3::Room::AreObjectsLoaded ( ) const
inline

◆ AreSpritesLoaded()

bool yaze::zelda3::Room::AreSpritesLoaded ( ) const
inline

Definition at line 874 of file room.h.

References sprites_loaded_.

Referenced by yaze::editor::DungeonCanvasViewer::PrepareRoomStateForCanvas().

◆ AreChestsLoaded()

bool yaze::zelda3::Room::AreChestsLoaded ( ) const
inline

Definition at line 875 of file room.h.

References chests_loaded_.

◆ ArePotItemsLoaded()

bool yaze::zelda3::Room::ArePotItemsLoaded ( ) const
inline

Definition at line 876 of file room.h.

References pot_items_loaded_.

Referenced by yaze::editor::DungeonCanvasViewer::PrepareRoomStateForCanvas().

◆ AreTorchesLoaded()

bool yaze::zelda3::Room::AreTorchesLoaded ( ) const
inline

Definition at line 877 of file room.h.

References torches_loaded_.

Referenced by yaze::zelda3::SaveAllTorchesImpl().

◆ AreBlocksLoaded()

bool yaze::zelda3::Room::AreBlocksLoaded ( ) const
inline

Definition at line 883 of file room.h.

References blocks_loaded_.

Referenced by yaze::zelda3::SaveAllBlocks().

◆ bg2()

background2 yaze::zelda3::Room::bg2 ( ) const
inline

Definition at line 886 of file room.h.

References bg2_.

Referenced by SaveRoomHeader(), and SetBg2().

◆ effect()

◆ tag1()

◆ tag2()

◆ collision()

CollisionKey yaze::zelda3::Room::collision ( ) const
inline

◆ layer_merging()

const LayerMergeType & yaze::zelda3::Room::layer_merging ( ) const
inline

Definition at line 891 of file room.h.

References layer_merging_.

◆ staircase_plane()

uint8_t yaze::zelda3::Room::staircase_plane ( int index) const
inline

Definition at line 892 of file room.h.

References staircase_plane_.

Referenced by SaveRoomHeader().

◆ staircase_room()

◆ id()

◆ blockset()

◆ render_entrance_blockset()

uint8_t yaze::zelda3::Room::render_entrance_blockset ( ) const
inline

◆ spriteset()

◆ palette()

◆ ResolveDungeonPaletteId()

◆ layout_id()

◆ holewarp()

◆ message_id()

uint16_t yaze::zelda3::Room::message_id ( ) const
inline

Definition at line 914 of file room.h.

References message_id_.

Referenced by yaze::app::service::RenderService::GetDungeonRoomMetadata().

◆ SetLayoutId()

◆ floor1()

◆ floor2()

uint8_t yaze::zelda3::Room::floor2 ( ) const
inline

◆ set_floor1()

void yaze::zelda3::Room::set_floor1 ( uint8_t value)
inline

◆ set_floor2()

void yaze::zelda3::Room::set_floor2 ( uint8_t value)
inline

◆ ParseObjectsFromLocation()

◆ HandleSpecialObjects()

void yaze::zelda3::Room::HandleSpecialObjects ( short oid,
uint8_t posX,
uint8_t posY,
int & nbr_of_staircase )

◆ SaveObjects()

◆ SaveObjectStreamHeader()

◆ EncodeObjects()

◆ SaveSprites()

◆ EncodeSprites()

std::vector< uint8_t > yaze::zelda3::Room::EncodeSprites ( ) const

Definition at line 1883 of file room.cc.

References sprites_.

Referenced by yaze::editor::DungeonEditorV2::CollectWriteRanges(), and SaveSprites().

◆ SaveRoomHeader()

◆ blocks()

◆ mutable_blocks()

auto & yaze::zelda3::Room::mutable_blocks ( )
inline

Definition at line 957 of file room.h.

References blocks_.

◆ rom() [1/2]

◆ rom() [2/2]

auto yaze::zelda3::Room::rom ( )
inline

Definition at line 959 of file room.h.

References rom_.

◆ mutable_rom()

auto yaze::zelda3::Room::mutable_rom ( )
inline

Definition at line 960 of file room.h.

References rom_.

◆ SetRom()

void yaze::zelda3::Room::SetRom ( Rom * rom)
inline

◆ game_data()

auto yaze::zelda3::Room::game_data ( )
inline

Definition at line 962 of file room.h.

References game_data_.

◆ SetGameData()

◆ version_constants()

zelda3_version_pointers yaze::zelda3::Room::version_constants ( ) const
inline

Definition at line 966 of file room.h.

References game_data_, and yaze::zelda3::GameData::version.

Referenced by LoadAnimatedGraphics().

◆ get_gfx_buffer()

◆ bg1_buffer() [1/2]

◆ bg2_buffer() [1/2]

◆ bg1_buffer() [2/2]

const auto & yaze::zelda3::Room::bg1_buffer ( ) const
inline

Definition at line 977 of file room.h.

References bg1_buffer_.

◆ bg2_buffer() [2/2]

const auto & yaze::zelda3::Room::bg2_buffer ( ) const
inline

Definition at line 978 of file room.h.

References bg2_buffer_.

◆ object_bg1_buffer() [1/2]

◆ object_bg1_buffer() [2/2]

const auto & yaze::zelda3::Room::object_bg1_buffer ( ) const
inline

Definition at line 980 of file room.h.

References object_bg1_buffer_.

◆ object_bg2_buffer() [1/2]

◆ object_bg2_buffer() [2/2]

const auto & yaze::zelda3::Room::object_bg2_buffer ( ) const
inline

Definition at line 982 of file room.h.

References object_bg2_buffer_.

◆ GetCompositeBitmap()

◆ composite_bitmap()

const gfx::Bitmap & yaze::zelda3::Room::composite_bitmap ( ) const
inline

Definition at line 986 of file room.h.

References composite_bitmap_.

◆ MarkCompositeDirty()

void yaze::zelda3::Room::MarkCompositeDirty ( )
inline

Mark composite bitmap as needing regeneration.

Definition at line 989 of file room.h.

References yaze::zelda3::Room::DirtyState::composite, and dirty_state_.

◆ IsCompositeDirty()

bool yaze::zelda3::Room::IsCompositeDirty ( ) const
inline

Definition at line 990 of file room.h.

References yaze::zelda3::Room::DirtyState::composite, and dirty_state_.

◆ GetDungeonState()

DungeonState * yaze::zelda3::Room::GetDungeonState ( )
inline

Definition at line 992 of file room.h.

References dungeon_state_.

Referenced by yaze::editor::DungeonCanvasViewer::DrawRoomDebugWindow().

Member Data Documentation

◆ rom_

◆ game_data_

◆ current_gfx16_

std::array<uint8_t, 0x10000> yaze::zelda3::Room::current_gfx16_
private

◆ bg1_buffer_

gfx::BackgroundBuffer yaze::zelda3::Room::bg1_buffer_ {512, 512}
private

◆ bg2_buffer_

gfx::BackgroundBuffer yaze::zelda3::Room::bg2_buffer_ {512, 512}
private

◆ object_bg1_buffer_

gfx::BackgroundBuffer yaze::zelda3::Room::object_bg1_buffer_ {512, 512}
private

◆ object_bg2_buffer_

gfx::BackgroundBuffer yaze::zelda3::Room::object_bg2_buffer_ {512, 512}
private

◆ kObjectHeaderFloor1Dirty

constexpr uint8_t yaze::zelda3::Room::kObjectHeaderFloor1Dirty = 1u << 0
staticconstexprprivate

Definition at line 1026 of file room.h.

Referenced by SaveObjectStreamHeader(), and set_floor1().

◆ kObjectHeaderFloor2Dirty

constexpr uint8_t yaze::zelda3::Room::kObjectHeaderFloor2Dirty = 1u << 1
staticconstexprprivate

Definition at line 1027 of file room.h.

Referenced by SaveObjectStreamHeader(), and set_floor2().

◆ kObjectHeaderLayoutDirty

constexpr uint8_t yaze::zelda3::Room::kObjectHeaderLayoutDirty = 1u << 2
staticconstexprprivate

Definition at line 1028 of file room.h.

Referenced by SaveObjectStreamHeader(), and SetLayoutId().

◆ composite_bitmap_

gfx::Bitmap yaze::zelda3::Room::composite_bitmap_
mutableprivate

Definition at line 1031 of file room.h.

Referenced by composite_bitmap(), and GetCompositeBitmap().

◆ composite_signature_

uint64_t yaze::zelda3::Room::composite_signature_ = 0
mutableprivate

Definition at line 1032 of file room.h.

Referenced by GetCompositeBitmap().

◆ has_composite_signature_

bool yaze::zelda3::Room::has_composite_signature_ = false
mutableprivate

Definition at line 1033 of file room.h.

Referenced by GetCompositeBitmap().

◆ dirty_state_

◆ save_dirty_state_

◆ is_light_

bool yaze::zelda3::Room::is_light_ = false
private

Definition at line 1037 of file room.h.

Referenced by IsLight(), and SetIsLight().

◆ is_loaded_

bool yaze::zelda3::Room::is_loaded_ = false
private

Definition at line 1038 of file room.h.

Referenced by IsLoaded(), and SetLoaded().

◆ objects_loaded_

bool yaze::zelda3::Room::objects_loaded_ = false
private

◆ sprites_loaded_

bool yaze::zelda3::Room::sprites_loaded_ = false
private

Definition at line 1040 of file room.h.

Referenced by AreSpritesLoaded(), EnsureSpritesLoaded(), and LoadSprites().

◆ chests_loaded_

bool yaze::zelda3::Room::chests_loaded_ = false
private

Definition at line 1041 of file room.h.

Referenced by AreChestsLoaded(), and LoadChests().

◆ pot_items_loaded_

bool yaze::zelda3::Room::pot_items_loaded_ = false
private

Definition at line 1042 of file room.h.

Referenced by ArePotItemsLoaded(), EnsurePotItemsLoaded(), and LoadPotItems().

◆ torches_loaded_

bool yaze::zelda3::Room::torches_loaded_ = false
private

Definition at line 1043 of file room.h.

Referenced by AreTorchesLoaded(), and LoadTorches().

◆ blocks_loaded_

bool yaze::zelda3::Room::blocks_loaded_ = false
private

Definition at line 1044 of file room.h.

Referenced by AreBlocksLoaded(), and LoadBlocks().

◆ is_dark_

bool yaze::zelda3::Room::is_dark_ = false
private

Definition at line 1045 of file room.h.

Referenced by SaveRoomHeader(), and SetIsDark().

◆ is_floor_

bool yaze::zelda3::Room::is_floor_ = true
private

Definition at line 1046 of file room.h.

Referenced by LoadObjects().

◆ cached_blockset_

uint8_t yaze::zelda3::Room::cached_blockset_ = 0xFF
private

Definition at line 1050 of file room.h.

Referenced by RenderRoomGraphics().

◆ cached_spriteset_

uint8_t yaze::zelda3::Room::cached_spriteset_ = 0xFF
private

Definition at line 1051 of file room.h.

Referenced by RenderRoomGraphics().

◆ cached_palette_

uint8_t yaze::zelda3::Room::cached_palette_ = 0xFF
private

Definition at line 1052 of file room.h.

Referenced by RenderRoomGraphics().

◆ cached_layout_

uint8_t yaze::zelda3::Room::cached_layout_ = 0xFF
private

Definition at line 1053 of file room.h.

Referenced by RenderRoomGraphics().

◆ cached_floor1_graphics_

uint8_t yaze::zelda3::Room::cached_floor1_graphics_ = 0xFF
private

Definition at line 1054 of file room.h.

Referenced by RenderRoomGraphics().

◆ cached_floor2_graphics_

uint8_t yaze::zelda3::Room::cached_floor2_graphics_ = 0xFF
private

Definition at line 1055 of file room.h.

Referenced by RenderRoomGraphics().

◆ cached_effect_

uint8_t yaze::zelda3::Room::cached_effect_ = 0xFF
private

Definition at line 1056 of file room.h.

Referenced by RenderRoomGraphics().

◆ cached_tag1_

TagKey yaze::zelda3::Room::cached_tag1_ = TagKey::Nothing
private

Definition at line 1057 of file room.h.

Referenced by RenderRoomGraphics().

◆ cached_tag2_

TagKey yaze::zelda3::Room::cached_tag2_ = TagKey::Nothing
private

Definition at line 1058 of file room.h.

Referenced by RenderRoomGraphics().

◆ room_id_

◆ animated_frame_

int yaze::zelda3::Room::animated_frame_ = 0
private

Definition at line 1061 of file room.h.

Referenced by LoadAnimatedGraphics().

◆ staircase_plane_

uint8_t yaze::zelda3::Room::staircase_plane_[4]
private

Definition at line 1063 of file room.h.

Referenced by SetStaircasePlane(), and staircase_plane().

◆ staircase_rooms_

uint8_t yaze::zelda3::Room::staircase_rooms_[4]
private

Definition at line 1064 of file room.h.

Referenced by HandleSpecialObjects(), SetStaircaseRoom(), and staircase_room().

◆ blockset_

uint8_t yaze::zelda3::Room::blockset_ = 0
private

◆ render_entrance_blockset_

uint8_t yaze::zelda3::Room::render_entrance_blockset_ = 0xFF
private

◆ resolved_main_blockset_

uint8_t yaze::zelda3::Room::resolved_main_blockset_ = 0xFF
private

◆ spriteset_

uint8_t yaze::zelda3::Room::spriteset_ = 0
private

◆ palette_

uint8_t yaze::zelda3::Room::palette_ = 0
private

◆ layout_id_

uint8_t yaze::zelda3::Room::layout_id_ = 0
private

◆ holewarp_

uint8_t yaze::zelda3::Room::holewarp_ = 0
private

Definition at line 1073 of file room.h.

Referenced by holewarp(), SaveRoomHeader(), and SetHolewarp().

◆ message_id_

uint16_t yaze::zelda3::Room::message_id_ = 0
private

Definition at line 1074 of file room.h.

Referenced by message_id(), SaveRoomHeader(), SetMessageId(), and SetMessageIdDirect().

◆ background_tileset_

uint8_t yaze::zelda3::Room::background_tileset_ = 0
private

Definition at line 1076 of file room.h.

Referenced by LoadAnimatedGraphics(), and SetBackgroundTileset().

◆ sprite_tileset_

uint8_t yaze::zelda3::Room::sprite_tileset_ = 0
private

Definition at line 1077 of file room.h.

Referenced by SetSpriteTileset().

◆ layer2_behavior_

uint8_t yaze::zelda3::Room::layer2_behavior_ = 0
private

Definition at line 1078 of file room.h.

Referenced by SetLayer2Behavior().

◆ floor1_graphics_

uint8_t yaze::zelda3::Room::floor1_graphics_ = 0
private

Definition at line 1079 of file room.h.

Referenced by floor1(), LoadObjects(), RenderRoomGraphics(), SaveObjectStreamHeader(), and set_floor1().

◆ floor2_graphics_

uint8_t yaze::zelda3::Room::floor2_graphics_ = 0
private

Definition at line 1080 of file room.h.

Referenced by floor2(), LoadObjects(), RenderRoomGraphics(), SaveObjectStreamHeader(), and set_floor2().

◆ layer2_mode_

uint8_t yaze::zelda3::Room::layer2_mode_ = 0
private

Definition at line 1081 of file room.h.

Referenced by SaveRoomHeader(), and SetLayer2Mode().

◆ blocks_

std::array<uint8_t, 16> yaze::zelda3::Room::blocks_
private

◆ chest_list_

std::array<chest, 16> yaze::zelda3::Room::chest_list_
private

Definition at line 1084 of file room.h.

◆ tile_objects_

◆ sprites_

std::vector<zelda3::Sprite> yaze::zelda3::Room::sprites_
private
Todo
add separate door objects list when door section (F0 FF) is parsed

Definition at line 1088 of file room.h.

Referenced by EncodeSprites(), GetLimitedObjectCounts(), GetSprites(), GetSprites(), LoadSprites(), and RenderObjectsToBackground().

◆ z3_staircases_

std::vector<staircase> yaze::zelda3::Room::z3_staircases_
private

◆ chests_in_room_

std::vector<chest_data> yaze::zelda3::Room::chests_in_room_
private

◆ doors_

std::vector<Door> yaze::zelda3::Room::doors_
private

◆ pot_items_

std::vector<PotItem> yaze::zelda3::Room::pot_items_
private

Definition at line 1092 of file room.h.

Referenced by GetPotItems(), GetPotItems(), LoadPotItems(), and RenderObjectsToBackground().

◆ layout_

RoomLayout yaze::zelda3::Room::layout_
private

Definition at line 1093 of file room.h.

Referenced by GetLayout(), and LoadLayoutTilesToBuffer().

◆ layer_merging_

LayerMergeType yaze::zelda3::Room::layer_merging_ = LayerMerge00
private

Definition at line 1095 of file room.h.

Referenced by layer_merging(), RenderRoomGraphics(), and SetLayerMerging().

◆ collision_

CollisionKey yaze::zelda3::Room::collision_ = One_Collision
private

Definition at line 1096 of file room.h.

Referenced by collision(), and SetCollision().

◆ effect_

EffectKey yaze::zelda3::Room::effect_ = Effect_Nothing
private

Definition at line 1097 of file room.h.

Referenced by effect(), RenderRoomGraphics(), and SetEffect().

◆ tag1_

TagKey yaze::zelda3::Room::tag1_ = Nothing
private

Definition at line 1098 of file room.h.

Referenced by RenderRoomGraphics(), SetTag1(), SetTag1Direct(), and tag1().

◆ tag2_

TagKey yaze::zelda3::Room::tag2_ = Nothing
private

Definition at line 1099 of file room.h.

Referenced by RenderRoomGraphics(), SetTag2(), SetTag2Direct(), and tag2().

◆ bg2_

background2 yaze::zelda3::Room::bg2_ {}
private

Definition at line 1101 of file room.h.

Referenced by bg2(), and SetBg2().

◆ pits_

destination yaze::zelda3::Room::pits_ {}
private

Definition at line 1102 of file room.h.

Referenced by LoadPits(), SaveRoomHeader(), SetPitsTarget(), and SetPitsTargetLayer().

◆ stair1_

destination yaze::zelda3::Room::stair1_ {}
private

Definition at line 1103 of file room.h.

Referenced by SetStair1Target(), and SetStair1TargetLayer().

◆ stair2_

destination yaze::zelda3::Room::stair2_ {}
private

Definition at line 1104 of file room.h.

Referenced by SetStair2Target(), and SetStair2TargetLayer().

◆ stair3_

destination yaze::zelda3::Room::stair3_ {}
private

Definition at line 1105 of file room.h.

Referenced by SetStair3Target(), and SetStair3TargetLayer().

◆ stair4_

destination yaze::zelda3::Room::stair4_ {}
private

Definition at line 1106 of file room.h.

Referenced by SetStair4Target(), and SetStair4TargetLayer().

◆ custom_collision_

CustomCollisionMap yaze::zelda3::Room::custom_collision_
private

◆ custom_collision_dirty_

◆ water_fill_zone_

◆ water_fill_dirty_

◆ water_fill_tile_count_

int yaze::zelda3::Room::water_fill_tile_count_ = 0
private

Definition at line 1113 of file room.h.

Referenced by ClearWaterFillZone(), SetWaterFillTile(), and WaterFillTileCount().

◆ dungeon_state_

std::unique_ptr<DungeonState> yaze::zelda3::Room::dungeon_state_
private

Definition at line 1114 of file room.h.

Referenced by GetDungeonState(), LoadLayoutTilesToBuffer(), and RenderObjectsToBackground().


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