#include <room.h>
Public Member Functions | |
Room ()=default | |
Room (int room_id) | |
~Room ()=default | |
void | LoadHeader () |
void | LoadRoomFromROM () |
void | LoadRoomGraphics (uchar 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) |
RoomObject | AddObject (short oid, uint8_t x, uint8_t y, uint8_t size, uint8_t layer) |
Public Member Functions inherited from yaze::app::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_ |
uchar | tag1_ |
uchar | tag2_ |
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< uchar, 16 > | chest_list_ |
std::array< gfx::Bitmap, 3 > | background_bmps_ |
std::vector< RoomObject > | tile_objects_ |
std::vector< zelda3::Sprite > | sprites_ |
std::vector< z3_staircase > | z3_staircases_ |
std::vector< z3_chest_data > | chests_in_room_ |
z3_dungeon_background2 | bg2_ |
z3_dungeon_destination | pits_ |
z3_dungeon_destination | stair1_ |
z3_dungeon_destination | stair2_ |
z3_dungeon_destination | stair3_ |
z3_dungeon_destination | stair4_ |
Additional Inherited Members | |
Static Public Attributes inherited from yaze::app::SharedRom | |
static std::shared_ptr< Rom > | shared_rom_ = nullptr |
|
default |
|
default |
void yaze::app::zelda3::dungeon::Room::LoadHeader | ( | ) |
Definition at line 23 of file room.cc.
References bg2_, blockset, holewarp, is_light_, yaze::app::zelda3::dungeon::kRoomHeaderPointer, yaze::app::zelda3::dungeon::kRoomHeaderPointerBank, palette, yaze::app::SharedRom::rom(), room_id_, room_size(), room_size_, room_size_pointer_, yaze::app::core::SnesToPc(), spriteset, staircase_plane_, and staircase_rooms_.
Referenced by yaze::test::zelda3::TEST_F().
void yaze::app::zelda3::dungeon::Room::LoadRoomFromROM | ( | ) |
Definition at line 127 of file room.cc.
References background_tileset_, is_dark_, yaze::app::zelda3::dungeon::kRoomHeaderPointer, yaze::app::zelda3::dungeon::kRoomHeaderPointerBank, layer2_behavior_, layer2_mode_, message_id_, yaze::app::zelda3::dungeon::messages_id_dungeon, palette_, pits_, yaze::app::SharedRom::rom(), room_id_, yaze::app::zelda3::dungeon::room_object_pointer, yaze::app::core::SnesToPc(), sprite_tileset_, stair1_, stair2_, stair3_, stair4_, tag1_, tag2_, z3_dungeon_destination::target, and z3_dungeon_destination::target_layer.
Referenced by yaze::test::zelda3::TEST_F().
void yaze::app::zelda3::dungeon::Room::LoadRoomGraphics | ( | uchar | entrance_blockset = 0xFF | ) |
Definition at line 199 of file room.cc.
References blocks_, blockset, current_gfx16_, yaze::app::SharedRom::rom(), and spriteset.
void yaze::app::zelda3::dungeon::Room::CopyRoomGraphicsToBuffer | ( | ) |
Definition at line 235 of file room.cc.
References blocks_, current_gfx16_, yaze::app::zelda3::dungeon::kGfxBufferRoomOffset, yaze::app::zelda3::dungeon::kGfxBufferRoomSpriteLastLineOffset, LoadAnimatedGraphics(), and yaze::app::SharedRom::rom().
void yaze::app::zelda3::dungeon::Room::LoadAnimatedGraphics | ( | ) |
Definition at line 259 of file room.cc.
References animated_frame_, background_tileset_, current_gfx16_, yaze::app::SharedRom::rom(), and yaze::app::core::SnesToPc().
Referenced by CopyRoomGraphicsToBuffer().
void yaze::app::zelda3::dungeon::Room::LoadObjects | ( | ) |
Definition at line 279 of file room.cc.
References yaze::app::zelda3::dungeon::Chest, chests_in_room_, floor1_graphics_, floor2_graphics_, is_floor_, layout, LoadChests(), yaze::app::SharedRom::rom(), room_id_, yaze::app::zelda3::dungeon::room_object_pointer, yaze::app::core::SnesToPc(), staircase_rooms_, yaze::app::zelda3::dungeon::Stairs, yaze::app::zelda3::dungeon::stairsObjects, tile_objects_, and z3_staircases_.
void yaze::app::zelda3::dungeon::Room::LoadSprites | ( | ) |
Definition at line 418 of file room.cc.
References yaze::app::zelda3::Sprite::id(), yaze::app::zelda3::Sprite::layer(), yaze::app::SharedRom::rom(), room_id_, yaze::app::zelda3::dungeon::rooms_sprite_pointer, yaze::app::zelda3::Sprite::set_key_drop(), yaze::app::core::SnesToPc(), sprites_, yaze::app::zelda3::Sprite::subtype(), yaze::app::zelda3::Sprite::x(), and yaze::app::zelda3::Sprite::y().
void yaze::app::zelda3::dungeon::Room::LoadChests | ( | ) |
Definition at line 465 of file room.cc.
References yaze::app::zelda3::dungeon::chests_data_pointer1, chests_in_room_, yaze::app::zelda3::dungeon::chests_length_pointer, yaze::app::SharedRom::rom(), room_id_, and yaze::app::core::SnesToPc().
Referenced by LoadObjects().
|
inline |
|
inline |
|
inline |
Definition at line 109 of file room.h.
References background_bmps_.
|
inline |
Definition at line 110 of file room.h.
References background_bmps_.
|
inline |
Definition at line 111 of file room.h.
References background_bmps_.
|
inline |
|
inline |
Definition at line 113 of file room.h.
References room_size_pointer_.
|
inline |
Definition at line 114 of file room.h.
References room_size_.
|
inline |
uint8_t yaze::app::zelda3::dungeon::Room::blockset = 0 |
Definition at line 121 of file room.h.
Referenced by LoadHeader(), and LoadRoomGraphics().
uint8_t yaze::app::zelda3::dungeon::Room::spriteset = 0 |
Definition at line 122 of file room.h.
Referenced by LoadHeader(), and LoadRoomGraphics().
uint8_t yaze::app::zelda3::dungeon::Room::palette = 0 |
Definition at line 123 of file room.h.
Referenced by LoadHeader().
uint8_t yaze::app::zelda3::dungeon::Room::layout = 0 |
Definition at line 124 of file room.h.
Referenced by LoadObjects().
uint8_t yaze::app::zelda3::dungeon::Room::holewarp = 0 |
Definition at line 125 of file room.h.
Referenced by LoadHeader().
uint16_t yaze::app::zelda3::dungeon::Room::message_id_ = 0 |
Definition at line 129 of file room.h.
Referenced by LoadRoomFromROM().
gfx::Bitmap yaze::app::zelda3::dungeon::Room::current_graphics_ |
std::vector<uint8_t> yaze::app::zelda3::dungeon::Room::bg1_buffer_ |
std::vector<uint8_t> yaze::app::zelda3::dungeon::Room::bg2_buffer_ |
std::vector<uint8_t> yaze::app::zelda3::dungeon::Room::current_gfx16_ |
Definition at line 134 of file room.h.
Referenced by CopyRoomGraphicsToBuffer(), LoadAnimatedGraphics(), and LoadRoomGraphics().
|
private |
Definition at line 137 of file room.h.
Referenced by LoadHeader().
|
private |
Definition at line 139 of file room.h.
Referenced by LoadRoomFromROM().
|
private |
Definition at line 140 of file room.h.
Referenced by LoadObjects().
|
private |
Definition at line 142 of file room.h.
Referenced by LoadChests(), LoadHeader(), LoadObjects(), LoadRoomFromROM(), and LoadSprites().
|
private |
Definition at line 143 of file room.h.
Referenced by LoadAnimatedGraphics().
|
private |
Definition at line 145 of file room.h.
Referenced by LoadRoomFromROM().
|
private |
Definition at line 146 of file room.h.
Referenced by LoadRoomFromROM().
|
private |
Definition at line 148 of file room.h.
Referenced by LoadHeader().
|
private |
Definition at line 149 of file room.h.
Referenced by LoadHeader(), and LoadObjects().
|
private |
Definition at line 151 of file room.h.
Referenced by LoadAnimatedGraphics(), and LoadRoomFromROM().
|
private |
Definition at line 152 of file room.h.
Referenced by LoadRoomFromROM().
|
private |
Definition at line 153 of file room.h.
Referenced by LoadRoomFromROM().
|
private |
Definition at line 154 of file room.h.
Referenced by LoadRoomFromROM().
|
private |
Definition at line 155 of file room.h.
Referenced by LoadObjects().
|
private |
Definition at line 156 of file room.h.
Referenced by LoadObjects().
|
private |
Definition at line 157 of file room.h.
Referenced by LoadRoomFromROM().
|
private |
Definition at line 159 of file room.h.
Referenced by LoadHeader(), room_size(), and set_room_size().
|
private |
Definition at line 160 of file room.h.
Referenced by LoadHeader(), and room_size_ptr().
|
private |
Definition at line 162 of file room.h.
Referenced by blocks(), CopyRoomGraphicsToBuffer(), LoadRoomGraphics(), and mutable_blocks().
|
private |
|
private |
|
private |
Definition at line 166 of file room.h.
Referenced by LoadObjects().
|
private |
Definition at line 167 of file room.h.
Referenced by LoadSprites().
|
private |
Definition at line 168 of file room.h.
Referenced by LoadObjects().
|
private |
Definition at line 169 of file room.h.
Referenced by LoadChests(), and LoadObjects().
|
private |
Definition at line 171 of file room.h.
Referenced by LoadHeader().
|
private |
Definition at line 172 of file room.h.
Referenced by LoadRoomFromROM().
|
private |
Definition at line 173 of file room.h.
Referenced by LoadRoomFromROM().
|
private |
Definition at line 174 of file room.h.
Referenced by LoadRoomFromROM().
|
private |
Definition at line 175 of file room.h.
Referenced by LoadRoomFromROM().
|
private |
Definition at line 176 of file room.h.
Referenced by LoadRoomFromROM().