yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::zelda3::ObjectTileEditor Class Reference

Captures and edits the tile8 composition of dungeon objects. More...

#include <object_tile_editor.h>

Collaboration diagram for yaze::zelda3::ObjectTileEditor:

Public Member Functions

 ObjectTileEditor (Rom *rom)
 
absl::StatusOr< ObjectTileLayoutCaptureObjectLayout (int16_t object_id, const Room &room, const gfx::PaletteGroup &palette)
 
absl::Status RenderLayoutToBitmap (const ObjectTileLayout &layout, gfx::Bitmap &bitmap, const uint8_t *room_gfx_buffer, const gfx::PaletteGroup &palette)
 
absl::Status BuildTile8Atlas (gfx::Bitmap &atlas, const uint8_t *room_gfx_buffer, const gfx::PaletteGroup &palette, int display_palette=2)
 
absl::Status WriteBack (const ObjectTileLayout &layout)
 
int CountObjectsSharingTileData (int16_t object_id) const
 

Static Public Attributes

static constexpr int kAtlasTilesPerRow = 16
 
static constexpr int kAtlasTileRows = 64
 
static constexpr int kAtlasTileCount = kAtlasTilesPerRow * kAtlasTileRows
 
static constexpr int kAtlasWidthPx = kAtlasTilesPerRow * 8
 
static constexpr int kAtlasHeightPx = kAtlasTileRows * 8
 

Private Attributes

Romrom_
 

Detailed Description

Captures and edits the tile8 composition of dungeon objects.

Uses ObjectDrawer's trace_only mode to capture every WriteTile8 call, producing an editable ObjectTileLayout. Supports rendering previews and writing changes back to ROM or custom .bin files.

Definition at line 69 of file object_tile_editor.h.

Constructor & Destructor Documentation

◆ ObjectTileEditor()

yaze::zelda3::ObjectTileEditor::ObjectTileEditor ( Rom * rom)
explicit

Definition at line 131 of file object_tile_editor.cc.

Member Function Documentation

◆ CaptureObjectLayout()

◆ RenderLayoutToBitmap()

absl::Status yaze::zelda3::ObjectTileEditor::RenderLayoutToBitmap ( const ObjectTileLayout & layout,
gfx::Bitmap & bitmap,
const uint8_t * room_gfx_buffer,
const gfx::PaletteGroup & palette )

◆ BuildTile8Atlas()

absl::Status yaze::zelda3::ObjectTileEditor::BuildTile8Atlas ( gfx::Bitmap & atlas,
const uint8_t * room_gfx_buffer,
const gfx::PaletteGroup & palette,
int display_palette = 2 )

◆ WriteBack()

◆ CountObjectsSharingTileData()

int yaze::zelda3::ObjectTileEditor::CountObjectsSharingTileData ( int16_t object_id) const

Member Data Documentation

◆ kAtlasTilesPerRow

constexpr int yaze::zelda3::ObjectTileEditor::kAtlasTilesPerRow = 16
staticconstexpr

◆ kAtlasTileRows

constexpr int yaze::zelda3::ObjectTileEditor::kAtlasTileRows = 64
staticconstexpr

◆ kAtlasTileCount

constexpr int yaze::zelda3::ObjectTileEditor::kAtlasTileCount = kAtlasTilesPerRow * kAtlasTileRows
staticconstexpr

Definition at line 73 of file object_tile_editor.h.

Referenced by BuildTile8Atlas().

◆ kAtlasWidthPx

constexpr int yaze::zelda3::ObjectTileEditor::kAtlasWidthPx = kAtlasTilesPerRow * 8
staticconstexpr

◆ kAtlasHeightPx

constexpr int yaze::zelda3::ObjectTileEditor::kAtlasHeightPx = kAtlasTileRows * 8
staticconstexpr

◆ rom_

Rom* yaze::zelda3::ObjectTileEditor::rom_
private

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