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

#include <room.h>

Inheritance diagram for yaze::zelda3::Room:
Collaboration diagram for yaze::zelda3::Room:

Public Member Functions

 Room ()=default
 
 Room (int room_id)
 
 ~Room ()=default
 
void LoadHeader ()
 
void CalculateRoomSize ()
 
void LoadRoomFromROM ()
 
void LoadRoomGraphics (uint8_t entrance_blockset=0xFF)
 
void CopyRoomGraphicsToBuffer ()
 
void LoadAnimatedGraphics ()
 
void LoadObjects ()
 
void LoadSprites ()
 
void LoadChests ()
 
auto blocks () const
 
auto & mutable_blocks ()
 
auto layer1 () const
 
auto layer2 () const
 
auto layer3 () const
 
auto room_size () const
 
auto room_size_ptr () const
 
auto set_room_size (uint64_t size)
 
- Public Member Functions inherited from yaze::SharedRom
 SharedRom ()=default
 
virtual ~SharedRom ()=default
 
std::shared_ptr< Romshared_rom ()
 
auto rom ()
 

Public Attributes

uint8_t blockset = 0
 
uint8_t spriteset = 0
 
uint8_t palette = 0
 
uint8_t layout = 0
 
uint8_t holewarp = 0
 
uint8_t floor1 = 0
 
uint8_t floor2 = 0
 
uint16_t message_id_ = 0
 
gfx::Bitmap current_graphics_
 
std::vector< uint8_t > bg1_buffer_
 
std::vector< uint8_t > bg2_buffer_
 
std::vector< uint8_t > current_gfx16_
 

Private Attributes

bool is_light_
 
bool is_loaded_
 
bool is_dark_
 
bool is_floor_
 
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_
 
uint64_t room_size_
 
int64_t room_size_pointer_
 
std::array< uint8_t, 16 > blocks_
 
std::array< chest, 16 > chest_list_
 
std::array< gfx::Bitmap, 3 > background_bmps_
 
std::vector< RoomObjecttile_objects_
 
std::vector< zelda3::Spritesprites_
 
std::vector< staircasez3_staircases_
 
std::vector< chest_datachests_in_room_
 
LayerMergeType layer_merging_
 
CollisionKey collision_
 
EffectKey effect_
 
TagKey tag1_
 
TagKey tag2_
 
background2 bg2_
 
destination pits_
 
destination stair1_
 
destination stair2_
 
destination stair3_
 
destination stair4_
 

Additional Inherited Members

- Static Public Attributes inherited from yaze::SharedRom
static std::shared_ptr< Romshared_rom_ = nullptr
 

Detailed Description

Definition at line 114 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)
inline

Definition at line 117 of file room.h.

References room_id_.

◆ ~Room()

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

Member Function Documentation

◆ LoadHeader()

void yaze::zelda3::Room::LoadHeader ( )

◆ CalculateRoomSize()

void yaze::zelda3::Room::CalculateRoomSize ( )

Definition at line 59 of file room.cc.

References yaze::SharedRom::rom(), room_id_, room_size(), room_size_, and room_size_pointer_.

Referenced by LoadHeader().

Here is the call graph for this function:

◆ LoadRoomFromROM()

◆ LoadRoomGraphics()

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

Definition at line 195 of file room.cc.

References blocks_, blockset, current_gfx16_, yaze::SharedRom::rom(), and spriteset.

Here is the call graph for this function:

◆ CopyRoomGraphicsToBuffer()

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

◆ LoadAnimatedGraphics()

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

Definition at line 255 of file room.cc.

References animated_frame_, background_tileset_, current_gfx16_, yaze::SharedRom::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 463 of file room.cc.

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

Referenced by LoadObjects().

Here is the call graph for this function:

◆ blocks()

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

Definition at line 132 of file room.h.

References blocks_.

◆ mutable_blocks()

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

Definition at line 133 of file room.h.

References blocks_.

◆ layer1()

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

Definition at line 134 of file room.h.

References background_bmps_.

◆ layer2()

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

Definition at line 135 of file room.h.

References background_bmps_.

◆ layer3()

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

Definition at line 136 of file room.h.

References background_bmps_.

◆ room_size()

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

Definition at line 137 of file room.h.

References room_size_.

Referenced by CalculateRoomSize().

◆ room_size_ptr()

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

Definition at line 138 of file room.h.

References room_size_pointer_.

◆ set_room_size()

auto yaze::zelda3::Room::set_room_size ( uint64_t size)
inline

Definition at line 139 of file room.h.

References room_size_.

Member Data Documentation

◆ blockset

uint8_t yaze::zelda3::Room::blockset = 0

Definition at line 141 of file room.h.

Referenced by LoadHeader(), and LoadRoomGraphics().

◆ spriteset

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

Definition at line 142 of file room.h.

Referenced by LoadHeader(), and LoadRoomGraphics().

◆ palette

uint8_t yaze::zelda3::Room::palette = 0

Definition at line 143 of file room.h.

Referenced by LoadHeader().

◆ layout

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

Definition at line 144 of file room.h.

Referenced by LoadObjects().

◆ holewarp

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

Definition at line 145 of file room.h.

Referenced by LoadHeader().

◆ floor1

