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 layer2_mode () 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
 
uint64_t graphics_revision () const
 
uint64_t composite_source_revision () const
 
const gfx::SnesPaletterendered_dungeon_palette () const
 
const std::vector< SDL_Color > & rendered_palette () 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.
 
void RenderComposite (const RoomLayerManager &layer_mgr, gfx::Bitmap &output)
 
const gfx::Bitmapcomposite_bitmap () const
 
void MarkCompositeDirty ()
 Mark composite bitmap as needing regeneration.
 
bool IsCompositeDirty () const
 
DungeonStateGetDungeonState ()
 
const DungeonStateGetDungeonState () const
 

Private Attributes

Romrom_
 
GameDatagame_data_ = nullptr
 
std::array< uint8_t, 0x10000 > current_gfx16_
 
uint64_t graphics_revision_ = 0
 
uint64_t composite_source_revision_ = 0
 
gfx::SnesPalette rendered_dungeon_palette_
 
std::vector< SDL_Color > rendered_palette_
 
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
 
uint64_t composite_rendered_source_revision_ = 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 220 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 843 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 1122 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_, 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(), MarkCompositeDirty(), 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(), rendered_dungeon_palette_, rendered_palette_, RenderObjectsToBackground(), ResolveDungeonPaletteId(), rom(), room_id_, 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()

void yaze::zelda3::Room::RenderObjectsToBackground ( )

Definition at line 1456 of file room.cc.

References yaze::gfx::PaletteGroup::AddPalette(), bg1_buffer_, bg2_buffer_, yaze::gfx::BackgroundBuffer::bitmap(), yaze::zelda3::Block, yaze::gfx::BackgroundBuffer::ClearBG1RevealMask(), yaze::gfx::BackgroundBuffer::ClearCoverageBuffer(), yaze::gfx::BackgroundBuffer::ClearPriorityBuffer(), yaze::gfx::BackgroundBuffer::ClearTileBuffer(), current_gfx16_, yaze::Rom::data(), yaze::zelda3::ObjectDrawer::DoorDef::direction, dirty_state_, doors_, yaze::zelda3::ObjectDrawer::DrawDoor(), yaze::zelda3::ObjectDrawer::DrawObjectList(), yaze::zelda3::ObjectDrawer::DrawPotItem(), yaze::zelda3::ObjectDrawer::DrawRoomDrawObjectData2x2(), yaze::gfx::PaletteGroupMap::dungeon_main, dungeon_state_, yaze::gfx::BackgroundBuffer::EnsureBitmapInitialized(), floor1_graphics_, floor2_graphics_, game_data_, yaze::zelda3::Room::DirtyState::graphics, yaze::Rom::is_loaded(), yaze::gfx::kBG2Objects, yaze::zelda3::RoomObject::layer_, LOG_DEBUG, LOG_WARN, yaze::zelda3::MapRoomObjectListIndexToDrawLayer(), yaze::zelda3::Nothing, object_bg1_buffer_, object_bg2_buffer_, yaze::zelda3::Room::DirtyState::objects, yaze::zelda3::GameData::palette_groups, yaze::zelda3::ObjectDrawer::DoorDef::position, pot_items_, ResolveDungeonPaletteId(), rom_, room_id_, yaze::zelda3::ObjectDrawer::SetBG1RevealMaskSource(), yaze::zelda3::ObjectDrawer::SetRoomFloorGraphics(), sprites_, tile_objects_, yaze::zelda3::Torch, and yaze::zelda3::ObjectDrawer::DoorDef::type.

Referenced by RenderRoomGraphics().

◆ LoadAnimatedGraphics()

◆ LoadObjects()

◆ EnsureObjectsLoaded()

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

Definition at line 948 of file room.cc.

References LoadObjects(), and objects_loaded_.

Referenced by yaze::zelda3::GenerateTrackCollision(), PrepareForRender(), and ReloadGraphics().

Here is the call graph for this function:

◆ LoadSprites()

◆ EnsureSpritesLoaded()

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

Definition at line 955 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 962 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 2733 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 4286 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 277 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 280 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 284 of file room.h.

References chests_in_room_.

◆ chests_dirty()

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

◆ MarkChestsDirty()

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

