#include <background_buffer.h>

Public Member Functions | |
| BackgroundBuffer (int width=512, int height=512) | |
| void | SetTileAt (int x, int y, uint16_t value) |
| uint16_t | GetTileAt (int x, int y) const |
| void | ClearBuffer () |
| void | DrawTile (const TileInfo &tile_info, uint8_t *canvas, const uint8_t *tiledata, int indexoffset) |
| void | DrawBackground (std::span< uint8_t > gfx16_data) |
| void | DrawFloor (const std::vector< uint8_t > &rom_data, int tile_address, int tile_address_floor, uint8_t floor_graphics) |
| void | EnsureBitmapInitialized () |
| void | ClearPriorityBuffer () |
| uint8_t | GetPriorityAt (int x, int y) const |
| void | SetPriorityAt (int x, int y, uint8_t priority) |
| const std::vector< uint8_t > & | priority_data () const |
| std::vector< uint8_t > & | mutable_priority_data () |
| auto | buffer () |
| auto & | bitmap () |
| const gfx::Bitmap & | bitmap () const |
Private Attributes | |
| std::vector< uint16_t > | buffer_ |
| std::vector< uint8_t > | priority_buffer_ |
| gfx::Bitmap | bitmap_ |
| int | width_ |
| int | height_ |
Definition at line 13 of file background_buffer.h.
| yaze::gfx::BackgroundBuffer::BackgroundBuffer | ( | int | width = 512, |
| int | height = 512 ) |
Definition at line 13 of file background_buffer.cc.
References buffer_, and priority_buffer_.
| void yaze::gfx::BackgroundBuffer::SetTileAt | ( | int | x, |
| int | y, | ||
| uint16_t | value ) |
Definition at line 25 of file background_buffer.cc.
References buffer_, height_, and width_.
Referenced by DrawFloor(), and yaze::zelda3::DrawRoutineUtils::WriteTile8().
| uint16_t yaze::gfx::BackgroundBuffer::GetTileAt | ( | int | x, |
| int | y ) const |
Definition at line 37 of file background_buffer.cc.
References buffer_, height_, and width_.
Referenced by yaze::zelda3::ObjectGeometry::MeasureRoutine().
| void yaze::gfx::BackgroundBuffer::ClearBuffer | ( | ) |
Definition at line 46 of file background_buffer.cc.
References buffer_, and ClearPriorityBuffer().
Referenced by yaze::editor::ObjectEditorPanel::OpenStaticObjectEditor(), and yaze::gui::DungeonObjectEmulatorPreview::TriggerStaticRender().

