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

#include <room.h>

Public Member Functions

 Room ()=default
 
 Room (int room_id, Rom *rom)
 
void LoadRoomGraphics (uint8_t entrance_blockset=0xFF)
 
void CopyRoomGraphicsToBuffer ()
 
void RenderRoomGraphics ()
 
void RenderObjectsToBackground ()
 
void LoadAnimatedGraphics ()
 
void LoadObjects ()
 
void LoadSprites ()
 
void LoadChests ()
 
void LoadDoors ()
 
void LoadTorches ()
 
void LoadBlocks ()
 
void LoadPits ()
 
void LoadRoomLayout ()
 
void LoadLayoutTilesToBuffer ()
 
const std::vector< zelda3::Sprite > & GetSprites () const
 
std::vector< zelda3::Sprite > & GetSprites ()
 
const std::vector< chest_data > & GetChests () const
 
std::vector< chest_data > & GetChests ()
 
const std::vector< staircase > & GetStairs () const
 
std::vector< staircase > & GetStairs ()
 
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 MarkGraphicsDirty ()
 
void MarkLayoutDirty ()
 
void RemoveTileObject (size_t index)
 
size_t GetTileObjectCount () const
 
RoomObjectGetTileObject (size_t index)
 
const RoomObjectGetTileObject (size_t index) const
 
void SetTileObjects (const std::vector< RoomObject > &objects)
 
void SetBg2 (background2 bg2)
 
void SetCollision (CollisionKey collision)
 
void SetIsLight (bool is_light)
 
void SetPalette (uint8_t palette)
 
void SetBlockset (uint8_t blockset)
 
void SetSpriteset (uint8_t spriteset)
 
void SetEffect (EffectKey effect)
 
void SetTag1 (TagKey tag1)
 
void SetTag2 (TagKey tag2)
 
void SetStaircasePlane (int index, uint8_t plane)
 
void SetHolewarp (uint8_t holewarp)
 
void SetStaircaseRoom (int index, uint8_t room)
 
void SetMessageId (uint16_t message_id)
 
bool IsLight () const
 
void SetMessageIdDirect (uint16_t message_id)
 
void SetLayer2Mode (uint8_t mode)
 
void SetLayerMerging (LayerMergeType merging)
 
void SetIsDark (bool is_dark)
 
void SetPaletteDirect (uint8_t palette)
 
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)
 
EffectKey effect () const
 
TagKey tag1 () const
 
TagKey tag2 () const
 
CollisionKey collision () const
 
const LayerMergeTypelayer_merging () const
 
int id () const
 
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 ()
 
std::vector< uint8_t > EncodeObjects () const
 
auto blocks () const
 
auto & mutable_blocks ()
 
auto rom ()
 
auto mutable_rom ()
 
const std::array< uint8_t, 0x4000 > & get_gfx_buffer () const
 
auto & bg1_buffer ()
 
auto & bg2_buffer ()
 
const auto & bg1_buffer () const
 
const auto & bg2_buffer () const
 

Public Attributes

uint8_t blockset = 0
 
uint8_t spriteset = 0
 
uint8_t palette = 0
 
uint8_t layout = 0
 
uint8_t holewarp = 0
 
uint16_t message_id_ = 0
 

Private Attributes

Romrom_
 
std::array< uint8_t, 0x4000 > current_gfx16_
 
gfx::BackgroundBuffer bg1_buffer_ {512, 512}
 
gfx::BackgroundBuffer bg2_buffer_ {512, 512}
 
bool is_light_
 
bool is_loaded_ = false
 
bool is_dark_
 
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
 
bool graphics_dirty_ = true
 
bool objects_dirty_ = true
 
bool layout_dirty_ = true
 
bool textures_dirty_ = true
 
int room_id_
 
int animated_frame_
 
uint8_t staircase_plane_ [4]
 
uint8_t staircase_rooms_ [4]
 
uint8_t background_tileset_
 
uint8_t sprite_tileset_
 
uint8_t layer2_behavior_
 
