The Renderer class represents the renderer for the Yaze application. More...
#include <renderer.h>
Public Member Functions | |
absl::Status | CreateRenderer (SDL_Window *window) |
auto | renderer () -> SDL_Renderer * |
void | RenderBitmap (gfx::Bitmap *bitmap) |
void | UpdateBitmap (gfx::Bitmap *bitmap) |
void | CreateAndRenderBitmap (int width, int height, int depth, const std::vector< uint8_t > &data, gfx::Bitmap &bitmap, gfx::SnesPalette &palette) |
void | Clear () |
void | Present () |
Static Public Member Functions | |
static Renderer & | Get () |
Private Member Functions | |
Renderer ()=default | |
Renderer (const Renderer &)=delete | |
Renderer & | operator= (const Renderer &)=delete |
Private Attributes | |
std::unique_ptr< SDL_Renderer, SDL_Deleter > | renderer_ |
The Renderer class represents the renderer for the Yaze application.
This class is a singleton that provides functionality for creating and rendering bitmaps to the screen. It also includes methods for updating bitmaps on the screen.
Definition at line 24 of file renderer.h.
|
privatedefault |
Referenced by Get(), operator=(), and Renderer().
|
privatedelete |
|
inlinestatic |
Definition at line 26 of file renderer.h.
References Renderer().
Referenced by yaze::editor::Tile16Editor::CopyTile16ToClipboard(), yaze::core::Controller::CreateGuiContext(), yaze::core::Controller::CreateRenderer(), yaze::gfx::CreateTilemap(), yaze::core::Controller::DoRender(), yaze::core::Sdl2Backend::init(), yaze::editor::Tile16Editor::Initialize(), yaze::zelda3::LoadDungeonMapGfxFromBinary(), yaze::zelda3::LoadDungeonMapTile16(), yaze::editor::Tile16Editor::LoadTile16FromScratchSpace(), yaze::editor::Tile16Editor::PasteTile16FromClipboard(), yaze::core::Sdl2Backend::render(), yaze::zelda3::Room::RenderRoomGraphics(), yaze::gfx::RenderTile(), yaze::gfx::RenderTile16(), yaze::emu::Emulator::Run(), yaze::test::RunIntegrationTest(), yaze::editor::Tile16Editor::SaveTile16ToScratchSpace(), yaze::core::Sdl2Backend::shutdown(), yaze::gfx::UpdateTile16(), and yaze::gfx::UpdateTilemap().
|
inline |
Definition at line 31 of file renderer.h.
References renderer_.
Referenced by yaze::core::Controller::CreateRenderer().
|
inline |
Definition at line 43 of file renderer.h.
References renderer_.
|
inline |
Definition at line 45 of file renderer.h.
References yaze::gfx::Bitmap::CreateTexture(), and renderer_.
Referenced by yaze::zelda3::Inventory::BuildTileset(), yaze::editor::Tile16Editor::CopyTile16ToClipboard(), yaze::zelda3::Inventory::Create(), CreateAndRenderBitmap(), yaze::gfx::CreateTilemap(), yaze::editor::GraphicsEditor::DecompressImportData(), yaze::editor::GraphicsEditor::DecompressSuperDonkey(), yaze::editor::GraphicsEditor::DrawCgxImport(), yaze::editor::GraphicsEditor::DrawScrImport(), yaze::gui::Canvas::DrawTilemapPainter(), yaze::editor::Tile16Editor::Initialize(), yaze::editor::ScreenEditor::Load(), yaze::editor::ScreenEditor::LoadBinaryGfx(), yaze::zelda3::LoadDungeonMapGfxFromBinary(), yaze::zelda3::LoadDungeonMapTile16(), yaze::LoadLinkGraphics(), yaze::editor::Tile16Editor::LoadTile16FromScratchSpace(), yaze::editor::Tile16Editor::LoadTile8(), yaze::editor::Tile16Editor::PasteTile16FromClipboard(), yaze::gfx::RenderTile(), yaze::gfx::RenderTile16(), and yaze::editor::Tile16Editor::SaveTile16ToScratchSpace().
|
inline |
Definition at line 49 of file renderer.h.
References renderer_, and yaze::gfx::Bitmap::UpdateTexture().
Referenced by yaze::gui::Canvas::DrawContextMenu(), yaze::editor::GraphicsEditor::DrawGfxEditToolset(), yaze::editor::MessageEditor::DrawMessagePreview(), yaze::editor::DungeonEditor::RefreshGraphics(), yaze::zelda3::Room::RenderRoomGraphics(), yaze::gfx::RenderTile(), yaze::editor::Tile16Editor::SetCurrentTile(), yaze::editor::Tile16Editor::UpdateBlockset(), yaze::editor::GraphicsEditor::UpdateGfxTabView(), yaze::editor::GraphicsEditor::UpdatePaletteColumn(), yaze::gfx::UpdateTile16(), yaze::editor::Tile16Editor::UpdateTile16Edit(), and yaze::gfx::UpdateTilemap().
|
inline |
Definition at line 53 of file renderer.h.
References yaze::gfx::Bitmap::Create(), RenderBitmap(), and yaze::gfx::Bitmap::SetPalette().
Referenced by yaze::editor::MessageEditor::DrawMessagePreview(), yaze::editor::MessageEditor::Initialize(), yaze::zelda3::Room::RenderRoomGraphics(), and yaze::editor::Tile16Editor::UpdateTransferTileCanvas().
|
inline |
Definition at line 61 of file renderer.h.
References renderer_.
|
inline |
Definition at line 66 of file renderer.h.
References renderer_.
|
private |
Definition at line 71 of file renderer.h.
Referenced by Clear(), CreateRenderer(), Present(), RenderBitmap(), renderer(), and UpdateBitmap().