| void yaze::gfx::BackgroundBuffer::DrawTile | ( | const TileInfo & | tile_info, |
| uint8_t * | canvas, | ||
| const uint8_t * | tiledata, | ||
| int | indexoffset ) |
Definition at line 101 of file background_buffer.cc.
References height_, yaze::gfx::TileInfo::horizontal_mirror_, yaze::gfx::TileInfo::id_, yaze::gfx::TileInfo::over_, yaze::gfx::TileInfo::palette_, priority_buffer_, yaze::gfx::TileInfo::vertical_mirror_, and width_.
Referenced by DrawBackground().
| void yaze::gfx::BackgroundBuffer::DrawBackground | ( | std::span< uint8_t > | gfx16_data | ) |
Definition at line 178 of file background_buffer.cc.
References bitmap_, buffer_, yaze::gfx::Bitmap::Create(), DrawTile(), height_, yaze::gfx::Bitmap::is_active(), yaze::gfx::Bitmap::mutable_data(), priority_buffer_, yaze::gfx::Bitmap::surface(), yaze::gfx::Bitmap::width(), width_, and yaze::gfx::WordToTileInfo().
Referenced by yaze::zelda3::Room::RenderRoomGraphics().
| void yaze::gfx::BackgroundBuffer::DrawFloor | ( | const std::vector< uint8_t > & | rom_data, |
| int | tile_address, | ||
| int | tile_address_floor, | ||
| uint8_t | floor_graphics ) |
Definition at line 248 of file background_buffer.cc.
References bitmap_, yaze::gfx::Bitmap::Create(), yaze::gfx::Bitmap::height(), height_, yaze::gfx::Bitmap::is_active(), LOG_DEBUG, SetTileAt(), yaze::gfx::TileInfoToWord(), yaze::gfx::Bitmap::width(), and width_.
Referenced by yaze::zelda3::Room::RenderRoomGraphics().
| void yaze::gfx::BackgroundBuffer::EnsureBitmapInitialized | ( | ) |
Definition at line 70 of file background_buffer.cc.
References bitmap_, yaze::gfx::Bitmap::Create(), height_, yaze::gfx::Bitmap::is_active(), priority_buffer_, yaze::gfx::Bitmap::SetPalette(), yaze::gfx::Bitmap::surface(), yaze::gfx::Bitmap::width(), and width_.
Referenced by yaze::editor::ObjectEditorPanel::OpenStaticObjectEditor(), yaze::emu::render::EmulatorRenderService::RenderDungeonObjectStatic(), and yaze::zelda3::Room::RenderObjectsToBackground().
| void yaze::gfx::BackgroundBuffer::ClearPriorityBuffer | ( | ) |
Definition at line 51 of file background_buffer.cc.
References priority_buffer_.
Referenced by ClearBuffer(), and yaze::zelda3::Room::RenderObjectsToBackground().
| uint8_t yaze::gfx::BackgroundBuffer::GetPriorityAt | ( | int | x, |
| int | y ) const |
Definition at line 56 of file background_buffer.cc.
References height_, priority_buffer_, and width_.
| void yaze::gfx::BackgroundBuffer::SetPriorityAt | ( | int | x, |
| int | y, | ||
| uint8_t | priority ) |
Definition at line 63 of file background_buffer.cc.
References height_, priority_buffer_, and width_.
|
inline |
Definition at line 40 of file background_buffer.h.
References priority_buffer_.
|
inline |
Definition at line 41 of file background_buffer.h.
References priority_buffer_.
Referenced by yaze::zelda3::ObjectDrawer::DrawDoor(), and yaze::zelda3::ObjectDrawer::WriteTile8().
|
inline |
Definition at line 44 of file background_buffer.h.
References buffer_.
|
inline |
Definition at line 45 of file background_buffer.h.
References bitmap_.
Referenced by yaze::zelda3::RoomLayerManager::CompositeToOutput(), yaze::zelda3::ObjectDrawer::DrawDoor(), yaze::zelda3::ObjectDrawer::DrawObjectList(), yaze::editor::DungeonObjectSelector::DrawObjectPreview(), yaze::zelda3::ObjectDrawer::DrawPotItem(), yaze::editor::ObjectEditorPanel::DrawStaticObjectEditor(), yaze::editor::DungeonObjectSelector::GetOrCreatePreview(), yaze::zelda3::ObjectDrawer::MarkBG1Transparent(), yaze::editor::ObjectEditorPanel::OpenStaticObjectEditor(), yaze::emu::render::EmulatorRenderService::RenderDungeonObjectStatic(), yaze::zelda3::Room::RenderObjectsToBackground(), yaze::zelda3::Room::RenderRoomGraphics(), yaze::gui::DungeonObjectEmulatorPreview::TriggerStaticRender(), and yaze::zelda3::ObjectDrawer::WriteTile8().
|
inline |
Definition at line 46 of file background_buffer.h.
References bitmap_.
|
private |
Definition at line 49 of file background_buffer.h.
Referenced by BackgroundBuffer(), buffer(), ClearBuffer(), DrawBackground(), GetTileAt(), and SetTileAt().
|
private |
Definition at line 50 of file background_buffer.h.
Referenced by BackgroundBuffer(), ClearPriorityBuffer(), DrawBackground(), DrawTile(), EnsureBitmapInitialized(), GetPriorityAt(), mutable_priority_data(), priority_data(), and SetPriorityAt().
|
private |
Definition at line 51 of file background_buffer.h.
Referenced by bitmap(), bitmap(), DrawBackground(), DrawFloor(), and EnsureBitmapInitialized().
|
private |
Definition at line 52 of file background_buffer.h.
Referenced by DrawBackground(), DrawFloor(), DrawTile(), EnsureBitmapInitialized(), GetPriorityAt(), GetTileAt(), SetPriorityAt(), and SetTileAt().
|
private |
Definition at line 53 of file background_buffer.h.
Referenced by DrawBackground(), DrawFloor(), DrawTile(), EnsureBitmapInitialized(), GetPriorityAt(), GetTileAt(), SetPriorityAt(), and SetTileAt().