uint8_t palette_
 
uint8_t floor1_graphics_
 
uint8_t floor2_graphics_
 
uint8_t layer2_mode_
 
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_
 
RoomLayout layout_
 
LayerMergeType layer_merging_
 
CollisionKey collision_
 
EffectKey effect_
 
TagKey tag1_
 
TagKey tag2_
 
background2 bg2_
 
destination pits_
 
destination stair1_
 
destination stair2_
 
destination stair3_
 
destination stair4_
 

Detailed Description

Definition at line 182 of file room.h.

Constructor & Destructor Documentation

◆ Room() [1/2]

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

◆ Room() [2/2]

yaze::zelda3::Room::Room ( int  room_id,
Rom rom 
)
inline

Definition at line 185 of file room.h.

Member Function Documentation

◆ LoadRoomGraphics()

void yaze::zelda3::Room::LoadRoomGraphics ( uint8_t  entrance_blockset = 0xFF)

Definition at line 195 of file room.cc.

References blocks_, blockset, rom(), and spriteset.

Referenced by yaze::editor::DungeonRoomLoader::LoadAndRenderRoomGraphics(), and yaze::gui::DungeonObjectEmulatorPreview::TriggerEmulatedRender().

Here is the call graph for this function:

◆ CopyRoomGraphicsToBuffer()

void yaze::zelda3::Room::CopyRoomGraphicsToBuffer ( )

◆ RenderRoomGraphics()

◆ RenderObjectsToBackground()

◆ LoadAnimatedGraphics()

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

Definition at line 545 of file room.cc.

References animated_frame_, background_tileset_, current_gfx16_, yaze::Rom::is_loaded(), rom(), rom_, and yaze::SnesToPc().

Referenced by CopyRoomGraphicsToBuffer().

Here is the call graph for this function:

◆ LoadObjects()

◆ LoadSprites()

◆ LoadChests()

void yaze::zelda3::Room::LoadChests ( )

Definition at line 978 of file room.cc.

References yaze::zelda3::chests_data_pointer1, chests_in_room_, yaze::zelda3::chests_length_pointer, rom(), room_id_, and yaze::SnesToPc().

Referenced by LoadObjects().

Here is the call graph for this function:

◆ LoadDoors()

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

Definition at line 1002 of file room.cc.

References LOG_DEBUG, rom(), and room_id_.

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

Here is the call graph for this function:

◆ LoadTorches()

void yaze::zelda3::Room::LoadTorches ( )

◆ LoadBlocks()

◆ LoadPits()

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

Definition at line 1155 of file room.cc.

References LOG_DEBUG, yaze::zelda3::pit_count, yaze::zelda3::pit_pointer, pits_, rom(), room_id_, yaze::SnesToPc(), destination::target, and destination::target_layer.

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

Here is the call graph for this function:

◆ LoadRoomLayout()

void yaze::zelda3::Room::LoadRoomLayout ( )

◆ LoadLayoutTilesToBuffer()

void yaze::zelda3::Room::LoadLayoutTilesToBuffer ( )

◆ GetSprites() [1/2]

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

Definition at line 205 of file room.h.

References sprites_.

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

◆ GetSprites() [2/2]

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

Definition at line 206 of file room.h.

References sprites_.

◆ GetChests() [1/2]

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

Definition at line 209 of file room.h.

References chests_in_room_.

◆ GetChests() [2/2]

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

Definition at line 210 of file room.h.

References chests_in_room_.

◆ GetStairs() [1/2]

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

Definition at line 213 of file room.h.

References z3_staircases_.

◆ GetStairs() [2/2]

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

Definition at line 214 of file room.h.

References z3_staircases_.

◆ GetLayout()

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

Definition at line 216 of file room.h.

References layout_.

◆ GetTileObjects() [1/2]

◆ GetTileObjects() [2/2]

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

Definition at line 223 of file room.h.

References tile_objects_.

◆ ClearTileObjects()

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

Definition at line 226 of file room.h.

