#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) |
| auto | buffer () |
| auto & | bitmap () |
Private Attributes | |
| std::vector< uint16_t > | 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_.
| void yaze::gfx::BackgroundBuffer::SetTileAt | ( | int | x, |
| int | y, | ||
| uint16_t | value | ||
| ) |
Definition at line 20 of file background_buffer.cc.
References buffer_, height_, and width_.
Referenced by DrawFloor(), and yaze::zelda3::Room::LoadLayoutTilesToBuffer().
| uint16_t yaze::gfx::BackgroundBuffer::GetTileAt | ( | int | x, |
| int | y | ||
| ) | const |
Definition at line 28 of file background_buffer.cc.
| void yaze::gfx::BackgroundBuffer::ClearBuffer | ( | ) |
Definition at line 35 of file background_buffer.cc.
References buffer_.
| void yaze::gfx::BackgroundBuffer::DrawTile | ( | const TileInfo & | tile_info, |
| uint8_t * | canvas, | ||
| const uint8_t * | tiledata, | ||
| int | indexoffset | ||
| ) |
Definition at line 37 of file background_buffer.cc.
References yaze::gfx::TileInfo::horizontal_mirror_, yaze::gfx::TileInfo::id_, LOG_DEBUG, yaze::gfx::TileInfo::palette_, yaze::gfx::TileInfo::vertical_mirror_, and width_.
Referenced by DrawBackground().
| void yaze::gfx::BackgroundBuffer::DrawBackground | ( | std::span< uint8_t > | gfx16_data | ) |
Definition at line 96 of file background_buffer.cc.
References bitmap_, buffer_, yaze::gfx::Bitmap::Create(), DrawTile(), height_, yaze::gfx::Bitmap::is_active(), yaze::gfx::Bitmap::mutable_data(), 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 154 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().
|
inline |
Definition at line 32 of file background_buffer.h.
References buffer_.
|
inline |
Definition at line 33 of file background_buffer.h.
References bitmap_.
Referenced by yaze::zelda3::ObjectDrawer::DrawObjectList(), yaze::zelda3::Room::RenderObjectsToBackground(), yaze::zelda3::Room::RenderRoomGraphics(), and yaze::zelda3::ObjectDrawer::WriteTile8().
|
private |
Definition at line 36 of file background_buffer.h.
Referenced by BackgroundBuffer(), buffer(), ClearBuffer(), DrawBackground(), GetTileAt(), and SetTileAt().
|
private |
Definition at line 37 of file background_buffer.h.
Referenced by bitmap(), DrawBackground(), and DrawFloor().
|
private |
Definition at line 38 of file background_buffer.h.
Referenced by DrawBackground(), DrawFloor(), DrawTile(), GetTileAt(), and SetTileAt().
|
private |
Definition at line 39 of file background_buffer.h.
Referenced by DrawBackground(), DrawFloor(), GetTileAt(), and SetTileAt().