Definition at line 286 of file room.h.

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

◆ ClearChestsDirty()

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

Definition at line 287 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 291 of file room.h.

References z3_staircases_.

◆ GetDoors() [1/2]

◆ GetDoors() [2/2]

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

Definition at line 374 of file room.h.

References doors_.

◆ AddDoor()

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

Definition at line 375 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 380 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 390 of file room.h.

References pot_items_.

◆ pot_items_dirty()

◆ MarkPotItemsDirty()

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

Definition at line 392 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 393 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 396 of file room.h.

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

◆ ClearTorchesDirty()

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

Definition at line 397 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 398 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 399 of file room.h.

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

◆ ClearBlocksDirty()

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

Definition at line 400 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 402 of file room.h.

References layout_.

◆ GetTileObjects() [1/2]

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

Definition at line 405 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::anonymous_namespace{dungeon_canvas_issue_report.cc}::BuildObjectTraceReport(), 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::DungeonRemoveObjectCommandHandler::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 408 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 417 of file room.h.

References MarkSaveDirtyForTileObject(), objects_loaded_, and tile_objects_.

Here is the call graph for this function:

◆ AddObject()

◆ RemoveObject()

◆ UpdateObject()

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

Definition at line 2543 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 2560 of file room.cc.

References tile_objects_.

◆ ValidateObject()

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

Definition at line 2570 of file room.cc.

Referenced by AddObject(), and UpdateObject().

◆ MarkObjectsDirty()

◆ MarkObjectStreamDirty()

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

Definition at line 436 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 455 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 461 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 465 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()

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

◆ RemoveTileObject()

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

Definition at line 482 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 492 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 4421 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 4426 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 522 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()

◆ ClearCustomCollisionDirty()

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

◆ MarkCustomCollisionDirty()

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

Definition at line 547 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 551 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 554 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()

◆ ClearWaterFillDirty()

◆ MarkWaterFillDirty()

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

Definition at line 605 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 609 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 620 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 670 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 679 of file room.h.

References bg2(), bg2_, is_dark_, is_light_, layer2_mode_, layer_merging_, MarkGraphicsDirty(), 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 703 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 709 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 737 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 744 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 751 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 758 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 765 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 771 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 777 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 785 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 793 of file room.h.

References is_light_.

Referenced by SaveRoomHeader().

◆ SetMessageIdDirect()

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

Definition at line 796 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 802 of file room.h.

References bg2_, layer2_mode_, layer_merging_, MarkGraphicsDirty(), 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 814 of file room.h.

References layer_merging_, MarkGraphicsDirty(), 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 821 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 827 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 833 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 839 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 845 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 851 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 857 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 863 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 869 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 875 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 881 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 887 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 893 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 899 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 905 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 911 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 920 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 922 of file room.h.

References sprites_loaded_.

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

◆ AreChestsLoaded()

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

Definition at line 923 of file room.h.

References chests_loaded_.

◆ ArePotItemsLoaded()

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

◆ AreTorchesLoaded()

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

Definition at line 925 of file room.h.

References torches_loaded_.

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

◆ AreBlocksLoaded()

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

Definition at line 931 of file room.h.

References blocks_loaded_.

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

◆ bg2()

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

Definition at line 934 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

◆ layer2_mode()

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

Definition at line 940 of file room.h.

References layer2_mode_.

Referenced by yaze::zelda3::RoomLayerManager::CompositeToOutput().

◆ staircase_plane()

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

Definition at line 941 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 963 of file room.h.

References message_id_.

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

◆ SetLayoutId()

◆ floor1()

◆ floor2()

◆ 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 2015 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 1006 of file room.h.

References blocks_.

◆ rom() [1/2]

◆ rom() [2/2]

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

Definition at line 1008 of file room.h.

References rom_.

◆ mutable_rom()

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

Definition at line 1009 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 1011 of file room.h.

References game_data_.

◆ SetGameData()

◆ version_constants()

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

Definition at line 1015 of file room.h.

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

Referenced by LoadAnimatedGraphics().

◆ get_gfx_buffer()

◆ graphics_revision()

◆ composite_source_revision()

uint64_t yaze::zelda3::Room::composite_source_revision ( ) const
inline

