yaze 0.2.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::gfx::BackgroundBuffer Class Reference

#include <background_buffer.h>

Collaboration diagram for yaze::gfx::BackgroundBuffer:

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_
 

Detailed Description

Definition at line 13 of file background_buffer.h.

Constructor & Destructor Documentation

◆ BackgroundBuffer()

yaze::gfx::BackgroundBuffer::BackgroundBuffer ( int width = 512,
int height = 512 )

Definition at line 14 of file background_buffer.cc.

References buffer_, height_, and width_.

Member Function Documentation

◆ SetTileAt()

void yaze::gfx::BackgroundBuffer::SetTileAt ( int x,
int y,
uint16_t value )

Definition at line 21 of file background_buffer.cc.

References buffer_, height_, and width_.

Referenced by DrawFloor().

◆ GetTileAt()

uint16_t yaze::gfx::BackgroundBuffer::GetTileAt ( int x,
int y ) const

Definition at line 27 of file background_buffer.cc.

References buffer_, height_, and width_.

◆ ClearBuffer()

void yaze::gfx::BackgroundBuffer::ClearBuffer ( )

Definition at line 34 of file background_buffer.cc.

References buffer_.

◆ DrawTile()

void yaze::gfx::BackgroundBuffer::DrawTile ( const TileInfo & tile_info,
uint8_t * canvas,
const uint8_t * tiledata,
int indexoffset )

◆ DrawBackground()

void yaze::gfx::BackgroundBuffer::DrawBackground ( std::span< uint8_t > gfx16_data)

Definition at line 59 of file background_buffer.cc.

References bitmap_, buffer_, DrawTile(), yaze::gfx::GetTilesInfo(), height_, and width_.

Here is the call graph for this function:

◆ DrawFloor()

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 78 of file background_buffer.cc.

References yaze::gfx::TileInfo::id_, and SetTileAt().

Here is the call graph for this function:

◆ buffer()

auto yaze::gfx::BackgroundBuffer::buffer ( )
inline

Definition at line 32 of file background_buffer.h.

References buffer_.

◆ bitmap()

auto & yaze::gfx::BackgroundBuffer::bitmap ( )
inline

Definition at line 33 of file background_buffer.h.

References bitmap_.

Member Data Documentation

◆ buffer_

std::vector<uint16_t> yaze::gfx::BackgroundBuffer::buffer_
private

◆ bitmap_

gfx::Bitmap yaze::gfx::BackgroundBuffer::bitmap_
private

Definition at line 37 of file background_buffer.h.

Referenced by bitmap(), and DrawBackground().

◆ width_

int yaze::gfx::BackgroundBuffer::width_
private

Definition at line 38 of file background_buffer.h.

Referenced by BackgroundBuffer(), DrawBackground(), GetTileAt(), and SetTileAt().

◆ height_

int yaze::gfx::BackgroundBuffer::height_
private

Definition at line 39 of file background_buffer.h.

Referenced by BackgroundBuffer(), DrawBackground(), GetTileAt(), and SetTileAt().


The documentation for this class was generated from the following files: