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 24 of file renderer.h.
|
privatedefault |
Referenced by GetInstance(), operator=(), and Renderer().
|
privatedelete |
|
inlinestatic |
Definition at line 26 of file renderer.h.
References Renderer().
Referenced by yaze::core::Controller::CreateGuiContext(), yaze::core::Controller::CreateRenderer(), yaze::core::Controller::DoRender(), yaze::editor::Tile16Editor::InitBlockset(), yaze::zelda3::LoadDungeonMapGfxFromBinary(), yaze::core::Controller::renderer(), yaze::emu::Emulator::Run(), and yaze::test::integration::RunIntegrationTest().
|
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_.
Referenced by yaze::core::Controller::renderer().
|
inline |
Used to render a bitmap to the screen.
Definition at line 48 of file renderer.h.
References yaze::gfx::Bitmap::CreateTexture(), and renderer_.
Referenced by yaze::zelda3::Inventory::BuildTileset(), yaze::zelda3::Inventory::Create(), CreateAndRenderBitmap(), yaze::editor::GraphicsEditor::DecompressImportData(), yaze::editor::GraphicsEditor::DecompressSuperDonkey(), yaze::editor::GraphicsEditor::DrawCgxImport(), yaze::editor::ScreenEditor::DrawDungeonMapsEditor(), yaze::editor::ScreenEditor::DrawDungeonMapsRoomGfx(), yaze::editor::ScreenEditor::DrawDungeonMapsTabs(), yaze::editor::DungeonEditor::DrawObjectRenderer(), yaze::editor::GraphicsEditor::DrawScrImport(), yaze::editor::Tile16Editor::InitBlockset(), yaze::editor::ScreenEditor::LoadBinaryGfx(), yaze::zelda3::LoadDungeonMapGfxFromBinary(), yaze::editor::ScreenEditor::LoadDungeonMapTile16(), yaze::editor::OverworldEditor::LoadGraphics(), yaze::LoadLinkGraphics(), yaze::editor::OverworldEditor::LoadSpriteGraphics(), yaze::editor::Tile16Editor::LoadTile8(), yaze::editor::Tile16Editor::SetCurrentTile(), and yaze::editor::Tile16Editor::UpdateBlockset().
|
inline |
Used to update a bitmap on the screen.
Definition at line 55 of file renderer.h.
References renderer_, and yaze::gfx::Bitmap::UpdateTexture().
Referenced by yaze::editor::OverworldEditor::CheckForCurrentMap(), yaze::gui::Canvas::DrawContextMenu(), yaze::editor::MessageEditor::DrawCurrentMessage(), yaze::editor::GraphicsEditor::DrawGfxEditToolset(), yaze::editor::Tile16Editor::DrawTileEditControls(), yaze::editor::DungeonEditor::RefreshGraphics(), yaze::editor::OverworldEditor::RefreshOverworldMap(), yaze::editor::OverworldEditor::RefreshTile16Blockset(), yaze::editor::GraphicsEditor::UpdateGfxTabView(), yaze::editor::GraphicsEditor::UpdatePaletteColumn(), and yaze::editor::Tile16Editor::UpdateTile16Edit().
|
inline |
Definition at line 59 of file renderer.h.
References yaze::gfx::Bitmap::ApplyPalette(), yaze::gfx::Bitmap::Create(), RenderBitmap(), and RETURN_IF_ERROR.
|
private |
Definition at line 72 of file renderer.h.
Referenced by CreateRenderer(), RenderBitmap(), renderer(), and UpdateBitmap().