#include <room.h>
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< Rom > | shared_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< RoomObject > | tile_objects_ |
std::vector< zelda3::Sprite > | sprites_ |
std::vector< staircase > | z3_staircases_ |
std::vector< chest_data > | chests_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< Rom > | shared_rom_ = nullptr |
|
default |
|
inline |
|
default |
void yaze::zelda3::Room::LoadHeader | ( | ) |
Definition at line 18 of file room.cc.
References bg2_, blockset, CalculateRoomSize(), collision_, effect_, holewarp, is_light_, yaze::zelda3::kRoomHeaderPointer, yaze::zelda3::kRoomHeaderPointerBank, palette, yaze::SharedRom::rom(), room_id_, yaze::SnesToPc(), spriteset, staircase_plane_, staircase_rooms_, tag1_, and tag2_.
Referenced by yaze::test::TEST_F().
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().
void yaze::zelda3::Room::LoadRoomFromROM | ( | ) |
Definition at line 125 of file room.cc.
References background_tileset_, is_dark_, yaze::zelda3::kRoomHeaderPointer, yaze::zelda3::kRoomHeaderPointerBank, layer2_behavior_, layer2_mode_, layer_merging_, message_id_, yaze::zelda3::messages_id_dungeon, palette_, pits_, yaze::SharedRom::rom(), room_id_, yaze::zelda3::room_object_pointer, yaze::SnesToPc(), sprite_tileset_, stair1_, stair2_, stair3_, stair4_, tag1_, and tag2_.
Referenced by yaze::test::TEST_F().
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.
void yaze::zelda3::Room::CopyRoomGraphicsToBuffer | ( | ) |
Definition at line 231 of file room.cc.
References blocks_, current_gfx16_, yaze::zelda3::kGfxBufferRoomOffset, yaze::zelda3::kGfxBufferRoomSpriteLastLineOffset, LoadAnimatedGraphics(), and yaze::SharedRom::rom().
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().
void yaze::zelda3::Room::LoadObjects | ( | ) |
Definition at line 275 of file room.cc.
References yaze::zelda3::Chest, chests_in_room_, floor1_graphics_, floor2_graphics_, is_floor_, layout, LoadChests(), yaze::SharedRom::rom(), room_id_, yaze::zelda3::room_object_pointer, yaze::SnesToPc(), staircase_rooms_, yaze::zelda3::Stairs, yaze::zelda3::stairsObjects, tile_objects_, and z3_staircases_.
void yaze::zelda3::Room::LoadSprites | ( | ) |
Definition at line 416 of file room.cc.
References yaze::zelda3::Sprite::id(), yaze::zelda3::Sprite::layer(), yaze::SharedRom::rom(), room_id_, yaze::zelda3::rooms_sprite_pointer, yaze::zelda3::Sprite::set_key_drop(), yaze::SnesToPc(), sprites_, yaze::zelda3::Sprite::subtype(), yaze::zelda3::Sprite::x(), and yaze::zelda3::Sprite::y().
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().
|
inline |
|
inline |
|
inline |
Definition at line 134 of file room.h.
References background_bmps_.
|
inline |
Definition at line 135 of file room.h.
References background_bmps_.
|
inline |
Definition at line 136 of file room.h.
References background_bmps_.
|
inline |
|
inline |
Definition at line 138 of file room.h.
References room_size_pointer_.
|
inline |
Definition at line 139 of file room.h.
References room_size_.
uint8_t yaze::zelda3::Room::blockset = 0 |
Definition at line 141 of file room.h.
Referenced by LoadHeader(), and LoadRoomGraphics().
uint8_t yaze::zelda3::Room::spriteset = 0 |
Definition at line 142 of file room.h.
Referenced by LoadHeader(), and LoadRoomGraphics().
uint8_t yaze::zelda3::Room::palette = 0 |
Definition at line 143 of file room.h.
Referenced by LoadHeader().
uint8_t yaze::zelda3::Room::layout = 0 |
Definition at line 144 of file room.h.
Referenced by LoadObjects().
uint8_t yaze::zelda3::Room::holewarp = 0 |
Definition at line 145 of file room.h.
Referenced by LoadHeader().
uint16_t yaze::zelda3::Room::message_id_ = 0 |
Definition at line 149 of file room.h.
Referenced by LoadRoomFromROM().
gfx::Bitmap yaze::zelda3::Room::current_graphics_ |
std::vector<uint8_t> yaze::zelda3::Room::current_gfx16_ |
Definition at line 154 of file room.h.
Referenced by CopyRoomGraphicsToBuffer(), LoadAnimatedGraphics(), and LoadRoomGraphics().
|
private |
Definition at line 157 of file room.h.
Referenced by LoadHeader().
|
private |
Definition at line 159 of file room.h.
Referenced by LoadRoomFromROM().
|
private |
Definition at line 160 of file room.h.
Referenced by LoadObjects().
|
private |
Definition at line 162 of file room.h.
Referenced by CalculateRoomSize(), LoadChests(), LoadHeader(), LoadObjects(), LoadRoomFromROM(), LoadSprites(), and Room().
|
private |
Definition at line 163 of file room.h.
Referenced by LoadAnimatedGraphics().
|
private |
Definition at line 165 of file room.h.
Referenced by LoadHeader().
|
private |
Definition at line 166 of file room.h.
Referenced by LoadHeader(), and LoadObjects().
|
private |
Definition at line 168 of file room.h.
Referenced by LoadAnimatedGraphics(), and LoadRoomFromROM().
|
private |
Definition at line 169 of file room.h.
Referenced by LoadRoomFromROM().
|
private |
Definition at line 170 of file room.h.
Referenced by LoadRoomFromROM().
|
private |
Definition at line 171 of file room.h.
Referenced by LoadRoomFromROM().
|
private |
Definition at line 172 of file room.h.
Referenced by LoadObjects().
|
private |
Definition at line 173 of file room.h.
Referenced by LoadObjects().
|
private |
Definition at line 174 of file room.h.
Referenced by LoadRoomFromROM().
|
private |
Definition at line 176 of file room.h.
Referenced by CalculateRoomSize(), room_size(), and set_room_size().
|
private |
Definition at line 177 of file room.h.
Referenced by CalculateRoomSize(), and room_size_ptr().
|
private |
Definition at line 179 of file room.h.
Referenced by blocks(), CopyRoomGraphicsToBuffer(), LoadRoomGraphics(), and mutable_blocks().
|
private |
|
private |
|
private |
Definition at line 183 of file room.h.
Referenced by LoadObjects().
|
private |
Definition at line 184 of file room.h.
Referenced by LoadSprites().
|
private |
Definition at line 185 of file room.h.
Referenced by LoadObjects().
|
private |
Definition at line 186 of file room.h.
Referenced by LoadChests(), and LoadObjects().
|
private |
Definition at line 188 of file room.h.
Referenced by LoadRoomFromROM().
|
private |
Definition at line 189 of file room.h.
Referenced by LoadHeader().
|
private |
Definition at line 190 of file room.h.
Referenced by LoadHeader().
|
private |
Definition at line 191 of file room.h.
Referenced by LoadHeader(), and LoadRoomFromROM().
|
private |
Definition at line 192 of file room.h.
Referenced by LoadHeader(), and LoadRoomFromROM().
|
private |
Definition at line 194 of file room.h.
Referenced by LoadHeader().
|
private |
Definition at line 195 of file room.h.
Referenced by LoadRoomFromROM().
|
private |
Definition at line 196 of file room.h.
Referenced by LoadRoomFromROM().
|
private |
Definition at line 197 of file room.h.
Referenced by LoadRoomFromROM().
|
private |
Definition at line 198 of file room.h.
Referenced by LoadRoomFromROM().
|
private |
Definition at line 199 of file room.h.
Referenced by LoadRoomFromROM().