Represents a bitmap image optimized for SNES ROM hacking. More...
#include <bitmap.h>
Classes | |
struct | DirtyRegion |
Public Member Functions | |
Bitmap ()=default | |
Bitmap (int width, int height, int depth, const std::vector< uint8_t > &data) | |
Create a bitmap with the given dimensions and raw pixel data. | |
Bitmap (int width, int height, int depth, const std::vector< uint8_t > &data, const SnesPalette &palette) | |
Create a bitmap with the given dimensions, data, and SNES palette. | |
Bitmap (const Bitmap &other) | |
Copy constructor - creates a deep copy. | |
Bitmap & | operator= (const Bitmap &other) |
Copy assignment operator. | |
Bitmap (Bitmap &&other) noexcept | |
Move constructor. | |
Bitmap & | operator= (Bitmap &&other) noexcept |
Move assignment operator. | |
~Bitmap ()=default | |
Destructor. | |
void | Create (int width, int height, int depth, std::span< uint8_t > data) |
Create a bitmap with the given dimensions and data. | |
void | Create (int width, int height, int depth, const std::vector< uint8_t > &data) |
Create a bitmap with the given dimensions and data. | |
void | Create (int width, int height, int depth, int format, const std::vector< uint8_t > &data) |
Create a bitmap with the given dimensions, format, and data. | |
void | Reformat (int format) |
Reformat the bitmap to use a different pixel format. | |
void | CreateTexture () |
Creates the underlying SDL_Texture to be displayed. | |
void | UpdateTexture () |
Updates the underlying SDL_Texture when it already exists. | |
void | QueueTextureUpdate (IRenderer *renderer) |
Queue texture update for batch processing (improved performance) | |
void | UpdateTextureData () |
Updates the texture data from the surface. | |
void | SetPalette (const SnesPalette &palette) |
Set the palette for the bitmap. | |
void | SetPaletteWithTransparent (const SnesPalette &palette, size_t index, int length=7) |
Set the palette with a transparent color. | |
void | ApplyStoredPalette () |
Apply the stored palette to the surface (internal helper) | |
void | SetPalette (const std::vector< SDL_Color > &palette) |
Set the palette using SDL colors. | |
void | WriteToPixel (int position, uint8_t value) |
Write a value to a pixel at the given position. | |
void | WriteColor (int position, const ImVec4 &color) |
Write a color to a pixel at the given position. | |
void | SetPixel (int x, int y, const SnesColor &color) |
Set a pixel at the given x,y coordinates with SNES color. | |
void | Resize (int new_width, int new_height) |
Resize the bitmap to new dimensions (preserves existing data) | |
void | InvalidatePaletteCache () |
Invalidate the palette lookup cache (call when palette changes) | |
uint8_t | FindColorIndex (const SnesColor &color) |
Find color index in palette using optimized hash map lookup. | |
bool | ValidateDataSurfaceSync () |
Validate that bitmap data and surface pixels are synchronized. | |
void | Get8x8Tile (int tile_index, int x, int y, std::vector< uint8_t > &tile_data, int &tile_data_offset) |
Extract an 8x8 tile from the bitmap (SNES standard tile size) | |
void | Get16x16Tile (int tile_x, int tile_y, std::vector< uint8_t > &tile_data, int &tile_data_offset) |
Extract a 16x16 tile from the bitmap (SNES metatile size) | |
const SnesPalette & | palette () const |
SnesPalette * | mutable_palette () |
int | width () const |
int | height () const |
int | depth () const |
auto | size () const |
const uint8_t * | data () const |
std::vector< uint8_t > & | mutable_data () |
SDL_Surface * | surface () const |
TextureHandle | texture () const |
const std::vector< uint8_t > & | vector () const |
uint8_t | at (int i) const |
bool | modified () const |
bool | is_active () const |
void | set_active (bool active) |
void | set_data (const std::vector< uint8_t > &data) |
void | set_modified (bool modified) |
void | set_texture (TextureHandle texture) |
Static Private Member Functions | |
static uint32_t | HashColor (const ImVec4 &color) |
Hash a color for cache lookup. | |
Private Attributes | |
int | width_ = 0 |
int | height_ = 0 |
int | depth_ = 0 |
bool | active_ = false |
bool | modified_ = false |
void * | texture_pixels = nullptr |
uint8_t * | pixel_data_ = nullptr |
gfx::SnesPalette | palette_ |
std::vector< uint8_t > | data_ |
SDL_Surface * | surface_ = nullptr |
TextureHandle | texture_ = nullptr |
std::unordered_map< uint32_t, uint8_t > | color_to_index_cache_ |
struct yaze::gfx::Bitmap::DirtyRegion | dirty_region_ |
Represents a bitmap image optimized for SNES ROM hacking.
The Bitmap
class provides functionality to create, manipulate, and display bitmap images specifically designed for Link to the Past ROM editing. It supports:
Key Features:
Performance Optimizations:
ROM Hacking Specific:
|
default |
Create a bitmap with the given dimensions and raw pixel data.
width | Width in pixels (typically 128, 256, or 512 for SNES tilesheets) |
height | Height in pixels (typically 32, 64, or 128 for SNES tilesheets) |
depth | Color depth in bits per pixel (4, 8, or 16 for SNES) |
data | Raw pixel data (indexed color values for SNES graphics) |
Definition at line 47 of file bitmap.cc.
References Create(), data(), depth(), height(), and width().
yaze::gfx::Bitmap::Bitmap | ( | int | width, |
int | height, | ||
int | depth, | ||
const std::vector< uint8_t > & | data, | ||
const SnesPalette & | palette | ||
) |
Create a bitmap with the given dimensions, data, and SNES palette.
width | Width in pixels |
height | Height in pixels |
depth | Color depth in bits per pixel |
data | Raw pixel data (indexed color values) |
palette | SNES palette for color mapping (15-bit RGB format) |
Definition at line 53 of file bitmap.cc.
References Create(), data(), depth(), height(), palette(), SetPalette(), and width().
Copy constructor - creates a deep copy.
Definition at line 64 of file bitmap.cc.
References active_, yaze::gfx::Arena::AllocateSurface(), data_, depth_, yaze::gfx::Arena::Get(), yaze::gfx::GetSnesPixelFormat(), height_, yaze::gfx::kIndexed, pixel_data_, surface_, vector(), and width_.
|
noexcept |
|
default |
Destructor.
Bitmap & yaze::gfx::Bitmap::operator= | ( | const Bitmap & | other | ) |
Copy assignment operator.
Definition at line 85 of file bitmap.cc.
References active_, yaze::gfx::Arena::AllocateSurface(), data_, depth_, yaze::gfx::Arena::Get(), yaze::gfx::GetSnesPixelFormat(), height_, yaze::gfx::kIndexed, modified_, palette_, pixel_data_, surface_, vector(), and width_.
|
noexcept |
Create a bitmap with the given dimensions and data.
Definition at line 162 of file bitmap.cc.
References Create(), data(), data_, depth(), height(), and width().
Referenced by Bitmap(), Bitmap(), yaze::zelda3::Inventory::BuildTileset(), yaze::editor::Tile16Editor::CopyTile16ToClipboard(), yaze::zelda3::Inventory::Create(), yaze::zelda3::TitleScreen::Create(), Create(), Create(), yaze::editor::GraphicsEditor::DecompressImportData(), yaze::gfx::BackgroundBuffer::DrawBackground(), yaze::editor::GraphicsEditor::DrawCgxImport(), yaze::gfx::BackgroundBuffer::DrawFloor(), yaze::editor::MessageEditor::DrawMessagePreview(), yaze::editor::GraphicsEditor::DrawScrImport(), yaze::editor::Tile16Editor::FlipTile16Horizontal(), yaze::editor::Tile16Editor::FlipTile16Vertical(), yaze::editor::MessageEditor::Initialize(), yaze::editor::Tile16Editor::Initialize(), yaze::zelda3::LoadDungeonMapTile16(), yaze::LoadFontGraphics(), yaze::editor::Tile16Editor::LoadTile16FromScratchSpace(), yaze::editor::Tile16Editor::PasteTile16FromClipboard(), yaze::editor::Tile16Editor::PreviewPaletteChange(), yaze::editor::Tile16Editor::RegenerateTile16BitmapFromROM(), yaze::editor::Tile16Editor::RotateTile16(), yaze::test::RomDependentTestSuite::RunTile16EditorTest(), yaze::editor::Tile16Editor::SaveUndoState(), yaze::editor::Tile16Editor::SetCurrentTile(), yaze::editor::Tile16Editor::Undo(), and yaze::editor::Tile16Editor::UpdateTile16Edit().
void yaze::gfx::Bitmap::Create | ( | int | width, |
int | height, | ||
int | depth, | ||
int | format, | ||
const std::vector< uint8_t > & | data | ||
) |
Create a bitmap with the given dimensions, format, and data.
Create a bitmap with specified format and data.
width | Width in pixels |
height | Height in pixels |
depth | Color depth in bits per pixel |
format | Pixel format (0=indexed, 1=4BPP, 2=8BPP) |
data | Raw pixel data |
Performance Notes:
Definition at line 186 of file bitmap.cc.
References active_, yaze::gfx::Arena::AllocateSurface(), ApplyStoredPalette(), data(), data_, depth(), depth_, yaze::gfx::SnesPalette::empty(), yaze::gfx::Arena::Get(), yaze::gfx::GetSnesPixelFormat(), height(), height_, palette_, pixel_data_, surface_, vector(), width(), and width_.
Reformat the bitmap to use a different pixel format.
Definition at line 228 of file bitmap.cc.
References active_, yaze::gfx::Arena::AllocateSurface(), data_, depth_, yaze::gfx::Arena::Get(), yaze::gfx::GetSnesPixelFormat(), height_, palette_, pixel_data_, SetPalette(), surface_, vector(), and width_.
Referenced by yaze::gui::canvas::CanvasContextMenu::RenderBitmapOperationsMenu().
void yaze::gfx::Bitmap::CreateTexture | ( | ) |
Creates the underlying SDL_Texture to be displayed.
Definition at line 242 of file bitmap.cc.
References yaze::gfx::Arena::CREATE, yaze::gfx::Arena::Get(), and yaze::gfx::Arena::QueueTextureCommand().
Referenced by yaze::gfx::AtlasRenderer::AddBitmapWithBppOptimization(), and yaze::gfx::RenderTilesBatch().
void yaze::gfx::Bitmap::UpdateTexture | ( | ) |
Updates the underlying SDL_Texture when it already exists.
Definition at line 246 of file bitmap.cc.
References yaze::gfx::Arena::Get(), yaze::gfx::Arena::QueueTextureCommand(), and yaze::gfx::Arena::UPDATE.
Referenced by yaze::gui::Canvas::ConvertBitmapFormat(), and yaze::gui::Canvas::UpdateColorPainter().
Queue texture update for batch processing (improved performance)
renderer | SDL renderer for texture operations |
void yaze::gfx::Bitmap::UpdateTextureData | ( | ) |
Updates the texture data from the surface.
void yaze::gfx::Bitmap::SetPalette | ( | const SnesPalette & | palette | ) |
Set the palette for the bitmap.
Definition at line 292 of file bitmap.cc.
References ApplyStoredPalette(), modified_, palette(), and palette_.
Referenced by yaze::gui::CanvasUtils::ApplyPaletteGroup(), yaze::gui::PaletteWidget::ApplyROMPalette(), Bitmap(), yaze::zelda3::Inventory::BuildTileset(), yaze::editor::Tile16Editor::CopyTile16ToClipboard(), yaze::zelda3::Inventory::Create(), yaze::gfx::CreateTilemap(), yaze::editor::GraphicsEditor::DecompressImportData(), yaze::editor::GraphicsEditor::DrawCgxImport(), yaze::editor::MessageEditor::DrawMessagePreview(), yaze::editor::GraphicsEditor::DrawScrImport(), yaze::editor::Tile16Editor::FlipTile16Horizontal(), yaze::editor::Tile16Editor::FlipTile16Vertical(), yaze::editor::MessageEditor::Initialize(), yaze::editor::Tile16Editor::Initialize(), yaze::zelda3::LoadDungeonMapTile16(), yaze::editor::Tile16Editor::LoadTile16FromScratchSpace(), yaze::editor::Tile16Editor::PasteTile16FromClipboard(), Reformat(), yaze::editor::Tile16Editor::RefreshAllPalettes(), yaze::editor::OverworldEditor::RefreshTile16Blockset(), yaze::editor::Tile16Editor::RegenerateTile16BitmapFromROM(), yaze::editor::Tile16Editor::RotateTile16(), yaze::test::RomDependentTestSuite::RunTile16EditorTest(), yaze::editor::Tile16Editor::SaveUndoState(), yaze::editor::Tile16Editor::SetCurrentTile(), yaze::editor::Tile16Editor::Undo(), and yaze::editor::Tile16Editor::UpdateTile16Edit().
void yaze::gfx::Bitmap::SetPaletteWithTransparent | ( | const SnesPalette & | palette, |
size_t | index, | ||
int | length = 7 |
||
) |
Set the palette with a transparent color.
Definition at line 303 of file bitmap.cc.
References InvalidatePaletteCache(), palette(), palette_, yaze::gfx::SnesPalette::size(), surface_, and vector().
Referenced by yaze::gui::CanvasUtils::ApplyPaletteGroup(), yaze::gui::PaletteWidget::ApplyROMPalette(), and yaze::editor::Tile16Editor::PreviewPaletteChange().
void yaze::gfx::Bitmap::ApplyStoredPalette | ( | ) |
Apply the stored palette to the surface (internal helper)
Definition at line 252 of file bitmap.cc.
References yaze::gfx::SnesPalette::empty(), InvalidatePaletteCache(), palette_, yaze::gfx::SnesPalette::size(), surface_, and vector().
Referenced by Create(), and SetPalette().
Write a value to a pixel at the given position.
Definition at line 377 of file bitmap.cc.
References active_, data_, modified_, pixel_data_, surface_, and vector().
Referenced by yaze::editor::Tile16Editor::CommitChangesToOverworld(), yaze::gfx::anonymous_namespace{tilemap.cc}::ComposeAndPlaceTilePart(), yaze::editor::Tile16Editor::DrawToCurrentTile16(), yaze::editor::Tile16Editor::FillTile16WithTile8(), yaze::editor::Tile16Editor::FlipTile16Horizontal(), yaze::editor::Tile16Editor::FlipTile16Vertical(), yaze::editor::OverworldEditor::RenderUpdatedMapBitmap(), yaze::editor::Tile16Editor::RotateTile16(), yaze::editor::Tile16Editor::UpdateBlocksetBitmap(), and yaze::editor::Tile16Editor::UpdateOverworldTilemap().
Write a color to a pixel at the given position.
Definition at line 424 of file bitmap.cc.
References active_, yaze::gfx::ConvertRgbToSnes(), data_, modified_, pixel_data_, surface_, and vector().
Referenced by yaze::gui::Canvas::DrawTileOnBitmap().
Set a pixel at the given x,y coordinates with SNES color.
Set a pixel at the given coordinates with SNES color.
x | X coordinate (0 to width-1) |
y | Y coordinate (0 to height-1) |
color | SNES color (15-bit RGB format) |
x | X coordinate (0 to width-1) |
y | Y coordinate (0 to height-1) |
color | SNES color (15-bit RGB format) |
Performance Notes:
Optimizations Applied:
Definition at line 519 of file bitmap.cc.
References yaze::gfx::Bitmap::DirtyRegion::AddPoint(), data_, dirty_region_, FindColorIndex(), height_, modified_, pixel_data_, surface_, vector(), and width_.
Referenced by yaze::cli::Tile16ProposalGenerator::GenerateDiff(), yaze::zelda3::DungeonObjectEditor::RenderLayerVisualization(), yaze::zelda3::DungeonObjectEditor::RenderSelectionHighlight(), and yaze::gfx::TEST_F().
Resize the bitmap to new dimensions (preserves existing data)
new_width | New width in pixels |
new_height | New height in pixels |
Definition at line 547 of file bitmap.cc.
References active_, yaze::gfx::Arena::AllocateSurface(), data_, depth_, yaze::gfx::Arena::Get(), yaze::gfx::GetSnesPixelFormat(), height_, yaze::gfx::kIndexed, modified_, pixel_data_, surface_, vector(), and width_.
void yaze::gfx::Bitmap::InvalidatePaletteCache | ( | ) |
Invalidate the palette lookup cache (call when palette changes)
Performance Notes:
Definition at line 617 of file bitmap.cc.
References color_to_index_cache_, HashColor(), palette_, yaze::gfx::SnesPalette::size(), and vector().
Referenced by ApplyStoredPalette(), and SetPaletteWithTransparent().
Find color index in palette using optimized hash map lookup.
color | SNES color to find index for |
color | SNES color to find index for |
Performance Notes:
Definition at line 638 of file bitmap.cc.
References color_to_index_cache_, HashColor(), yaze::gfx::SnesColor::rgb(), and vector().
Referenced by SetPixel(), and yaze::gfx::TEST_F().
bool yaze::gfx::Bitmap::ValidateDataSurfaceSync | ( | ) |
Validate that bitmap data and surface pixels are synchronized.
Definition at line 665 of file bitmap.cc.
References data_, surface_, and vector().
void yaze::gfx::Bitmap::Get8x8Tile | ( | int | tile_index, |
int | x, | ||
int | y, | ||
std::vector< uint8_t > & | tile_data, | ||
int & | tile_data_offset | ||
) |
Extract an 8x8 tile from the bitmap (SNES standard tile size)
tile_index | Index of the tile in the tilesheet |
x | X offset within the tile (0-7) |
y | Y offset within the tile (0-7) |
tile_data | Output buffer for tile pixel data (64 bytes for 8x8) |
tile_data_offset | Current offset in tile_data buffer |
Definition at line 468 of file bitmap.cc.
References data_, height_, vector(), and width_.
void yaze::gfx::Bitmap::Get16x16Tile | ( | int | tile_x, |
int | tile_y, | ||
std::vector< uint8_t > & | tile_data, | ||
int & | tile_data_offset | ||
) |
Extract a 16x16 tile from the bitmap (SNES metatile size)
tile_x | X coordinate of tile in tilesheet |
tile_y | Y coordinate of tile in tilesheet |
tile_data | Output buffer for tile pixel data (256 bytes for 16x16) |
tile_data_offset | Current offset in tile_data buffer |
Definition at line 484 of file bitmap.cc.
References data_, vector(), and width_.
Referenced by yaze::gfx::UpdateTile16().
|
inline |
Definition at line 251 of file bitmap.h.
References palette_.
Referenced by yaze::gfx::AtlasRenderer::AddBitmapWithBppOptimization(), yaze::gui::PaletteWidget::ApplyROMPalette(), Bitmap(), yaze::editor::Tile16Editor::CopyTile16ToClipboard(), yaze::editor::Tile16Editor::Initialize(), yaze::editor::Tile16Editor::PasteTile16FromClipboard(), yaze::gfx::RenderTilesBatch(), yaze::editor::Tile16Editor::SaveTile16ToScratchSpace(), yaze::editor::Tile16Editor::SaveUndoState(), SetPalette(), SetPalette(), SetPaletteWithTransparent(), yaze::gui::Canvas::ShowBppAnalysis(), yaze::gui::Canvas::ShowBppConversionDialog(), yaze::gui::Canvas::ShowBppFormatSelector(), yaze::gui::PaletteWidget::ShowColorAnalysis(), and yaze::editor::Tile16Editor::Undo().
|
inline |
Definition at line 252 of file bitmap.h.
References palette_.
Referenced by yaze::gui::Canvas::DrawContextMenu(), yaze::editor::MessageEditor::Initialize(), yaze::gui::canvas::CanvasContextMenu::RenderPaletteOperationsMenu(), and yaze::gui::Canvas::ShowPaletteEditor().
|
inline |
Definition at line 253 of file bitmap.h.
References width_.
Referenced by yaze::gfx::AtlasRenderer::AddBitmap(), yaze::gfx::AtlasRenderer::AddBitmapWithBppOptimization(), Bitmap(), Bitmap(), yaze::gui::BppComparisonTool::CalculateMetrics(), yaze::editor::Tile16Editor::CommitChangesToOverworld(), yaze::gfx::anonymous_namespace{tilemap.cc}::ComposeAndPlaceTilePart(), yaze::gfx::ComposeTile16(), yaze::gui::Canvas::ConvertBitmapFormat(), Create(), Create(), Create(), yaze::gfx::BackgroundBuffer::DrawBackground(), yaze::gui::Canvas::DrawBitmap(), yaze::gui::Canvas::DrawBitmap(), yaze::gui::Canvas::DrawBitmap(), yaze::gui::Canvas::DrawBitmapGroup(), yaze::gui::DrawBitmapViewer(), yaze::gfx::BackgroundBuffer::DrawFloor(), yaze::gui::Canvas::DrawTilemapPainter(), yaze::gui::canvas::CanvasInteractionHandler::DrawTilemapPainter(), yaze::gui::Canvas::DrawTileOnBitmap(), yaze::zelda3::ObjectDrawer::DrawTileToBitmap(), yaze::gui::BppComparisonTool::GenerateComparisons(), yaze::gui::Canvas::GetCurrentBppFormat(), yaze::gfx::GetTilemapData(), yaze::editor::Tile16Editor::Initialize(), yaze::editor::Tile16Editor::LoadTile8(), yaze::gfx::ModifyTile16(), yaze::gfx::AtlasRenderer::PackBitmap(), yaze::gfx::TextureAtlas::PackBitmap(), yaze::gui::canvas::CanvasModals::RenderAdvancedPropertiesModal(), yaze::gui::BppFormatUI::RenderAnalysisPanel(), yaze::gui::canvas::CanvasContextMenu::RenderBitmapOperationsMenu(), yaze::gui::BppFormatUI::RenderConversionPreview(), yaze::gui::BppFormatUI::RenderFormatSelector(), yaze::zelda3::DungeonObjectEditor::RenderLayerVisualization(), yaze::gui::canvas::CanvasModals::RenderScalingControlsModal(), yaze::zelda3::DungeonObjectEditor::RenderSelectionHighlight(), yaze::gfx::RenderTile16(), yaze::editor::Tile16Editor::SetCurrentTile(), yaze::gui::Canvas::SetZoomToFit(), yaze::gui::Canvas::ShowAdvancedCanvasProperties(), yaze::gui::PaletteWidget::ShowColorAnalysis(), yaze::gui::Canvas::ShowScalingControls(), yaze::gui::TableCanvasPipeline(), yaze::gfx::AtlasRenderer::UpdateBitmap(), yaze::editor::Tile16Editor::UpdateBlocksetBitmap(), yaze::editor::Tile16Editor::UpdateOverworldTilemap(), yaze::gui::BppConversionDialog::UpdatePreview(), yaze::gfx::UpdateTile16(), and yaze::editor::Tile16Editor::UpdateTile16Edit().
|
inline |
Definition at line 254 of file bitmap.h.
References height_.
Referenced by yaze::gfx::AtlasRenderer::AddBitmap(), yaze::gfx::AtlasRenderer::AddBitmapWithBppOptimization(), Bitmap(), Bitmap(), yaze::gui::BppComparisonTool::CalculateMetrics(), yaze::gui::Canvas::ConvertBitmapFormat(), Create(), Create(), Create(), yaze::gui::Canvas::DrawBitmap(), yaze::gui::Canvas::DrawBitmap(), yaze::gui::Canvas::DrawBitmap(), yaze::gui::Canvas::DrawBitmapGroup(), yaze::gui::DrawBitmapViewer(), yaze::gfx::BackgroundBuffer::DrawFloor(), yaze::gui::Canvas::DrawTilemapPainter(), yaze::gui::canvas::CanvasInteractionHandler::DrawTilemapPainter(), yaze::zelda3::ObjectDrawer::DrawTileToBitmap(), yaze::gui::BppComparisonTool::GenerateComparisons(), yaze::gui::Canvas::GetCurrentBppFormat(), yaze::gfx::GetTilemapData(), yaze::editor::Tile16Editor::Initialize(), yaze::editor::Tile16Editor::LoadTile8(), yaze::gfx::AtlasRenderer::PackBitmap(), yaze::gfx::TextureAtlas::PackBitmap(), yaze::gui::canvas::CanvasModals::RenderAdvancedPropertiesModal(), yaze::gui::BppFormatUI::RenderAnalysisPanel(), yaze::gui::canvas::CanvasContextMenu::RenderBitmapOperationsMenu(), yaze::gui::BppFormatUI::RenderConversionPreview(), yaze::gui::BppFormatUI::RenderFormatSelector(), yaze::zelda3::DungeonObjectEditor::RenderLayerVisualization(), yaze::gui::canvas::CanvasModals::RenderScalingControlsModal(), yaze::zelda3::DungeonObjectEditor::RenderSelectionHighlight(), yaze::gfx::RenderTile16(), yaze::gui::Canvas::SetZoomToFit(), yaze::gui::Canvas::ShowAdvancedCanvasProperties(), yaze::gui::PaletteWidget::ShowColorAnalysis(), yaze::gui::Canvas::ShowScalingControls(), yaze::gui::TableCanvasPipeline(), yaze::gfx::AtlasRenderer::UpdateBitmap(), and yaze::gui::BppConversionDialog::UpdatePreview().
|
inline |
Definition at line 255 of file bitmap.h.
References depth_.
Referenced by yaze::gfx::AtlasRenderer::AddBitmapWithBppOptimization(), Bitmap(), Bitmap(), Create(), Create(), Create(), yaze::gui::BppComparisonTool::GenerateComparisons(), yaze::editor::Tile16Editor::Initialize(), yaze::gui::BppFormatUI::RenderConversionPreview(), and yaze::gui::BppConversionDialog::UpdatePreview().
|
inline |
Definition at line 256 of file bitmap.h.
References data_.
Referenced by yaze::editor::Tile16Editor::CommitChangesToOverworld(), yaze::editor::Tile16Editor::DrawToCurrentTile16(), yaze::editor::Tile16Editor::FillTile16WithTile8(), yaze::editor::Tile16Editor::FlipTile16Horizontal(), yaze::editor::Tile16Editor::FlipTile16Vertical(), yaze::editor::Tile16Editor::IsTile16Valid(), yaze::editor::Tile16Editor::LoadTile8(), yaze::editor::OverworldEditor::RenderUpdatedMapBitmap(), yaze::editor::Tile16Editor::RotateTile16(), yaze::editor::Tile16Editor::SetCurrentTile(), yaze::editor::Tile16Editor::UpdateBlocksetBitmap(), yaze::editor::Tile16Editor::UpdateOverworldTilemap(), and yaze::editor::Tile16Editor::ValidateTile16Data().
Definition at line 257 of file bitmap.h.
References data_.
Referenced by Bitmap(), Bitmap(), yaze::editor::Tile16Editor::CommitChangesToOverworld(), Create(), Create(), Create(), yaze::editor::Tile16Editor::DrawToCurrentTile16(), yaze::editor::Tile16Editor::FlipTile16Horizontal(), yaze::editor::Tile16Editor::FlipTile16Vertical(), yaze::editor::Tile16Editor::LoadTile8(), yaze::editor::Tile16Editor::RotateTile16(), set_data(), yaze::editor::Tile16Editor::SetCurrentTile(), yaze::editor::Tile16Editor::UpdateBlocksetBitmap(), and yaze::editor::Tile16Editor::UpdateOverworldTilemap().
|
inline |
Definition at line 258 of file bitmap.h.
References data_.
Referenced by yaze::zelda3::TitleScreen::BuildTileset(), yaze::editor::Tile16Editor::ClearTile16(), yaze::gfx::BackgroundBuffer::DrawBackground(), yaze::zelda3::ObjectDrawer::DrawTileToBitmap(), and yaze::editor::Tile16Editor::UpdateTile16Edit().
|
inline |
Definition at line 259 of file bitmap.h.
References surface_.
Referenced by yaze::gfx::CreateTilemap(), yaze::gfx::BackgroundBuffer::DrawBackground(), yaze::editor::MessageEditor::DrawMessagePreview(), yaze::editor::OverworldEditor::LoadGraphics(), yaze::gui::canvas::CanvasContextMenu::RenderBitmapOperationsMenu(), yaze::gfx::RenderTilesBatch(), yaze::gfx::SDL2Renderer::UpdateTexture(), and yaze::gfx::UpdateTilemap().
|
inline |
Definition at line 260 of file bitmap.h.
References texture_.
Referenced by yaze::gfx::AtlasRenderer::AddBitmap(), yaze::gfx::AtlasRenderer::AddBitmapWithBppOptimization(), yaze::gui::Canvas::DrawBitmap(), yaze::gui::Canvas::DrawBitmap(), yaze::gui::Canvas::DrawBitmap(), yaze::gui::Canvas::DrawBitmapGroup(), yaze::gui::DrawBitmapViewer(), yaze::gui::Canvas::DrawTilemapPainter(), yaze::gui::canvas::CanvasInteractionHandler::DrawTilemapPainter(), yaze::gui::Canvas::DrawTilePainter(), yaze::gui::canvas::CanvasInteractionHandler::DrawTilePainter(), yaze::editor::OverworldEditor::RefreshTile16Blockset(), yaze::gui::BppComparisonTool::RenderComparisonGrid(), yaze::gui::BppFormatUI::RenderConversionPreview(), yaze::gui::BppConversionDialog::RenderPreview(), yaze::gfx::RenderTilesBatch(), set_texture(), yaze::gfx::AtlasRenderer::UpdateBitmap(), yaze::gfx::UpdateTile16(), and yaze::gfx::UpdateTilemap().
|
inline |
Definition at line 261 of file bitmap.h.
References data_.
Referenced by yaze::gfx::AtlasRenderer::AddBitmap(), yaze::gfx::AtlasRenderer::AddBitmapWithBppOptimization(), ApplyStoredPalette(), Bitmap(), yaze::gui::Canvas::ConvertBitmapFormat(), Create(), yaze::editor::OverworldEditor::DrawOverworldEdits(), FindColorIndex(), yaze::gui::BppComparisonTool::GenerateComparisons(), Get16x16Tile(), Get8x8Tile(), yaze::gui::Canvas::GetCurrentBppFormat(), yaze::gfx::GetTilemapData(), HashColor(), yaze::editor::Tile16Editor::Initialize(), InvalidatePaletteCache(), operator=(), yaze::editor::Tile16Editor::PasteTile16FromClipboard(), yaze::editor::Tile16Editor::PreviewPaletteChange(), Reformat(), yaze::gui::BppFormatUI::RenderAnalysisPanel(), yaze::gui::BppFormatUI::RenderConversionPreview(), yaze::gui::BppFormatUI::RenderFormatSelector(), yaze::gfx::RenderTile(), yaze::gfx::RenderTile16(), Resize(), yaze::editor::Tile16Editor::SaveTile16ToScratchSpace(), yaze::editor::Tile16Editor::SaveUndoState(), set_data(), SetPalette(), SetPaletteWithTransparent(), SetPixel(), yaze::gui::PaletteWidget::ShowColorAnalysis(), yaze::editor::Tile16Editor::Undo(), yaze::gui::BppConversionDialog::UpdatePreview(), yaze::editor::Tile16Editor::UpdateTile16Edit(), ValidateDataSurfaceSync(), WriteColor(), and WriteToPixel().
|
inline |
Definition at line 263 of file bitmap.h.
References modified_.
Referenced by yaze::editor::Tile16Editor::CommitChangesToBlockset(), and set_modified().
|
inline |
Definition at line 264 of file bitmap.h.
References active_.
Referenced by yaze::gfx::AtlasRenderer::AddBitmap(), yaze::gfx::AtlasRenderer::AddBitmapWithBppOptimization(), yaze::editor::OverworldEditor::CheckForCurrentMap(), yaze::editor::Tile16Editor::ClearTile16(), yaze::editor::Tile16Editor::CommitChangesToOverworld(), yaze::gfx::CreateTilemap(), yaze::gfx::BackgroundBuffer::DrawBackground(), yaze::gui::Canvas::DrawBitmap(), yaze::gui::Canvas::DrawBitmap(), yaze::gui::Canvas::DrawBitmap(), yaze::gui::Canvas::DrawBitmapGroup(), yaze::gfx::BackgroundBuffer::DrawFloor(), yaze::editor::MessageEditor::DrawMessagePreview(), yaze::editor::OverworldEditor::DrawOverworldEdits(), yaze::editor::OverworldEditor::DrawTile16Selector(), yaze::gui::Canvas::DrawTilemapPainter(), yaze::gui::canvas::CanvasInteractionHandler::DrawTilemapPainter(), yaze::gui::Canvas::DrawTilePainter(), yaze::gui::canvas::CanvasInteractionHandler::DrawTilePainter(), yaze::zelda3::ObjectDrawer::DrawTileToBitmap(), yaze::editor::Tile16Editor::DrawToCurrentTile16(), yaze::editor::Tile16Editor::FlipTile16Horizontal(), yaze::editor::Tile16Editor::FlipTile16Vertical(), yaze::gfx::GetTilemapData(), yaze::editor::OverworldEditor::LoadGraphics(), yaze::editor::Tile16Editor::LoadTile8(), yaze::gfx::TextureAtlas::PackBitmap(), yaze::editor::Tile16Editor::PreviewPaletteChange(), yaze::editor::Tile16Editor::RefreshAllPalettes(), yaze::editor::OverworldEditor::RefreshTile16Blockset(), yaze::gui::TileSelectorWidget::Render(), yaze::gfx::RenderTile(), yaze::gfx::RenderTile16(), yaze::gfx::RenderTilesBatch(), yaze::editor::OverworldEditor::RenderUpdatedMapBitmap(), yaze::editor::Tile16Editor::RotateTile16(), yaze::editor::Tile16Editor::SaveTile16ToROM(), yaze::editor::Tile16Editor::SaveUndoState(), yaze::editor::Tile16Editor::set_palette(), yaze::gui::Canvas::SetZoomToFit(), yaze::gui::PaletteWidget::ShowColorAnalysis(), yaze::gui::TableCanvasPipeline(), yaze::editor::Tile16Editor::UpdateBlocksetBitmap(), yaze::editor::Tile16Editor::UpdateOverworldTilemap(), yaze::gfx::UpdateTile16(), yaze::editor::Tile16Editor::UpdateTile16Edit(), and yaze::gfx::UpdateTilemap().
Definition at line 645 of file bitmap.cc.
References data(), data_, modified_, pixel_data_, surface_, and vector().
Referenced by yaze::gui::Canvas::ConvertBitmapFormat(), yaze::editor::MessageEditor::DrawMessagePreview(), yaze::gfx::UpdateTile16(), and yaze::gfx::UpdateTilemap().
Definition at line 267 of file bitmap.h.
References modified(), and modified_.
Referenced by yaze::gui::CanvasUtils::ApplyPaletteGroup(), yaze::editor::Tile16Editor::ClearTile16(), yaze::editor::Tile16Editor::CommitChangesToOverworld(), yaze::zelda3::ObjectDrawer::DrawTileToBitmap(), yaze::editor::Tile16Editor::DrawToCurrentTile16(), yaze::editor::Tile16Editor::FillTile16WithTile8(), yaze::editor::Tile16Editor::FlipTile16Horizontal(), yaze::editor::Tile16Editor::FlipTile16Vertical(), yaze::editor::Tile16Editor::RefreshAllPalettes(), yaze::editor::Tile16Editor::RefreshTile16Blockset(), yaze::editor::OverworldEditor::RenderUpdatedMapBitmap(), yaze::editor::Tile16Editor::RotateTile16(), yaze::editor::Tile16Editor::UpdateBlocksetBitmap(), and yaze::editor::Tile16Editor::UpdateOverworldTilemap().
|
inline |
Hash a color for cache lookup.
color | ImVec4 color to hash |
color | ImVec4 color to hash |
Performance Notes:
Definition at line 597 of file bitmap.cc.
References vector().
Referenced by FindColorIndex(), and InvalidatePaletteCache().
|
private |
Definition at line 272 of file bitmap.h.
Referenced by Bitmap(), Create(), Get16x16Tile(), Get8x8Tile(), operator=(), operator=(), Reformat(), Resize(), SetPixel(), and width().
|
private |
Definition at line 273 of file bitmap.h.
Referenced by Bitmap(), Create(), Get8x8Tile(), height(), operator=(), Reformat(), Resize(), and SetPixel().
|
private |
Definition at line 274 of file bitmap.h.
Referenced by Bitmap(), Create(), depth(), operator=(), Reformat(), and Resize().
Definition at line 276 of file bitmap.h.
Referenced by Bitmap(), Create(), is_active(), operator=(), Reformat(), Resize(), set_active(), WriteColor(), and WriteToPixel().
Definition at line 277 of file bitmap.h.
Referenced by modified(), operator=(), Resize(), set_data(), set_modified(), SetPalette(), SetPixel(), WriteColor(), and WriteToPixel().
Definition at line 283 of file bitmap.h.
Referenced by Bitmap(), Create(), operator=(), Reformat(), Resize(), set_data(), SetPixel(), WriteColor(), and WriteToPixel().
|
private |
Definition at line 286 of file bitmap.h.
Referenced by ApplyStoredPalette(), Create(), InvalidatePaletteCache(), mutable_palette(), operator=(), palette(), Reformat(), SetPalette(), and SetPaletteWithTransparent().
|
private |
Definition at line 289 of file bitmap.h.
Referenced by at(), Bitmap(), Create(), Create(), data(), Get16x16Tile(), Get8x8Tile(), mutable_data(), operator=(), Reformat(), Resize(), set_data(), SetPixel(), size(), ValidateDataSurfaceSync(), vector(), WriteColor(), and WriteToPixel().
|
private |
Definition at line 292 of file bitmap.h.
Referenced by ApplyStoredPalette(), Bitmap(), Create(), operator=(), Reformat(), Resize(), set_data(), SetPalette(), SetPaletteWithTransparent(), SetPixel(), surface(), ValidateDataSurfaceSync(), WriteColor(), and WriteToPixel().
|
private |
Definition at line 295 of file bitmap.h.
Referenced by set_texture(), and texture().
Definition at line 298 of file bitmap.h.
Referenced by FindColorIndex(), and InvalidatePaletteCache().
|
private |
Referenced by SetPixel().