#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< zelda3::Sprite > | sprites_ |
std::vector< StaircaseRooms > | staircase_rooms_vec_ |
Background2 | bg2_ |
DungeonDestination | pits_ |
DungeonDestination | stair1_ |
DungeonDestination | stair2_ |
DungeonDestination | stair3_ |
DungeonDestination | stair4_ |
std::vector< ChestData > | chests_in_room_ |
std::vector< RoomObject > | tile_objects_ |
std::vector< int > | room_addresses_ |
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 20 of file room.cc.
References bg2_, blockset, yaze::app::zelda3::dungeon::DarkRoom, 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_.
void yaze::app::zelda3::dungeon::Room::LoadRoomFromROM | ( | ) |
Definition at line 124 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_, yaze::app::zelda3::dungeon::DungeonDestination::Target, and yaze::app::zelda3::dungeon::DungeonDestination::TargetLayer.
void yaze::app::zelda3::dungeon::Room::LoadRoomGraphics | ( | uchar | entrance_blockset = 0xFF | ) |
Definition at line 196 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 232 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 256 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 | ( | ) |
if (oid == 0xF99) { if (chests_in_room.size() > 0) { tilesObjects.back().options |= ObjectOption::Chest; chest_list.push_back( Chest(posX, posY, chests_in_room.front().itemIn, false)); chests_in_room.erase(chests_in_room.begin()); } } else if (oid == 0xFB1) { if (chests_in_room.size() > 0) { tilesObjects.back().options |= ObjectOption::Chest; chest_list.push_back( Chest(posX + 1, posY, chests_in_room.front().itemIn, true)); chests_in_room.erase(chests_in_room.begin()); } } } else { tilesObjects.push_back(object_door(static_cast<short>((b2 << 8) + b1), 0, 0, 0, static_cast<uint8_t>(layer))); }
Definition at line 276 of file room.cc.
References 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_, staircase_rooms_vec_, yaze::app::zelda3::dungeon::Stairs, yaze::app::zelda3::dungeon::stairsObjects, and tile_objects_.
void yaze::app::zelda3::dungeon::Room::LoadSprites | ( | ) |
TODO: Implement Sprite constructor for Dungeons (b3, (b2 & 0x1F), (b1 & 0x1F), ((b2 & 0xE0) >> 5) + ((b1 & 0x60) >> 2), (b1 & 0x80) >> 7);
Definition at line 415 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::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 467 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 148 of file room.h.
References background_bmps_.
|
inline |
Definition at line 149 of file room.h.
References background_bmps_.
|
inline |
Definition at line 150 of file room.h.
References background_bmps_.
|
inline |
|
inline |
Definition at line 152 of file room.h.
References room_size_pointer_.
|
inline |
Definition at line 153 of file room.h.
References room_size_.
|
inline |
uint8_t yaze::app::zelda3::dungeon::Room::blockset = 0 |
Definition at line 160 of file room.h.
Referenced by LoadHeader(), and LoadRoomGraphics().
uint8_t yaze::app::zelda3::dungeon::Room::spriteset = 0 |
Definition at line 161 of file room.h.
Referenced by LoadHeader(), and LoadRoomGraphics().
uint8_t yaze::app::zelda3::dungeon::Room::palette = 0 |
Definition at line 162 of file room.h.
Referenced by LoadHeader().
uint8_t yaze::app::zelda3::dungeon::Room::layout = 0 |
Definition at line 163 of file room.h.
Referenced by LoadObjects().
uint8_t yaze::app::zelda3::dungeon::Room::holewarp = 0 |
Definition at line 164 of file room.h.
Referenced by LoadHeader().
uint16_t yaze::app::zelda3::dungeon::Room::message_id_ = 0 |
Definition at line 168 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 173 of file room.h.
Referenced by CopyRoomGraphicsToBuffer(), LoadAnimatedGraphics(), and LoadRoomGraphics().
|
private |
Definition at line 176 of file room.h.
Referenced by LoadHeader().
|
private |
Definition at line 178 of file room.h.
Referenced by LoadRoomFromROM().
|
private |
Definition at line 179 of file room.h.
Referenced by LoadObjects().
|
private |
Definition at line 181 of file room.h.
Referenced by LoadChests(), LoadHeader(), LoadObjects(), LoadRoomFromROM(), and LoadSprites().
|
private |
Definition at line 182 of file room.h.
Referenced by LoadAnimatedGraphics().
|
private |
Definition at line 184 of file room.h.
Referenced by LoadRoomFromROM().
|
private |
Definition at line 185 of file room.h.
Referenced by LoadRoomFromROM().
|
private |
Definition at line 187 of file room.h.
Referenced by LoadHeader().
|
private |
Definition at line 188 of file room.h.
Referenced by LoadHeader(), and LoadObjects().
|
private |
Definition at line 190 of file room.h.
Referenced by LoadAnimatedGraphics(), and LoadRoomFromROM().
|
private |
Definition at line 191 of file room.h.
Referenced by LoadRoomFromROM().
|
private |
Definition at line 192 of file room.h.
Referenced by LoadRoomFromROM().
|
private |
Definition at line 193 of file room.h.
Referenced by LoadRoomFromROM().
|
private |
Definition at line 194 of file room.h.
Referenced by LoadObjects().
|
private |
Definition at line 195 of file room.h.
Referenced by LoadObjects().
|
private |
Definition at line 196 of file room.h.
Referenced by LoadRoomFromROM().
|
private |
Definition at line 198 of file room.h.
Referenced by LoadHeader(), room_size(), and set_room_size().
|
private |
Definition at line 199 of file room.h.
Referenced by LoadHeader(), and room_size_ptr().
|
private |
Definition at line 201 of file room.h.
Referenced by blocks(), CopyRoomGraphicsToBuffer(), LoadRoomGraphics(), and mutable_blocks().
|
private |
|
private |
|
private |
Definition at line 205 of file room.h.
Referenced by LoadSprites().
|
private |
Definition at line 206 of file room.h.
Referenced by LoadObjects().
|
private |
Definition at line 208 of file room.h.
Referenced by LoadHeader().
|
private |
Definition at line 209 of file room.h.
Referenced by LoadRoomFromROM().
|
private |
Definition at line 210 of file room.h.
Referenced by LoadRoomFromROM().
|
private |
Definition at line 211 of file room.h.
Referenced by LoadRoomFromROM().
|
private |
Definition at line 212 of file room.h.
Referenced by LoadRoomFromROM().
|
private |
Definition at line 213 of file room.h.
Referenced by LoadRoomFromROM().
|
private |
Definition at line 215 of file room.h.
Referenced by LoadChests().
|
private |
Definition at line 216 of file room.h.
Referenced by LoadObjects().
|
private |