uint8_t yaze::zelda3::Room::floor1 = 0

Definition at line 146 of file room.h.

◆ floor2

uint8_t yaze::zelda3::Room::floor2 = 0

Definition at line 147 of file room.h.

◆ message_id_

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

Definition at line 149 of file room.h.

Referenced by LoadRoomFromROM().

◆ current_graphics_

gfx::Bitmap yaze::zelda3::Room::current_graphics_

Definition at line 151 of file room.h.

◆ bg1_buffer_

std::vector<uint8_t> yaze::zelda3::Room::bg1_buffer_

Definition at line 152 of file room.h.

◆ bg2_buffer_

std::vector<uint8_t> yaze::zelda3::Room::bg2_buffer_

Definition at line 153 of file room.h.

◆ current_gfx16_

std::vector<uint8_t> yaze::zelda3::Room::current_gfx16_

Definition at line 154 of file room.h.

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

◆ is_light_

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

Definition at line 157 of file room.h.

Referenced by LoadHeader().

◆ is_loaded_

bool yaze::zelda3::Room::is_loaded_
private

Definition at line 158 of file room.h.

◆ is_dark_

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

Definition at line 159 of file room.h.

Referenced by LoadRoomFromROM().

◆ is_floor_

bool yaze::zelda3::Room::is_floor_
private

Definition at line 160 of file room.h.

Referenced by LoadObjects().

◆ room_id_

int yaze::zelda3::Room::room_id_
private

◆ animated_frame_

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

Definition at line 163 of file room.h.

Referenced by LoadAnimatedGraphics().

◆ staircase_plane_

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

Definition at line 165 of file room.h.

Referenced by LoadHeader().

◆ staircase_rooms_

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

Definition at line 166 of file room.h.

Referenced by LoadHeader(), and LoadObjects().

◆ background_tileset_

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

Definition at line 168 of file room.h.

Referenced by LoadAnimatedGraphics(), and LoadRoomFromROM().

◆ sprite_tileset_

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

Definition at line 169 of file room.h.

Referenced by LoadRoomFromROM().

◆ layer2_behavior_

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

Definition at line 170 of file room.h.

Referenced by LoadRoomFromROM().

◆ palette_

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

Definition at line 171 of file room.h.

Referenced by LoadRoomFromROM().

◆ floor1_graphics_

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

Definition at line 172 of file room.h.

Referenced by LoadObjects().

◆ floor2_graphics_

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

Definition at line 173 of file room.h.

Referenced by LoadObjects().

◆ layer2_mode_

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

Definition at line 174 of file room.h.

Referenced by LoadRoomFromROM().

◆ room_size_

uint64_t yaze::zelda3::Room::room_size_
private

Definition at line 176 of file room.h.

Referenced by CalculateRoomSize(), room_size(), and set_room_size().

◆ room_size_pointer_

int64_t yaze::zelda3::Room::room_size_pointer_
private

Definition at line 177 of file room.h.

Referenced by CalculateRoomSize(), and room_size_ptr().

◆ blocks_

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

Definition at line 179 of file room.h.

Referenced by blocks(), CopyRoomGraphicsToBuffer(), LoadRoomGraphics(), and mutable_blocks().

◆ chest_list_

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

Definition at line 180 of file room.h.

◆ background_bmps_

std::array<gfx::Bitmap, 3> yaze::zelda3::Room::background_bmps_
private

Definition at line 182 of file room.h.

Referenced by layer1(), layer2(), and layer3().

◆ tile_objects_

std::vector<RoomObject> yaze::zelda3::Room::tile_objects_
private

Definition at line 183 of file room.h.

Referenced by LoadObjects().

◆ sprites_

std::vector<zelda3::Sprite> yaze::zelda3::Room::sprites_
private

Definition at line 184 of file room.h.

Referenced by LoadSprites().

◆ z3_staircases_

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

Definition at line 185 of file room.h.

Referenced by LoadObjects().

◆ chests_in_room_

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

Definition at line 186 of file room.h.

Referenced by LoadChests(), and LoadObjects().

◆ layer_merging_

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

Definition at line 188 of file room.h.

Referenced by LoadRoomFromROM().

◆ collision_

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

Definition at line 189 of file room.h.

Referenced by LoadHeader().

◆ effect_

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

Definition at line 190 of file room.h.

Referenced by LoadHeader().

◆ tag1_

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

Definition at line 191 of file room.h.

Referenced by LoadHeader(), and LoadRoomFromROM().

◆ tag2_

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

Definition at line 192 of file room.h.

Referenced by LoadHeader(), and LoadRoomFromROM().

◆ bg2_

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

Definition at line 194 of file room.h.

Referenced by LoadHeader().

◆ pits_

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

Definition at line 195 of file room.h.

Referenced by LoadRoomFromROM().

◆ stair1_

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

Definition at line 196 of file room.h.

Referenced by LoadRoomFromROM().

◆ stair2_

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

Definition at line 197 of file room.h.

Referenced by LoadRoomFromROM().

◆ stair3_

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

Definition at line 198 of file room.h.

Referenced by LoadRoomFromROM().

◆ stair4_

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

Definition at line 199 of file room.h.

Referenced by LoadRoomFromROM().


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