References tile_objects_.

◆ AddTileObject()

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

Definition at line 227 of file room.h.

References MarkObjectsDirty(), and tile_objects_.

Here is the call graph for this function:

◆ AddObject()

absl::Status yaze::zelda3::Room::AddObject ( const RoomObject object)

Definition at line 829 of file room.cc.

References tile_objects_, and ValidateObject().

Referenced by yaze::zelda3::DungeonRenderingIntegrationTest::CreateTestRoom(), and yaze::zelda3::TEST_F().

Here is the call graph for this function:

◆ RemoveObject()

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

Definition at line 841 of file room.cc.

References tile_objects_.

◆ UpdateObject()

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

Definition at line 851 of file room.cc.

References 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 865 of file room.cc.

References tile_objects_.

◆ ValidateObject()

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

Definition at line 875 of file room.cc.

Referenced by AddObject(), and UpdateObject().

◆ MarkObjectsDirty()

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

Definition at line 240 of file room.h.

References objects_dirty_, and textures_dirty_.

Referenced by AddTileObject(), RemoveTileObject(), SetEffect(), SetTag1(), SetTag2(), and SetTileObjects().

◆ MarkGraphicsDirty()

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

Definition at line 241 of file room.h.

References graphics_dirty_, and textures_dirty_.

Referenced by set_floor1(), set_floor2(), SetBlockset(), SetPalette(), and SetSpriteset().

◆ MarkLayoutDirty()

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

Definition at line 242 of file room.h.

References layout_dirty_, and textures_dirty_.

◆ RemoveTileObject()

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

Definition at line 243 of file room.h.

References MarkObjectsDirty(), and tile_objects_.

Here is the call graph for this function:

◆ GetTileObjectCount()

size_t yaze::zelda3::Room::GetTileObjectCount ( ) const
inline

Definition at line 249 of file room.h.

References tile_objects_.

◆ GetTileObject() [1/2]

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

Definition at line 250 of file room.h.

References tile_objects_.

◆ GetTileObject() [2/2]

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

Definition at line 251 of file room.h.

References tile_objects_.

◆ SetTileObjects()

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

Definition at line 256 of file room.h.

References MarkObjectsDirty(), and tile_objects_.

Here is the call graph for this function:

◆ SetBg2()

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

Definition at line 262 of file room.h.

References bg2_.

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

◆ SetCollision()

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

Definition at line 263 of file room.h.

References collision(), and collision_.

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

Here is the call graph for this function:

◆ SetIsLight()

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

Definition at line 264 of file room.h.

References is_light_.

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

◆ SetPalette()

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

Definition at line 265 of file room.h.

References MarkGraphicsDirty(), and palette.

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

Here is the call graph for this function:

◆ SetBlockset()

void yaze::zelda3::Room::SetBlockset ( uint8_t  blockset)
inline

Definition at line 271 of file room.h.

References blockset, and MarkGraphicsDirty().

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

Here is the call graph for this function:

◆ SetSpriteset()

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

Definition at line 277 of file room.h.

References MarkGraphicsDirty(), and spriteset.

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

Here is the call graph for this function:

◆ SetEffect()

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

Definition at line 283 of file room.h.

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

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

Here is the call graph for this function:

◆ SetTag1()

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

Definition at line 289 of file room.h.

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

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

Here is the call graph for this function:

◆ SetTag2()

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

Definition at line 295 of file room.h.

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

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

Here is the call graph for this function:

◆ SetStaircasePlane()

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

Definition at line 301 of file room.h.

References staircase_plane_.

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

◆ SetHolewarp()

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

Definition at line 304 of file room.h.

References holewarp.

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

◆ SetStaircaseRoom()

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

Definition at line 305 of file room.h.

References staircase_rooms_.

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

◆ SetMessageId()

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

Definition at line 309 of file room.h.

References message_id_.

◆ IsLight()

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

Definition at line 312 of file room.h.

References is_light_.

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

◆ SetMessageIdDirect()

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

