yaze 0.2.0
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::app::core::Renderer Class Reference

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 RendererGetInstance ()
 

Private Member Functions

 Renderer ()=default
 
 Renderer (const Renderer &)=delete
 
Rendereroperator= (const Renderer &)=delete
 

Private Attributes

std::unique_ptr< SDL_Renderer, SDL_Deleterrenderer_
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ Renderer() [1/2]

yaze::app::core::Renderer::Renderer ( )
privatedefault

◆ Renderer() [2/2]

yaze::app::core::Renderer::Renderer ( const Renderer & )
privatedelete

Member Function Documentation

◆ GetInstance()

static Renderer & yaze::app::core::Renderer::GetInstance ( )
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().

◆ CreateRenderer()

absl::Status yaze::app::core::Renderer::CreateRenderer ( SDL_Window * window)
inline

Definition at line 32 of file renderer.h.

References renderer_.

Referenced by yaze::app::core::Controller::CreateRenderer().

◆ renderer()

auto yaze::app::core::Renderer::renderer ( ) -> SDL_Renderer *
inline

◆ RenderBitmap()

◆ UpdateBitmap()

◆ CreateAndRenderBitmap()

absl::Status yaze::app::core::Renderer::CreateAndRenderBitmap ( int width,
int height,
int depth,
const std::vector< uint8_t > & data,
gfx::Bitmap & bitmap,
gfx::SnesPalette & palette )
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.

Here is the call graph for this function:

◆ operator=()

Renderer & yaze::app::core::Renderer::operator= ( const Renderer & )
privatedelete

Member Data Documentation

◆ renderer_

std::unique_ptr<SDL_Renderer, SDL_Deleter> yaze::app::core::Renderer::renderer_
private

Definition at line 73 of file renderer.h.

Referenced by CreateRenderer(), RenderBitmap(), renderer(), and UpdateBitmap().


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