Definition at line 1028 of file room.h.

References composite_source_revision_.

Referenced by yaze::editor::RoomCompositeOutput::Prepare().

◆ rendered_dungeon_palette()

const gfx::SnesPalette & yaze::zelda3::Room::rendered_dungeon_palette ( ) const
inline

◆ rendered_palette()

const std::vector< SDL_Color > & yaze::zelda3::Room::rendered_palette ( ) const
inline

Definition at line 1034 of file room.h.

References rendered_palette_.

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

◆ bg1_buffer() [1/2]

◆ bg2_buffer() [1/2]

◆ bg1_buffer() [2/2]

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

Definition at line 1041 of file room.h.

References bg1_buffer_.

◆ bg2_buffer() [2/2]

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

Definition at line 1042 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 1044 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 1046 of file room.h.

References object_bg2_buffer_.

◆ GetCompositeBitmap()

◆ RenderComposite()

void yaze::zelda3::Room::RenderComposite ( const RoomLayerManager & layer_mgr,
gfx::Bitmap & output )

Compose into storage owned by the caller. Live editor views use this path so deferred draws retain stable bitmap and texture identity.

Definition at line 1116 of file room.cc.

References yaze::zelda3::Room::DirtyState::composite, yaze::zelda3::RoomLayerManager::CompositeToOutput(), and dirty_state_.

Referenced by GetCompositeBitmap(), and yaze::editor::RoomCompositeOutput::Prepare().

Here is the call graph for this function:

◆ composite_bitmap()

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

Definition at line 1053 of file room.h.

References composite_bitmap_.

◆ MarkCompositeDirty()

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

Mark composite bitmap as needing regeneration.

Definition at line 1111 of file room.cc.

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

Referenced by MarkGraphicsDirty(), MarkLayoutDirty(), MarkObjectsDirty(), and RenderRoomGraphics().

◆ IsCompositeDirty()

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

Definition at line 1057 of file room.h.

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

◆ GetDungeonState() [1/2]

◆ GetDungeonState() [2/2]

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

Definition at line 1060 of file room.h.

References dungeon_state_.

Member Data Documentation

◆ rom_

◆ game_data_

◆ current_gfx16_

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

◆ graphics_revision_

uint64_t yaze::zelda3::Room::graphics_revision_ = 0
private

Definition at line 1067 of file room.h.

Referenced by CopyRoomGraphicsToBuffer(), graphics_revision(), and LoadAnimatedGraphics().

◆ composite_source_revision_

uint64_t yaze::zelda3::Room::composite_source_revision_ = 0
private

Definition at line 1068 of file room.h.

Referenced by composite_source_revision(), GetCompositeBitmap(), and MarkCompositeDirty().

◆ rendered_dungeon_palette_

gfx::SnesPalette yaze::zelda3::Room::rendered_dungeon_palette_
private

Definition at line 1069 of file room.h.

Referenced by rendered_dungeon_palette(), and RenderRoomGraphics().

◆ rendered_palette_

std::vector<SDL_Color> yaze::zelda3::Room::rendered_palette_
private

Definition at line 1070 of file room.h.

Referenced by rendered_palette(), and RenderRoomGraphics().

◆ 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 1098 of file room.h.

Referenced by SaveObjectStreamHeader(), and set_floor1().

◆ kObjectHeaderFloor2Dirty

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

Definition at line 1099 of file room.h.

Referenced by SaveObjectStreamHeader(), and set_floor2().

◆ kObjectHeaderLayoutDirty

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

Definition at line 1100 of file room.h.

Referenced by SaveObjectStreamHeader(), and SetLayoutId().

◆ composite_bitmap_

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

Definition at line 1103 of file room.h.

Referenced by composite_bitmap(), and GetCompositeBitmap().

◆ composite_signature_

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

Definition at line 1104 of file room.h.

Referenced by GetCompositeBitmap().

◆ composite_rendered_source_revision_

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

Definition at line 1105 of file room.h.

Referenced by GetCompositeBitmap().

◆ has_composite_signature_

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

Definition at line 1106 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 1110 of file room.h.

Referenced by IsLight(), SetBg2(), and SetIsLight().