Definition at line 315 of file room.h.

References message_id_.

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

◆ SetLayer2Mode()

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

Definition at line 316 of file room.h.

References layer2_mode_.

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

◆ SetLayerMerging()

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

Definition at line 317 of file room.h.

References layer_merging_.

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

◆ SetIsDark()

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

Definition at line 318 of file room.h.

References is_dark_.

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

◆ SetPaletteDirect()

void yaze::zelda3::Room::SetPaletteDirect ( uint8_t  palette)
inline

Definition at line 319 of file room.h.

References palette, and palette_.

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

◆ SetBackgroundTileset()

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

Definition at line 320 of file room.h.

References background_tileset_.

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

◆ SetSpriteTileset()

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

Definition at line 321 of file room.h.

References sprite_tileset_.

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

◆ SetLayer2Behavior()

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

Definition at line 322 of file room.h.

References layer2_behavior_.

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

◆ SetTag1Direct()

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

Definition at line 323 of file room.h.

References tag1(), and tag1_.

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

Here is the call graph for this function:

◆ SetTag2Direct()

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

Definition at line 324 of file room.h.

References tag2(), and tag2_.

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

Here is the call graph for this function:

◆ SetPitsTargetLayer()

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

Definition at line 325 of file room.h.

References pits_, and destination::target_layer.

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

◆ SetStair1TargetLayer()

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

Definition at line 326 of file room.h.

References stair1_, and destination::target_layer.

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

◆ SetStair2TargetLayer()

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

Definition at line 327 of file room.h.

References stair2_, and destination::target_layer.

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

◆ SetStair3TargetLayer()

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

Definition at line 328 of file room.h.

References stair3_, and destination::target_layer.

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

◆ SetStair4TargetLayer()

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

Definition at line 329 of file room.h.

References stair4_, and destination::target_layer.

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

◆ SetPitsTarget()

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

Definition at line 330 of file room.h.

References pits_, and destination::target.

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

◆ SetStair1Target()

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

Definition at line 331 of file room.h.

References stair1_, and destination::target.

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

◆ SetStair2Target()

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

Definition at line 332 of file room.h.

References stair2_, and destination::target.

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

◆ SetStair3Target()

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

Definition at line 333 of file room.h.

References stair3_, and destination::target.

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

◆ SetStair4Target()

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

Definition at line 334 of file room.h.

References stair4_, and destination::target.

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

◆ IsLoaded()

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

Definition at line 337 of file room.h.

References is_loaded_.

◆ SetLoaded()

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

Definition at line 338 of file room.h.

References is_loaded_.

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

◆ effect()

EffectKey yaze::zelda3::Room::effect ( ) const
inline

Definition at line 341 of file room.h.

References effect_.

Referenced by SetEffect().

◆ tag1()

TagKey yaze::zelda3::Room::tag1 ( ) const
inline

Definition at line 342 of file room.h.

References tag1_.

Referenced by SetTag1(), and SetTag1Direct().

◆ tag2()

TagKey yaze::zelda3::Room::tag2 ( ) const
inline

Definition at line 343 of file room.h.

References tag2_.

Referenced by SetTag2(), and SetTag2Direct().

◆ collision()

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

Definition at line 344 of file room.h.

References collision_.

Referenced by SetCollision().

◆ layer_merging()

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

Definition at line 345 of file room.h.

References layer_merging_.

◆ id()

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

Definition at line 347 of file room.h.

References room_id_.

◆ floor1()

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

Definition at line 359 of file room.h.

References floor1_graphics_.

◆ floor2()

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

Definition at line 360 of file room.h.

References floor2_graphics_.

◆ set_floor1()

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

Definition at line 361 of file room.h.

References floor1_graphics_, and MarkGraphicsDirty().

Here is the call graph for this function:

◆ set_floor2()

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

Definition at line 367 of file room.h.

References floor2_graphics_, and MarkGraphicsDirty().

Here is the call graph for this function:

◆ ParseObjectsFromLocation()

