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) |
Used to render a bitmap to the screen. | |
void | UpdateBitmap (gfx::Bitmap *bitmap) |
Used to update a bitmap on the screen. | |
absl::Status | CreateAndRenderBitmap (int width, int height, int depth, const std::vector< uint8_t > &data, gfx::Bitmap &bitmap, gfx::SnesPalette &palette) |
Static Public Member Functions | |
static Renderer & | GetInstance () |
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 25 of file renderer.h.
|
privatedefault |
|
privatedelete |
|
inlinestatic |
Definition at line 27 of file renderer.h.
Referenced by yaze::app::zelda3::screen::Inventory::BuildTileset(), yaze::app::editor::OverworldEditor::CheckForCurrentMap(), yaze::app::zelda3::screen::Inventory::Create(), yaze::app::core::Controller::CreateGuiContext(), yaze::app::core::Controller::CreateRenderer(), yaze::app::editor::GraphicsEditor::DecompressImportData(), yaze::app::editor::GraphicsEditor::DecompressSuperDonkey(), yaze::app::core::Controller::DoRender(), yaze::app::editor::OverworldEditor::DrawAreaGraphics(), yaze::app::editor::GraphicsEditor::DrawCgxImport(), yaze::app::gui::Canvas::DrawContextMenu(), yaze::app::editor::MessageEditor::DrawCurrentMessage(), yaze::app::editor::ScreenEditor::DrawDungeonMapsEditor(), yaze::app::editor::ScreenEditor::DrawDungeonMapsTabs(), yaze::app::editor::GraphicsEditor::DrawGfxEditToolset(), yaze::app::editor::DungeonEditor::DrawObjectRenderer(), yaze::app::editor::GraphicsEditor::DrawScrImport(), yaze::app::editor::Tile16Editor::DrawTileEditControls(), yaze::app::editor::MessageEditor::Initialize(), yaze::app::Rom::LoadAllGraphicsData(), yaze::app::editor::ScreenEditor::LoadBinaryGfx(), yaze::app::editor::ScreenEditor::LoadDungeonMapTile16(), yaze::app::editor::OverworldEditor::LoadGraphics(), yaze::app::Rom::LoadLinkGraphics(), yaze::app::editor::OverworldEditor::LoadSpriteGraphics(), yaze::app::editor::Tile16Editor::LoadTile8(), yaze::app::editor::DungeonEditor::RefreshGraphics(), yaze::app::editor::OverworldEditor::RefreshOverworldMap(), yaze::app::editor::OverworldEditor::RefreshTile16Blockset(), yaze::app::core::Controller::renderer(), yaze::app::emu::Emulator::Run(), yaze::test::integration::RunIntegrationTest(), yaze::app::editor::Tile16Editor::SetCurrentTile(), yaze::app::editor::Tile16Editor::UpdateBlockset(), yaze::app::editor::GraphicsEditor::UpdateGfxTabView(), yaze::app::editor::GraphicsEditor::UpdatePaletteColumn(), yaze::app::editor::Tile16Editor::UpdateTile16Edit(), and yaze::app::editor::Tile16Editor::UpdateTransferTileCanvas().
|
inline |
Definition at line 32 of file renderer.h.
References renderer_.
Referenced by yaze::app::core::Controller::CreateRenderer().
|
inline |
Definition at line 44 of file renderer.h.
References renderer_.
Referenced by yaze::app::core::Controller::CreateGuiContext(), yaze::app::core::Controller::renderer(), and yaze::test::integration::RunIntegrationTest().
|
inline |
Used to render a bitmap to the screen.
Definition at line 49 of file renderer.h.
References yaze::app::gfx::Bitmap::CreateTexture(), and renderer_.
Referenced by yaze::app::zelda3::screen::Inventory::BuildTileset(), yaze::app::zelda3::screen::Inventory::Create(), CreateAndRenderBitmap(), yaze::app::editor::GraphicsEditor::DecompressImportData(), yaze::app::editor::GraphicsEditor::DecompressSuperDonkey(), yaze::app::editor::GraphicsEditor::DrawCgxImport(), yaze::app::editor::ScreenEditor::DrawDungeonMapsEditor(), yaze::app::editor::ScreenEditor::DrawDungeonMapsTabs(), yaze::app::editor::DungeonEditor::DrawObjectRenderer(), yaze::app::editor::GraphicsEditor::DrawScrImport(), yaze::app::editor::ScreenEditor::LoadBinaryGfx(), yaze::app::editor::ScreenEditor::LoadDungeonMapTile16(), yaze::app::Rom::LoadLinkGraphics(), yaze::app::editor::OverworldEditor::LoadSpriteGraphics(), yaze::app::editor::Tile16Editor::LoadTile8(), yaze::app::editor::Tile16Editor::SetCurrentTile(), and yaze::app::editor::Tile16Editor::UpdateBlockset().
|
inline |
Used to update a bitmap on the screen.
Definition at line 56 of file renderer.h.
References renderer_, and yaze::app::gfx::Bitmap::UpdateTexture().
Referenced by yaze::app::editor::OverworldEditor::CheckForCurrentMap(), yaze::app::gui::Canvas::DrawContextMenu(), yaze::app::editor::MessageEditor::DrawCurrentMessage(), yaze::app::editor::GraphicsEditor::DrawGfxEditToolset(), yaze::app::editor::Tile16Editor::DrawTileEditControls(), yaze::app::editor::DungeonEditor::RefreshGraphics(), yaze::app::editor::OverworldEditor::RefreshOverworldMap(), yaze::app::editor::OverworldEditor::RefreshTile16Blockset(), yaze::app::editor::GraphicsEditor::UpdateGfxTabView(), yaze::app::editor::GraphicsEditor::UpdatePaletteColumn(), and yaze::app::editor::Tile16Editor::UpdateTile16Edit().
|
inline |
Definition at line 60 of file renderer.h.
References yaze::app::gfx::Bitmap::ApplyPalette(), yaze::app::gfx::Bitmap::Create(), RenderBitmap(), and RETURN_IF_ERROR.
|
private |
Definition at line 73 of file renderer.h.
Referenced by CreateRenderer(), RenderBitmap(), renderer(), and UpdateBitmap().