◆ is_loaded_

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

Definition at line 1111 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 1113 of file room.h.

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

◆ chests_loaded_

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

Definition at line 1114 of file room.h.

Referenced by AreChestsLoaded(), and LoadChests().

◆ pot_items_loaded_

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

Definition at line 1115 of file room.h.

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

◆ torches_loaded_

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

Definition at line 1116 of file room.h.

Referenced by AreTorchesLoaded(), and LoadTorches().

◆ blocks_loaded_

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

Definition at line 1117 of file room.h.

Referenced by AreBlocksLoaded(), and LoadBlocks().

◆ is_dark_

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

Definition at line 1118 of file room.h.

Referenced by SaveRoomHeader(), SetBg2(), and SetIsDark().

◆ is_floor_

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

Definition at line 1119 of file room.h.

Referenced by LoadObjects().

◆ cached_blockset_

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

Definition at line 1123 of file room.h.

Referenced by RenderRoomGraphics().

◆ cached_spriteset_

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

Definition at line 1124 of file room.h.

Referenced by RenderRoomGraphics().

◆ cached_palette_

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

Definition at line 1125 of file room.h.

Referenced by RenderRoomGraphics().

◆ cached_layout_

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

Definition at line 1126 of file room.h.

Referenced by RenderRoomGraphics().

◆ cached_floor1_graphics_

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

Definition at line 1127 of file room.h.

Referenced by RenderRoomGraphics().

◆ cached_floor2_graphics_

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

Definition at line 1128 of file room.h.

Referenced by RenderRoomGraphics().

◆ cached_effect_

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

Definition at line 1129 of file room.h.

Referenced by RenderRoomGraphics().

◆ cached_tag1_

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

Definition at line 1130 of file room.h.

Referenced by RenderRoomGraphics().

◆ cached_tag2_

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

Definition at line 1131 of file room.h.

Referenced by RenderRoomGraphics().

◆ room_id_

◆ animated_frame_

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

Definition at line 1134 of file room.h.

Referenced by LoadAnimatedGraphics().

◆ staircase_plane_

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

Definition at line 1136 of file room.h.

Referenced by SetStaircasePlane(), and staircase_plane().

◆ staircase_rooms_

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

Definition at line 1137 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 1146 of file room.h.

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

◆ message_id_

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

Definition at line 1147 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 1149 of file room.h.

Referenced by SetBackgroundTileset().

◆ sprite_tileset_

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

Definition at line 1150 of file room.h.

Referenced by SetSpriteTileset().

◆ layer2_behavior_

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

Definition at line 1151 of file room.h.

Referenced by SetLayer2Behavior().

◆ floor1_graphics_

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

◆ floor2_graphics_

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

◆ layer2_mode_

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

Definition at line 1154 of file room.h.

Referenced by layer2_mode(), SaveRoomHeader(), SetBg2(), 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 1157 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 1161 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 1165 of file room.h.

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

◆ layout_

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

Definition at line 1166 of file room.h.

Referenced by GetLayout(), and LoadLayoutTilesToBuffer().

◆ layer_merging_

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

Definition at line 1168 of file room.h.

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

◆ collision_

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

Definition at line 1169 of file room.h.

Referenced by collision(), and SetCollision().

◆ effect_

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

Definition at line 1170 of file room.h.

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

◆ tag1_

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

Definition at line 1171 of file room.h.

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

◆ tag2_

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

Definition at line 1172 of file room.h.

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

◆ bg2_

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

Definition at line 1174 of file room.h.

Referenced by bg2(), SetBg2(), and SetLayer2Mode().

◆ pits_

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

Definition at line 1175 of file room.h.

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

◆ stair1_

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

Definition at line 1176 of file room.h.

Referenced by SetStair1Target(), and SetStair1TargetLayer().

◆ stair2_

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

Definition at line 1177 of file room.h.

Referenced by SetStair2Target(), and SetStair2TargetLayer().

◆ stair3_

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

Definition at line 1178 of file room.h.

Referenced by SetStair3Target(), and SetStair3TargetLayer().

◆ stair4_

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

Definition at line 1179 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 1186 of file room.h.

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

◆ dungeon_state_

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

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