◆ HandleSpecialObjects()

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

◆ SaveObjects()

◆ EncodeObjects()

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

Definition at line 732 of file room.cc.

References tile_objects_.

Referenced by SaveObjects().

◆ blocks()

auto yaze::zelda3::Room::blocks ( ) const
inline

Definition at line 382 of file room.h.

References blocks_.

◆ mutable_blocks()

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

Definition at line 383 of file room.h.

References blocks_.

◆ rom()

◆ mutable_rom()

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

Definition at line 385 of file room.h.

References rom_.

◆ get_gfx_buffer()

const std::array< uint8_t, 0x4000 > & yaze::zelda3::Room::get_gfx_buffer ( ) const
inline

Definition at line 386 of file room.h.

References current_gfx16_.

Referenced by yaze::gui::DungeonObjectEmulatorPreview::TriggerEmulatedRender().

◆ bg1_buffer() [1/2]

◆ bg2_buffer() [1/2]

◆ bg1_buffer() [2/2]

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

Definition at line 391 of file room.h.

References bg1_buffer_.

◆ bg2_buffer() [2/2]

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

Definition at line 392 of file room.h.

References bg2_buffer_.

Member Data Documentation

◆ blockset

◆ spriteset

uint8_t yaze::zelda3::Room::spriteset = 0

◆ palette

◆ layout

uint8_t yaze::zelda3::Room::layout = 0

Definition at line 352 of file room.h.

Referenced by yaze::cli::HandleDungeonExportLegacy(), LoadObjects(), and RenderRoomGraphics().

◆ holewarp

uint8_t yaze::zelda3::Room::holewarp = 0

Definition at line 353 of file room.h.

Referenced by SetHolewarp().

◆ message_id_

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

Definition at line 356 of file room.h.

Referenced by SetMessageId(), and SetMessageIdDirect().

◆ rom_

◆ current_gfx16_

std::array<uint8_t, 0x4000> 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

◆ is_light_

bool yaze::zelda3::Room::is_light_
private

Definition at line 403 of file room.h.

Referenced by IsLight(), and SetIsLight().

◆ is_loaded_

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

Definition at line 404 of file room.h.

Referenced by IsLoaded(), and SetLoaded().

◆ is_dark_

bool yaze::zelda3::Room::is_dark_
private

Definition at line 405 of file room.h.

Referenced by SetIsDark().

◆ is_floor_

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

Definition at line 406 of file room.h.

Referenced by LoadObjects().

◆ cached_blockset_

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

Definition at line 409 of file room.h.

Referenced by RenderRoomGraphics().

◆ cached_spriteset_

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

Definition at line 410 of file room.h.

Referenced by RenderRoomGraphics().

◆ cached_palette_

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

Definition at line 411 of file room.h.

Referenced by RenderRoomGraphics().

◆ cached_layout_

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

Definition at line 412 of file room.h.

Referenced by RenderRoomGraphics().

◆ cached_floor1_graphics_

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

Definition at line 413 of file room.h.

Referenced by RenderRoomGraphics().

◆ cached_floor2_graphics_

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

Definition at line 414 of file room.h.

Referenced by RenderRoomGraphics().

◆ cached_effect_

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

Definition at line 415 of file room.h.

Referenced by RenderRoomGraphics().

◆ cached_tag1_

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

Definition at line 416 of file room.h.

Referenced by RenderRoomGraphics().

◆ cached_tag2_

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

Definition at line 417 of file room.h.

Referenced by RenderRoomGraphics().

◆ graphics_dirty_

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

Definition at line 420 of file room.h.

Referenced by MarkGraphicsDirty(), RenderObjectsToBackground(), and RenderRoomGraphics().

◆ objects_dirty_

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

Definition at line 421 of file room.h.

Referenced by MarkObjectsDirty(), RenderObjectsToBackground(), and RenderRoomGraphics().

◆ layout_dirty_

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

Definition at line 422 of file room.h.

Referenced by MarkLayoutDirty(), and RenderRoomGraphics().

