#include <arena.h>
Public Member Functions | |
~Arena () | |
SDL_Texture * | AllocateTexture (SDL_Renderer *renderer, int width, int height) |
void | FreeTexture (SDL_Texture *texture) |
void | UpdateTexture (SDL_Texture *texture, SDL_Surface *surface) |
SDL_Surface * | AllocateSurface (int width, int height, int depth, int format) |
void | FreeSurface (SDL_Surface *surface) |
std::array< gfx::Bitmap, 223 > & | gfx_sheets () |
auto | gfx_sheet (int i) |
auto | mutable_gfx_sheet (int i) |
auto | mutable_gfx_sheets () |
auto & | bg1 () |
auto & | bg2 () |
Static Public Member Functions | |
static Arena & | Get () |
Private Member Functions | |
Arena () | |
Private Attributes | |
BackgroundBuffer | bg1_ |
BackgroundBuffer | bg2_ |
std::array< uint16_t, kTotalTiles > | layer1_buffer_ |
std::array< uint16_t, kTotalTiles > | layer2_buffer_ |
std::array< gfx::Bitmap, 223 > | gfx_sheets_ |
std::unordered_map< SDL_Texture *, std::unique_ptr< SDL_Texture, core::SDL_Texture_Deleter > > | textures_ |
std::unordered_map< SDL_Surface *, std::unique_ptr< SDL_Surface, core::SDL_Surface_Deleter > > | surfaces_ |
Static Private Attributes | |
static constexpr int | kTilesPerRow = 64 |
static constexpr int | kTilesPerColumn = 64 |
static constexpr int | kTotalTiles = kTilesPerRow * kTilesPerColumn |
yaze::gfx::Arena::~Arena | ( | ) |
|
private |
Definition at line 15 of file arena.cc.
References layer1_buffer_, and layer2_buffer_.
Referenced by Get().
|
static |
Definition at line 10 of file arena.cc.
References Arena().
Referenced by yaze::gfx::Bitmap::Create(), yaze::gfx::Bitmap::CreateTexture(), yaze::editor::GfxGroupEditor::DrawBlocksetViewer(), yaze::editor::SpriteEditor::DrawCurrentSheets(), yaze::editor::DungeonEditor::DrawDungeonCanvas(), yaze::editor::GraphicsEditor::DrawGfxEditToolset(), yaze::editor::DungeonEditor::DrawRoomGraphics(), yaze::editor::GfxGroupEditor::DrawRoomsetViewer(), yaze::editor::GfxGroupEditor::DrawSpritesetViewer(), yaze::editor::OverworldEditor::DrawTile8Selector(), yaze::editor::ScreenEditor::Load(), yaze::editor::EditorManager::LoadAssets(), yaze::gfx::Bitmap::Reformat(), yaze::editor::DungeonEditor::RefreshGraphics(), yaze::zelda3::Room::RenderRoomGraphics(), yaze::editor::EditorManager::SaveRom(), yaze::editor::GraphicsEditor::Update(), yaze::editor::GraphicsEditor::UpdateGfxSheetList(), yaze::editor::GraphicsEditor::UpdateGfxTabView(), yaze::zelda3::DungeonObjectRenderer::UpdateObjectBitmap(), yaze::editor::GraphicsEditor::UpdatePaletteColumn(), yaze::gfx::Bitmap::UpdateTexture(), and yaze::gfx::Bitmap::UpdateTextureData().
SDL_Texture * yaze::gfx::Arena::AllocateTexture | ( | SDL_Renderer * | renderer, |
int | width, | ||
int | height ) |
Definition at line 25 of file arena.cc.
References textures_.
Referenced by yaze::gfx::Bitmap::CreateTexture().
void yaze::gfx::Arena::FreeTexture | ( | SDL_Texture * | texture | ) |
void yaze::gfx::Arena::UpdateTexture | ( | SDL_Texture * | texture, |
SDL_Surface * | surface ) |
Definition at line 59 of file arena.cc.
Referenced by yaze::gfx::Bitmap::UpdateTexture(), and yaze::gfx::Bitmap::UpdateTextureData().
SDL_Surface * yaze::gfx::Arena::AllocateSurface | ( | int | width, |
int | height, | ||
int | depth, | ||
int | format ) |
Definition at line 93 of file arena.cc.
References surfaces_.
Referenced by yaze::gfx::Bitmap::Create(), and yaze::gfx::Bitmap::Reformat().
void yaze::gfx::Arena::FreeSurface | ( | SDL_Surface * | surface | ) |
|
inline |
Definition at line 29 of file arena.h.
References gfx_sheets_.
Referenced by yaze::editor::GraphicsEditor::DrawGfxEditToolset(), and yaze::editor::DungeonEditor::RefreshGraphics().
|
inline |
Definition at line 30 of file arena.h.
References gfx_sheets_.
|
inline |
Definition at line 31 of file arena.h.
References gfx_sheets_.
|
inline |
Definition at line 32 of file arena.h.
References gfx_sheets_.
Referenced by yaze::editor::GfxGroupEditor::DrawBlocksetViewer(), yaze::editor::GraphicsEditor::DrawGfxEditToolset(), yaze::editor::GfxGroupEditor::DrawRoomsetViewer(), yaze::editor::GfxGroupEditor::DrawSpritesetViewer(), yaze::editor::GraphicsEditor::UpdateGfxTabView(), yaze::zelda3::DungeonObjectRenderer::UpdateObjectBitmap(), and yaze::editor::GraphicsEditor::UpdatePaletteColumn().
|
inline |
Definition at line 34 of file arena.h.
References bg1_.
Referenced by yaze::zelda3::Room::RenderRoomGraphics().
|
inline |
Definition at line 35 of file arena.h.
References bg2_.
Referenced by yaze::zelda3::Room::RenderRoomGraphics().
|
private |
|
private |
|
staticconstexprprivate |
|
staticconstexprprivate |
|
staticconstexprprivate |
|
private |
|
private |
|
private |
Definition at line 50 of file arena.h.
Referenced by gfx_sheet(), gfx_sheets(), mutable_gfx_sheet(), and mutable_gfx_sheets().
|
private |
Definition at line 54 of file arena.h.
Referenced by AllocateTexture(), FreeTexture(), and ~Arena().
|
private |
Definition at line 58 of file arena.h.
Referenced by AllocateSurface(), FreeSurface(), and ~Arena().