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::StatusOr< ObjectTileLayoutCaptureObjectLayout (int16_t object_id, const Room &room, const gfx::PaletteGroup &palette, uint8_t object_size)
 
absl::StatusOr< ObjectTileLayoutCaptureEditableObjectLayout (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)
 
absl::StatusOr< ObjectTileWritePlanBuildStandardWritePlan (const ObjectTileLayout &layout) const
 
absl::Status ApplyStandardWritePlan (const ObjectTileWritePlan &plan)
 
absl::StatusOr< ObjectTileSourceImpactAnalyzeStandardTileSourceImpact (const ObjectTileLayout &layout) const
 

Static Public Member Functions

static bool IsEditableStandardObject (int16_t object_id)
 

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 194 of file object_tile_editor.h.

Constructor & Destructor Documentation

◆ ObjectTileEditor()

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

Definition at line 233 of file object_tile_editor.cc.

Member Function Documentation

◆ CaptureObjectLayout() [1/2]

absl::StatusOr< ObjectTileLayout > yaze::zelda3::ObjectTileEditor::CaptureObjectLayout ( int16_t object_id,
const Room & room,
const gfx::PaletteGroup & palette )

◆ CaptureObjectLayout() [2/2]

◆ CaptureEditableObjectLayout()

◆ IsEditableStandardObject()

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

◆ BuildStandardWritePlan()

◆ ApplyStandardWritePlan()

◆ AnalyzeStandardTileSourceImpact()

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 198 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_


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