◆ textures_dirty_

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

Definition at line 423 of file room.h.

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

◆ room_id_

◆ animated_frame_

int yaze::zelda3::Room::animated_frame_
private

Definition at line 426 of file room.h.

Referenced by LoadAnimatedGraphics().

◆ staircase_plane_

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

Definition at line 428 of file room.h.

Referenced by SetStaircasePlane().

◆ staircase_rooms_

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

Definition at line 429 of file room.h.

Referenced by HandleSpecialObjects(), and SetStaircaseRoom().

◆ background_tileset_

uint8_t yaze::zelda3::Room::background_tileset_
private

Definition at line 431 of file room.h.

Referenced by LoadAnimatedGraphics(), and SetBackgroundTileset().

◆ sprite_tileset_

uint8_t yaze::zelda3::Room::sprite_tileset_
private

Definition at line 432 of file room.h.

Referenced by SetSpriteTileset().

◆ layer2_behavior_

uint8_t yaze::zelda3::Room::layer2_behavior_
private

Definition at line 433 of file room.h.

Referenced by SetLayer2Behavior().

◆ palette_

uint8_t yaze::zelda3::Room::palette_
private

Definition at line 434 of file room.h.

Referenced by SetPaletteDirect().

◆ floor1_graphics_

uint8_t yaze::zelda3::Room::floor1_graphics_
private

Definition at line 435 of file room.h.

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

◆ floor2_graphics_

uint8_t yaze::zelda3::Room::floor2_graphics_
private

Definition at line 436 of file room.h.

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

◆ layer2_mode_

uint8_t yaze::zelda3::Room::layer2_mode_
private

Definition at line 437 of file room.h.

Referenced by 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 440 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 444 of file room.h.

Referenced by GetSprites(), GetSprites(), and LoadSprites().

◆ z3_staircases_

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

Definition at line 445 of file room.h.

Referenced by GetStairs(), GetStairs(), HandleSpecialObjects(), and ParseObjectsFromLocation().

◆ chests_in_room_

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

Definition at line 446 of file room.h.

Referenced by GetChests(), GetChests(), HandleSpecialObjects(), and LoadChests().

◆ layout_

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

Definition at line 447 of file room.h.

Referenced by GetLayout(), and LoadLayoutTilesToBuffer().

◆ layer_merging_

LayerMergeType yaze::zelda3::Room::layer_merging_
private

Definition at line 450 of file room.h.

Referenced by layer_merging(), and SetLayerMerging().

◆ collision_

CollisionKey yaze::zelda3::Room::collision_
private

Definition at line 451 of file room.h.

Referenced by collision(), and SetCollision().

◆ effect_

EffectKey yaze::zelda3::Room::effect_
private

Definition at line 452 of file room.h.

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

◆ tag1_

TagKey yaze::zelda3::Room::tag1_
private

Definition at line 453 of file room.h.

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

◆ tag2_

TagKey yaze::zelda3::Room::tag2_
private

Definition at line 454 of file room.h.

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

◆ bg2_

background2 yaze::zelda3::Room::bg2_
private

Definition at line 456 of file room.h.

Referenced by SetBg2().

◆ pits_

destination yaze::zelda3::Room::pits_
private

Definition at line 457 of file room.h.

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

◆ stair1_

destination yaze::zelda3::Room::stair1_
private

Definition at line 458 of file room.h.

Referenced by SetStair1Target(), and SetStair1TargetLayer().

◆ stair2_

destination yaze::zelda3::Room::stair2_
private

Definition at line 459 of file room.h.

Referenced by SetStair2Target(), and SetStair2TargetLayer().

◆ stair3_

destination yaze::zelda3::Room::stair3_
private

Definition at line 460 of file room.h.

Referenced by SetStair3Target(), and SetStair3TargetLayer().

◆ stair4_

destination yaze::zelda3::Room::stair4_
private

Definition at line 461 of file room.h.

Referenced by SetStair4Target(), and SetStair4TargetLayer().


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