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

Draws dungeon objects to background buffers using game patterns. More...

#include <object_drawer.h>

Collaboration diagram for yaze::zelda3::ObjectDrawer:

Classes

struct  DoorDef
 

Public Member Functions

 ObjectDrawer (Rom *rom, int room_id, const uint8_t *room_gfx_buffer=nullptr)
 
absl::Status DrawObject (const RoomObject &object, gfx::BackgroundBuffer &bg1, gfx::BackgroundBuffer &bg2, const gfx::PaletteGroup &palette_group, const DungeonState *state=nullptr, gfx::BackgroundBuffer *layout_bg1=nullptr)
 Draw a room object to background buffers.
 
void ResetChestIndex ()
 
void DrawDoor (const DoorDef &door, int door_index, gfx::BackgroundBuffer &bg1, gfx::BackgroundBuffer &bg2, const DungeonState *state=nullptr)
 Draw a door to background buffers.
 
void DrawPotItem (uint8_t item_id, int x, int y, gfx::BackgroundBuffer &bg)
 Draw a pot item visualization.
 
absl::Status DrawObjectList (const std::vector< RoomObject > &objects, gfx::BackgroundBuffer &bg1, gfx::BackgroundBuffer &bg2, const gfx::PaletteGroup &palette_group, const DungeonState *state=nullptr, gfx::BackgroundBuffer *layout_bg1=nullptr)
 Draw all objects in a room.
 
int GetDrawRoutineId (int16_t object_id) const
 Get draw routine ID for an object.
 
int GetDrawRoutineCount () const
 Get the total number of registered draw routines.
 
void InitializeDrawRoutines ()
 Initialize draw routine registry Must be called before drawing objects.
 
void DrawTileToBitmap (gfx::Bitmap &bitmap, const gfx::TileInfo &tile_info, int pixel_x, int pixel_y, const uint8_t *tiledata)
 Draw a single tile directly to bitmap.
 
std::pair< int, int > CalculateObjectDimensions (const RoomObject &object)
 Calculate the dimensions (width, height) of an object in pixels.
 

Protected Types

using DrawRoutine
 

Protected Member Functions

void DrawChest (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawNothing (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawRightwards2x2_1to15or32 (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawRightwards2x4_1to15or26 (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawRightwards2x4_1to16 (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawRightwards2x4_1to16_BothBG (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawRightwards2x2_1to16 (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawDiagonalAcute_1to16 (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawDiagonalGrave_1to16 (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawDiagonalAcute_1to16_BothBG (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawDiagonalGrave_1to16_BothBG (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawRightwards1x2_1to16_plus2 (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawRightwardsHasEdge1x1_1to16_plus3 (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawRightwardsHasEdge1x1_1to16_plus2 (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawRightwardsTopCorners1x2_1to16_plus13 (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawRightwardsBottomCorners1x2_1to16_plus13 (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void CustomDraw (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawRightwards4x4_1to16 (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawRightwards1x1Solid_1to16_plus3 (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawDoorSwitcherer (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawRightwardsDecor4x4spaced2_1to16 (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawRightwardsStatue2x3spaced2_1to16 (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawRightwardsPillar2x4spaced4_1to16 (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawRightwardsDecor4x3spaced4_1to16 (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawRightwardsDoubled2x2spaced2_1to16 (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawRightwardsDecor2x2spaced12_1to16 (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawRightwards4x2_1to16 (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawRightwardsDecor4x2spaced8_1to16 (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawRightwardsCannonHole4x3_1to16 (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawRightwardsLine1x1_1to16plus1 (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawRightwardsBar4x3_1to16 (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawRightwardsShelf4x4_1to16 (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawRightwardsBigRail1x3_1to16plus5 (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawRightwardsBlock2x2spaced2_1to16 (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawCorner4x4 (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawDownwards2x2_1to15or32 (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawDownwards4x2_1to15or26 (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawDownwards4x2_1to16_BothBG (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawDownwardsDecor4x2spaced4_1to16 (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawDownwards2x2_1to16 (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawDownwardsHasEdge1x1_1to16_plus3 (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawDownwardsHasEdge1x1_1to16_plus23 (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawDownwardsEdge1x1_1to16 (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawDownwardsLeftCorners2x1_1to16_plus12 (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawDownwardsRightCorners2x1_1to16_plus12 (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawDownwardsFloor4x4_1to16 (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawDownwards1x1Solid_1to16_plus3 (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawDownwardsDecor4x4spaced2_1to16 (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawDownwardsPillar2x4spaced2_1to16 (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawDownwardsDecor3x4spaced4_1to16 (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawDownwardsDecor2x2spaced12_1to16 (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawDownwardsLine1x1_1to16plus1 (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawDownwardsDecor2x4spaced8_1to16 (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawDownwardsDecor3x4spaced2_1to16 (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawDownwardsBigRail3x1_1to16plus5 (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawDownwardsBlock2x2spaced2_1to16 (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawDownwardsCannonHole3x6_1to16 (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawDownwardsBar2x3_1to16 (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawDownwardsPots2x2_1to16 (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawDownwardsHammerPegs2x2_1to16 (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawRightwardsEdge1x1_1to16plus7 (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawRightwardsPots2x2_1to16 (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawRightwardsHammerPegs2x2_1to16 (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawDiagonalCeilingTopLeft (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawDiagonalCeilingBottomLeft (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawDiagonalCeilingTopRight (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawDiagonalCeilingBottomRight (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawClosedChestPlatform (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles)
 
void DrawMovingWallWest (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles)
 
void DrawMovingWallEast (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles)
 
void DrawOpenChestPlatform (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles)
 
void DrawSomariaLine (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawWaterFace (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void Draw4x4Corner_BothBG (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawWeirdCornerBottom_BothBG (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawWeirdCornerTop_BothBG (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawLargeCanvasObject (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, int width, int height)
 
void DrawBed4x5 (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawRightwards3x6 (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawUtility6x3 (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawUtility3x5 (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawVerticalTurtleRockPipe (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawHorizontalTurtleRockPipe (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawLightBeam (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawBigLightBeam (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawBossShell4x4 (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawSolidWallDecor3x4 (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawArcheryGameTargetDoor (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawGanonTriforceFloorDecor (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawSingle2x2 (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawSingle4x4 (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawSingle4x3 (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawRupeeFloor (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawActual4x4 (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void DrawCustomObject (const RoomObject &obj, gfx::BackgroundBuffer &bg, std::span< const gfx::TileInfo > tiles, const DungeonState *state=nullptr)
 
void WriteTile8 (gfx::BackgroundBuffer &bg, int tile_x, int tile_y, const gfx::TileInfo &tile_info)
 
bool IsValidTilePosition (int tile_x, int tile_y) const
 
void MarkBG1Transparent (gfx::BackgroundBuffer &bg1, int tile_x, int tile_y, int pixel_width, int pixel_height)
 Mark BG1 pixels as transparent where BG2 overlay objects are drawn.
 
void DrawDoorIndicator (gfx::Bitmap &bitmap, int tile_x, int tile_y, int width, int height, DoorType type, DoorDirection direction)
 

Static Protected Member Functions

static bool RoutineDrawsToBothBGs (int routine_id)
 

Protected Attributes

std::unordered_map< int16_t, int > object_to_routine_map_
 
std::vector< DrawRoutinedraw_routines_
 
bool routines_initialized_ = false
 
Romrom_
 
int room_id_
 
int current_chest_index_ = 0
 
const uint8_t * room_gfx_buffer_
 

Static Protected Attributes

static constexpr int kMaxTilesX = 64
 
static constexpr int kMaxTilesY = 64
 

Detailed Description

Draws dungeon objects to background buffers using game patterns.

This class interprets object IDs and draws them to BG1/BG2 buffers using the patterns extracted from the game's drawing routines. Based on ZScream's DungeonObjectData.cs and Subtype1_Draw.cs patterns.

Architecture:

  1. Load tile data from ROM for the object
  2. Look up draw routine ID from object ID mapping
  3. Execute appropriate draw routine with size/orientation
  4. Write tiles to BackgroundBuffer according to pattern
  5. Handle palette coordination and graphics sheet access

Definition at line 36 of file object_drawer.h.

Member Typedef Documentation

◆ DrawRoutine

Initial value:
std::function<void(ObjectDrawer*, const RoomObject&,
gfx::BackgroundBuffer&,
std::span<const gfx::TileInfo>,
const DungeonState*)>
ObjectDrawer(Rom *rom, int room_id, const uint8_t *room_gfx_buffer=nullptr)

Definition at line 148 of file object_drawer.h.

Constructor & Destructor Documentation

◆ ObjectDrawer()

yaze::zelda3::ObjectDrawer::ObjectDrawer ( Rom * rom,
int room_id,
const uint8_t * room_gfx_buffer = nullptr )
explicit

Definition at line 20 of file object_drawer.cc.

References InitializeDrawRoutines().

Here is the call graph for this function:

Member Function Documentation

◆ DrawObject()

absl::Status yaze::zelda3::ObjectDrawer::DrawObject ( const RoomObject & object,
gfx::BackgroundBuffer & bg1,
gfx::BackgroundBuffer & bg2,
const gfx::PaletteGroup & palette_group,
const DungeonState * state = nullptr,
gfx::BackgroundBuffer * layout_bg1 = nullptr )

◆ ResetChestIndex()

void yaze::zelda3::ObjectDrawer::ResetChestIndex ( )
inline

Definition at line 72 of file object_drawer.h.

References current_chest_index_.

Referenced by DrawObjectList().

◆ DrawDoor()

◆ DrawPotItem()

void yaze::zelda3::ObjectDrawer::DrawPotItem ( uint8_t item_id,
int x,
int y,
gfx::BackgroundBuffer & bg )

Draw a pot item visualization.

Parameters
item_idItem ID
xX coordinate (pixels)
yY coordinate (pixels)
bgBackground buffer

Definition at line 5509 of file object_drawer.cc.

References yaze::gfx::BackgroundBuffer::bitmap().

Referenced by yaze::zelda3::Room::RenderObjectsToBackground().

Here is the call graph for this function:

◆ DrawObjectList()

absl::Status yaze::zelda3::ObjectDrawer::DrawObjectList ( const std::vector< RoomObject > & objects,
gfx::BackgroundBuffer & bg1,
gfx::BackgroundBuffer & bg2,
const gfx::PaletteGroup & palette_group,
const DungeonState * state = nullptr,
gfx::BackgroundBuffer * layout_bg1 = nullptr )

Draw all objects in a room.

Parameters
objectsVector of room objects
bg1Background layer 1 buffer (object buffer)
bg2Background layer 2 buffer (object buffer)
palette_groupCurrent palette group for color mapping
layout_bg1Optional layout buffer to mask for BG2 object transparency
Returns
Status of the drawing operation
Todo
Handle pitch mismatch properly (copy row by row)

Definition at line 151 of file object_drawer.cc.

References yaze::zelda3::RoomObject::BG1, yaze::zelda3::RoomObject::BG2, yaze::gfx::BackgroundBuffer::bitmap(), DrawObject(), GetDrawRoutineId(), LOG_DEBUG, ResetChestIndex(), and RoutineDrawsToBothBGs().

Referenced by yaze::zelda3::RoomLayout::Draw(), and yaze::zelda3::Room::RenderObjectsToBackground().

◆ GetDrawRoutineId()

int yaze::zelda3::ObjectDrawer::GetDrawRoutineId ( int16_t object_id) const

Get draw routine ID for an object.

Parameters
object_idThe object ID to look up
Returns
Draw routine ID (0-24) based on ZScream mapping

Definition at line 1949 of file object_drawer.cc.

References object_to_routine_map_.

Referenced by CalculateObjectDimensions(), DrawObject(), and DrawObjectList().

◆ GetDrawRoutineCount()

int yaze::zelda3::ObjectDrawer::GetDrawRoutineCount ( ) const
inline

Get the total number of registered draw routines.

Definition at line 118 of file object_drawer.h.

References draw_routines_.

◆ InitializeDrawRoutines()

void yaze::zelda3::ObjectDrawer::InitializeDrawRoutines ( )

Initialize draw routine registry Must be called before drawing objects.

Definition at line 272 of file object_drawer.cc.

References yaze::zelda3::draw_routines::Draw3x3FloorIn4x4SuperSquare(), yaze::zelda3::draw_routines::Draw4x4BlocksIn4x4SuperSquare(), Draw4x4Corner_BothBG(), yaze::zelda3::draw_routines::Draw4x4FloorIn4x4SuperSquare(), yaze::zelda3::draw_routines::Draw4x4FloorOneIn4x4SuperSquare(), yaze::zelda3::draw_routines::Draw4x4FloorTwoIn4x4SuperSquare(), draw_routines_, DrawActual4x4(), DrawArcheryGameTargetDoor(), yaze::zelda3::draw_routines::DrawAutoStairs(), DrawBed4x5(), yaze::zelda3::draw_routines::DrawBigHole4x4_1to16(), yaze::zelda3::draw_routines::DrawBigKeyLock(), DrawBigLightBeam(), yaze::zelda3::draw_routines::DrawBombableFloor(), DrawBossShell4x4(), DrawChest(), DrawClosedChestPlatform(), DrawCorner4x4(), DrawCustomObject(), DrawDiagonalAcute_1to16(), DrawDiagonalAcute_1to16_BothBG(), DrawDiagonalCeilingBottomLeft(), DrawDiagonalCeilingBottomRight(), DrawDiagonalCeilingTopLeft(), DrawDiagonalCeilingTopRight(), DrawDiagonalGrave_1to16(), DrawDiagonalGrave_1to16_BothBG(), DrawDoorSwitcherer(), DrawDownwards1x1Solid_1to16_plus3(), DrawDownwards2x2_1to15or32(), DrawDownwards2x2_1to16(), DrawDownwards4x2_1to15or26(), DrawDownwards4x2_1to16_BothBG(), DrawDownwardsBar2x3_1to16(), DrawDownwardsBigRail3x1_1to16plus5(), DrawDownwardsBlock2x2spaced2_1to16(), DrawDownwardsCannonHole3x6_1to16(), DrawDownwardsDecor2x2spaced12_1to16(), DrawDownwardsDecor2x4spaced8_1to16(), DrawDownwardsDecor3x4spaced2_1to16(), DrawDownwardsDecor3x4spaced4_1to16(), DrawDownwardsDecor4x2spaced4_1to16(), DrawDownwardsDecor4x4spaced2_1to16(), DrawDownwardsEdge1x1_1to16(), DrawDownwardsFloor4x4_1to16(), DrawDownwardsHammerPegs2x2_1to16(), DrawDownwardsHasEdge1x1_1to16_plus23(), DrawDownwardsHasEdge1x1_1to16_plus3(), DrawDownwardsLeftCorners2x1_1to16_plus12(), DrawDownwardsLine1x1_1to16plus1(), DrawDownwardsPillar2x4spaced2_1to16(), DrawDownwardsPots2x2_1to16(), DrawDownwardsRightCorners2x1_1to16_plus12(), yaze::zelda3::draw_routines::DrawDrenchingWaterFace(), yaze::zelda3::draw_routines::DrawEmptyWaterFace(), DrawGanonTriforceFloorDecor(), DrawHorizontalTurtleRockPipe(), yaze::zelda3::draw_routines::DrawInterRoomFatStairsDownA(), yaze::zelda3::draw_routines::DrawInterRoomFatStairsDownB(), yaze::zelda3::draw_routines::DrawInterRoomFatStairsUp(), DrawLightBeam(), DrawMovingWallEast(), DrawMovingWallWest(), DrawNothing(), DrawOpenChestPlatform(), yaze::zelda3::draw_routines::DrawPrisonCell(), DrawRightwards1x1Solid_1to16_plus3(), DrawRightwards1x2_1to16_plus2(), DrawRightwards2x2_1to15or32(), DrawRightwards2x2_1to16(), DrawRightwards2x4_1to15or26(), DrawRightwards2x4_1to16(), DrawRightwards2x4_1to16_BothBG(), DrawRightwards3x6(), DrawRightwards4x2_1to16(), DrawRightwards4x4_1to16(), DrawRightwardsBar4x3_1to16(), DrawRightwardsBigRail1x3_1to16plus5(), DrawRightwardsBlock2x2spaced2_1to16(), DrawRightwardsBottomCorners1x2_1to16_plus13(), DrawRightwardsCannonHole4x3_1to16(), DrawRightwardsDecor2x2spaced12_1to16(), DrawRightwardsDecor4x2spaced8_1to16(), DrawRightwardsDecor4x3spaced4_1to16(), DrawRightwardsDecor4x4spaced2_1to16(), DrawRightwardsDoubled2x2spaced2_1to16(), DrawRightwardsEdge1x1_1to16plus7(), DrawRightwardsHammerPegs2x2_1to16(), DrawRightwardsHasEdge1x1_1to16_plus2(), DrawRightwardsHasEdge1x1_1to16_plus3(), DrawRightwardsLine1x1_1to16plus1(), DrawRightwardsPillar2x4spaced4_1to16(), DrawRightwardsPots2x2_1to16(), DrawRightwardsShelf4x4_1to16(), DrawRightwardsStatue2x3spaced2_1to16(), DrawRightwardsTopCorners1x2_1to16_plus13(), DrawRupeeFloor(), DrawSingle2x2(), DrawSingle4x3(), DrawSingle4x4(), DrawSolidWallDecor3x4(), DrawSomariaLine(), yaze::zelda3::draw_routines::DrawSpike2x2In4x4SuperSquare(), yaze::zelda3::draw_routines::DrawSpiralStairs(), yaze::zelda3::draw_routines::DrawSpittingWaterFace(), yaze::zelda3::draw_routines::DrawStraightInterRoomStairs(), yaze::zelda3::draw_routines::DrawTableRock4x4_1to16(), DrawUtility3x5(), DrawUtility6x3(), DrawVerticalTurtleRockPipe(), DrawWaterFace(), yaze::zelda3::draw_routines::DrawWaterOverlay8x8_1to16(), DrawWeirdCornerBottom_BothBG(), DrawWeirdCornerTop_BothBG(), yaze::core::FeatureFlags::get(), yaze::zelda3::DrawRoutineIds::kCustomObject, yaze::zelda3::DrawRoutineIds::kDownwardsHasEdge1x1_1to16_plus23, yaze::core::FeatureFlags::Flags::kEnableCustomObjects, yaze::zelda3::DrawRoutineIds::kNothing, object_to_routine_map_, routines_initialized_, yaze::zelda3::RoomObject::size_, WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by CalculateObjectDimensions(), yaze::editor::DungeonObjectSelector::GetOrCreatePreview(), ObjectDrawer(), yaze::editor::ObjectEditorPanel::OpenStaticObjectEditor(), yaze::emu::render::EmulatorRenderService::RenderDungeonObjectStatic(), and yaze::editor::DungeonObjectInteraction::RenderGhostPreviewBitmap().

◆ DrawTileToBitmap()

void yaze::zelda3::ObjectDrawer::DrawTileToBitmap ( gfx::Bitmap & bitmap,
const gfx::TileInfo & tile_info,
int pixel_x,
int pixel_y,
const uint8_t * tiledata )

Draw a single tile directly to bitmap.

Parameters
bitmapTarget bitmap to draw to
tile_infoTile information (ID, palette, mirroring)
pixel_xX pixel coordinate in bitmap
pixel_yY pixel coordinate in bitmap
tiledataSource graphics data from ROM

Definition at line 4054 of file object_drawer.cc.

References yaze::gfx::Bitmap::height(), yaze::gfx::TileInfo::horizontal_mirror_, yaze::gfx::TileInfo::id_, yaze::gfx::Bitmap::is_active(), LOG_DEBUG, yaze::gfx::Bitmap::mutable_data(), yaze::gfx::TileInfo::palette_, yaze::gfx::Bitmap::set_modified(), yaze::gfx::TileInfo::vertical_mirror_, and yaze::gfx::Bitmap::width().

Referenced by DrawDoor(), and WriteTile8().

◆ CalculateObjectDimensions()

std::pair< int, int > yaze::zelda3::ObjectDrawer::CalculateObjectDimensions ( const RoomObject & object)

Calculate the dimensions (width, height) of an object in pixels.

Parameters
objectThe object to calculate dimensions for
Returns
Pair of (width, height) in pixels

Definition at line 4759 of file object_drawer.cc.

References GetDrawRoutineId(), InitializeDrawRoutines(), and routines_initialized_.

Referenced by yaze::editor::DungeonCanvasViewer::DrawMaskHighlights(), DrawObject(), and yaze::editor::DungeonCanvasViewer::DrawObjectPositionOutlines().

Here is the call graph for this function:

◆ DrawChest()

void yaze::zelda3::ObjectDrawer::DrawChest ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 2197 of file object_drawer.cc.

References current_chest_index_, room_id_, WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawNothing()

void yaze::zelda3::ObjectDrawer::DrawNothing ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 2237 of file object_drawer.cc.

References yaze::zelda3::RoomObject::id_, and LOG_DEBUG.

Referenced by InitializeDrawRoutines().

◆ DrawRightwards2x2_1to15or32()

void yaze::zelda3::ObjectDrawer::DrawRightwards2x2_1to15or32 ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

◆ DrawRightwards2x4_1to15or26()

void yaze::zelda3::ObjectDrawer::DrawRightwards2x4_1to15or26 ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

◆ DrawRightwards2x4_1to16()

void yaze::zelda3::ObjectDrawer::DrawRightwards2x4_1to16 ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

◆ DrawRightwards2x4_1to16_BothBG()

void yaze::zelda3::ObjectDrawer::DrawRightwards2x4_1to16_BothBG ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 2365 of file object_drawer.cc.

References DrawRightwards2x4_1to16().

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawRightwards2x2_1to16()

void yaze::zelda3::ObjectDrawer::DrawRightwards2x2_1to16 ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

◆ DrawDiagonalAcute_1to16()

void yaze::zelda3::ObjectDrawer::DrawDiagonalAcute_1to16 ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 2396 of file object_drawer.cc.

References yaze::zelda3::RoomObject::size_, WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawDiagonalGrave_1to16()

void yaze::zelda3::ObjectDrawer::DrawDiagonalGrave_1to16 ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 2426 of file object_drawer.cc.

References yaze::zelda3::RoomObject::size_, WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawDiagonalAcute_1to16_BothBG()

void yaze::zelda3::ObjectDrawer::DrawDiagonalAcute_1to16_BothBG ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 2456 of file object_drawer.cc.

References yaze::zelda3::RoomObject::size_, WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawDiagonalGrave_1to16_BothBG()

void yaze::zelda3::ObjectDrawer::DrawDiagonalGrave_1to16_BothBG ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 2482 of file object_drawer.cc.

References yaze::zelda3::RoomObject::size_, WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawRightwards1x2_1to16_plus2()

void yaze::zelda3::ObjectDrawer::DrawRightwards1x2_1to16_plus2 ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 2546 of file object_drawer.cc.

References yaze::zelda3::RoomObject::size_, WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawRightwardsHasEdge1x1_1to16_plus3()

void yaze::zelda3::ObjectDrawer::DrawRightwardsHasEdge1x1_1to16_plus3 ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 2564 of file object_drawer.cc.

References yaze::zelda3::RoomObject::size_, WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawRightwardsHasEdge1x1_1to16_plus2()

void yaze::zelda3::ObjectDrawer::DrawRightwardsHasEdge1x1_1to16_plus2 ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 2592 of file object_drawer.cc.

References yaze::zelda3::RoomObject::size_, WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawRightwardsTopCorners1x2_1to16_plus13()

void yaze::zelda3::ObjectDrawer::DrawRightwardsTopCorners1x2_1to16_plus13 ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 2620 of file object_drawer.cc.

References yaze::zelda3::RoomObject::size_, WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawRightwardsBottomCorners1x2_1to16_plus13()

void yaze::zelda3::ObjectDrawer::DrawRightwardsBottomCorners1x2_1to16_plus13 ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 2638 of file object_drawer.cc.

References yaze::zelda3::RoomObject::size_, WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ CustomDraw()

void yaze::zelda3::ObjectDrawer::CustomDraw ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 2656 of file object_drawer.cc.

References WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Here is the call graph for this function:

◆ DrawRightwards4x4_1to16()

void yaze::zelda3::ObjectDrawer::DrawRightwards4x4_1to16 ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

◆ DrawRightwards1x1Solid_1to16_plus3()

void yaze::zelda3::ObjectDrawer::DrawRightwards1x1Solid_1to16_plus3 ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 2698 of file object_drawer.cc.

References yaze::zelda3::RoomObject::size_, WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawDoorSwitcherer()

void yaze::zelda3::ObjectDrawer::DrawDoorSwitcherer ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 2715 of file object_drawer.cc.

References room_id_, WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawRightwardsDecor4x4spaced2_1to16()

void yaze::zelda3::ObjectDrawer::DrawRightwardsDecor4x4spaced2_1to16 ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 2734 of file object_drawer.cc.

References yaze::zelda3::RoomObject::size_, WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawRightwardsStatue2x3spaced2_1to16()

void yaze::zelda3::ObjectDrawer::DrawRightwardsStatue2x3spaced2_1to16 ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 2755 of file object_drawer.cc.

References yaze::zelda3::RoomObject::size_, WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawRightwardsPillar2x4spaced4_1to16()

void yaze::zelda3::ObjectDrawer::DrawRightwardsPillar2x4spaced4_1to16 ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 2777 of file object_drawer.cc.

References yaze::zelda3::RoomObject::size_, WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawRightwardsDecor4x3spaced4_1to16()

void yaze::zelda3::ObjectDrawer::DrawRightwardsDecor4x3spaced4_1to16 ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 2802 of file object_drawer.cc.

References yaze::zelda3::RoomObject::size_, WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by DrawUtility6x3(), and InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawRightwardsDoubled2x2spaced2_1to16()

void yaze::zelda3::ObjectDrawer::DrawRightwardsDoubled2x2spaced2_1to16 ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 2827 of file object_drawer.cc.

References yaze::zelda3::RoomObject::size_, WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawRightwardsDecor2x2spaced12_1to16()

void yaze::zelda3::ObjectDrawer::DrawRightwardsDecor2x2spaced12_1to16 ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 2849 of file object_drawer.cc.

References yaze::zelda3::RoomObject::size_, WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawRightwards4x2_1to16()

void yaze::zelda3::ObjectDrawer::DrawRightwards4x2_1to16 ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 2873 of file object_drawer.cc.

References yaze::zelda3::RoomObject::size_, WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawRightwardsDecor4x2spaced8_1to16()

void yaze::zelda3::ObjectDrawer::DrawRightwardsDecor4x2spaced8_1to16 ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 2900 of file object_drawer.cc.

References yaze::zelda3::RoomObject::size_, WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawRightwardsCannonHole4x3_1to16()

void yaze::zelda3::ObjectDrawer::DrawRightwardsCannonHole4x3_1to16 ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 2921 of file object_drawer.cc.

References yaze::zelda3::RoomObject::size_, WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawRightwardsLine1x1_1to16plus1()

void yaze::zelda3::ObjectDrawer::DrawRightwardsLine1x1_1to16plus1 ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 2965 of file object_drawer.cc.

References yaze::zelda3::RoomObject::size_, WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawRightwardsBar4x3_1to16()

void yaze::zelda3::ObjectDrawer::DrawRightwardsBar4x3_1to16 ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 2980 of file object_drawer.cc.

References yaze::zelda3::RoomObject::size_, WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawRightwardsShelf4x4_1to16()

void yaze::zelda3::ObjectDrawer::DrawRightwardsShelf4x4_1to16 ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 3010 of file object_drawer.cc.

References yaze::zelda3::RoomObject::size_, WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawRightwardsBigRail1x3_1to16plus5()

void yaze::zelda3::ObjectDrawer::DrawRightwardsBigRail1x3_1to16plus5 ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 3033 of file object_drawer.cc.

References yaze::zelda3::RoomObject::size_, WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawRightwardsBlock2x2spaced2_1to16()

void yaze::zelda3::ObjectDrawer::DrawRightwardsBlock2x2spaced2_1to16 ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 3080 of file object_drawer.cc.

References yaze::zelda3::RoomObject::size_, WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawCorner4x4()

void yaze::zelda3::ObjectDrawer::DrawCorner4x4 ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

◆ DrawDownwards2x2_1to15or32()

void yaze::zelda3::ObjectDrawer::DrawDownwards2x2_1to15or32 ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 3105 of file object_drawer.cc.

References yaze::zelda3::RoomObject::size_, WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawDownwards4x2_1to15or26()

void yaze::zelda3::ObjectDrawer::DrawDownwards4x2_1to15or26 ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

◆ DrawDownwards4x2_1to16_BothBG()

void yaze::zelda3::ObjectDrawer::DrawDownwards4x2_1to16_BothBG ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 3166 of file object_drawer.cc.

References DrawDownwards4x2_1to15or26().

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawDownwardsDecor4x2spaced4_1to16()

void yaze::zelda3::ObjectDrawer::DrawDownwardsDecor4x2spaced4_1to16 ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 3174 of file object_drawer.cc.

References yaze::zelda3::RoomObject::size_, WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawDownwards2x2_1to16()

void yaze::zelda3::ObjectDrawer::DrawDownwards2x2_1to16 ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 3203 of file object_drawer.cc.

References yaze::zelda3::RoomObject::size_, WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawDownwardsHasEdge1x1_1to16_plus3()

void yaze::zelda3::ObjectDrawer::DrawDownwardsHasEdge1x1_1to16_plus3 ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 3227 of file object_drawer.cc.

References yaze::zelda3::RoomObject::size_, WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawDownwardsHasEdge1x1_1to16_plus23()

void yaze::zelda3::ObjectDrawer::DrawDownwardsHasEdge1x1_1to16_plus23 ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 3244 of file object_drawer.cc.

References yaze::zelda3::RoomObject::size_, WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawDownwardsEdge1x1_1to16()

void yaze::zelda3::ObjectDrawer::DrawDownwardsEdge1x1_1to16 ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 3272 of file object_drawer.cc.

References yaze::zelda3::RoomObject::size_, WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawDownwardsLeftCorners2x1_1to16_plus12()

void yaze::zelda3::ObjectDrawer::DrawDownwardsLeftCorners2x1_1to16_plus12 ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 3289 of file object_drawer.cc.

References yaze::zelda3::RoomObject::size_, WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawDownwardsRightCorners2x1_1to16_plus12()

void yaze::zelda3::ObjectDrawer::DrawDownwardsRightCorners2x1_1to16_plus12 ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 3307 of file object_drawer.cc.

References yaze::zelda3::RoomObject::size_, WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawDownwardsFloor4x4_1to16()

void yaze::zelda3::ObjectDrawer::DrawDownwardsFloor4x4_1to16 ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 3327 of file object_drawer.cc.

References yaze::zelda3::RoomObject::size_, WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawDownwards1x1Solid_1to16_plus3()

void yaze::zelda3::ObjectDrawer::DrawDownwards1x1Solid_1to16_plus3 ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 3349 of file object_drawer.cc.

References yaze::zelda3::RoomObject::size_, WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawDownwardsDecor4x4spaced2_1to16()

void yaze::zelda3::ObjectDrawer::DrawDownwardsDecor4x4spaced2_1to16 ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 3364 of file object_drawer.cc.

References yaze::zelda3::RoomObject::size_, WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawDownwardsPillar2x4spaced2_1to16()

void yaze::zelda3::ObjectDrawer::DrawDownwardsPillar2x4spaced2_1to16 ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 3386 of file object_drawer.cc.

References yaze::zelda3::RoomObject::size_, WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawDownwardsDecor3x4spaced4_1to16()

void yaze::zelda3::ObjectDrawer::DrawDownwardsDecor3x4spaced4_1to16 ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 3408 of file object_drawer.cc.

References yaze::zelda3::RoomObject::size_, WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawDownwardsDecor2x2spaced12_1to16()

void yaze::zelda3::ObjectDrawer::DrawDownwardsDecor2x2spaced12_1to16 ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 3430 of file object_drawer.cc.

References yaze::zelda3::RoomObject::size_, WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawDownwardsLine1x1_1to16plus1()

void yaze::zelda3::ObjectDrawer::DrawDownwardsLine1x1_1to16plus1 ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 3452 of file object_drawer.cc.

References yaze::zelda3::RoomObject::size_, WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawDownwardsDecor2x4spaced8_1to16()

void yaze::zelda3::ObjectDrawer::DrawDownwardsDecor2x4spaced8_1to16 ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

◆ DrawDownwardsDecor3x4spaced2_1to16()

void yaze::zelda3::ObjectDrawer::DrawDownwardsDecor3x4spaced2_1to16 ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 3505 of file object_drawer.cc.

References yaze::zelda3::RoomObject::size_, WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawDownwardsBigRail3x1_1to16plus5()

void yaze::zelda3::ObjectDrawer::DrawDownwardsBigRail3x1_1to16plus5 ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 3526 of file object_drawer.cc.

References yaze::zelda3::RoomObject::size_, WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawDownwardsBlock2x2spaced2_1to16()

void yaze::zelda3::ObjectDrawer::DrawDownwardsBlock2x2spaced2_1to16 ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 3570 of file object_drawer.cc.

References yaze::zelda3::RoomObject::size_, WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawDownwardsCannonHole3x6_1to16()

void yaze::zelda3::ObjectDrawer::DrawDownwardsCannonHole3x6_1to16 ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 3590 of file object_drawer.cc.

References yaze::zelda3::RoomObject::size_, WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawDownwardsBar2x3_1to16()

void yaze::zelda3::ObjectDrawer::DrawDownwardsBar2x3_1to16 ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 3612 of file object_drawer.cc.

References yaze::zelda3::RoomObject::size_, WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawDownwardsPots2x2_1to16()

void yaze::zelda3::ObjectDrawer::DrawDownwardsPots2x2_1to16 ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 3633 of file object_drawer.cc.

References yaze::zelda3::RoomObject::size_, WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawDownwardsHammerPegs2x2_1to16()

void yaze::zelda3::ObjectDrawer::DrawDownwardsHammerPegs2x2_1to16 ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 3653 of file object_drawer.cc.

References yaze::zelda3::RoomObject::size_, WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawRightwardsEdge1x1_1to16plus7()

void yaze::zelda3::ObjectDrawer::DrawRightwardsEdge1x1_1to16plus7 ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 3673 of file object_drawer.cc.

References yaze::zelda3::RoomObject::size_, WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawRightwardsPots2x2_1to16()

void yaze::zelda3::ObjectDrawer::DrawRightwardsPots2x2_1to16 ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 3688 of file object_drawer.cc.

References yaze::zelda3::RoomObject::size_, WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawRightwardsHammerPegs2x2_1to16()

void yaze::zelda3::ObjectDrawer::DrawRightwardsHammerPegs2x2_1to16 ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 3708 of file object_drawer.cc.

References yaze::zelda3::RoomObject::size_, WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawDiagonalCeilingTopLeft()

void yaze::zelda3::ObjectDrawer::DrawDiagonalCeilingTopLeft ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

◆ DrawDiagonalCeilingBottomLeft()

void yaze::zelda3::ObjectDrawer::DrawDiagonalCeilingBottomLeft ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 3759 of file object_drawer.cc.

References yaze::zelda3::RoomObject::size_, WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawDiagonalCeilingTopRight()

void yaze::zelda3::ObjectDrawer::DrawDiagonalCeilingTopRight ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 3778 of file object_drawer.cc.

References yaze::zelda3::RoomObject::size_, WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawDiagonalCeilingBottomRight()

void yaze::zelda3::ObjectDrawer::DrawDiagonalCeilingBottomRight ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 3798 of file object_drawer.cc.

References yaze::zelda3::RoomObject::size_, WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawClosedChestPlatform()

void yaze::zelda3::ObjectDrawer::DrawClosedChestPlatform ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles )
protected

◆ DrawMovingWallWest()

void yaze::zelda3::ObjectDrawer::DrawMovingWallWest ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles )
protected

Definition at line 3861 of file object_drawer.cc.

References yaze::zelda3::RoomObject::size_, WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawMovingWallEast()

void yaze::zelda3::ObjectDrawer::DrawMovingWallEast ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles )
protected

Definition at line 3879 of file object_drawer.cc.

References yaze::zelda3::RoomObject::size_, WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawOpenChestPlatform()

void yaze::zelda3::ObjectDrawer::DrawOpenChestPlatform ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles )
protected

◆ DrawSomariaLine()

void yaze::zelda3::ObjectDrawer::DrawSomariaLine ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

◆ DrawWaterFace()

void yaze::zelda3::ObjectDrawer::DrawWaterFace ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected
Todo
Implement state check from RoomDraw_EmptyWaterFace ($019D29)

Definition at line 4207 of file object_drawer.cc.

References WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by Draw4x4Corner_BothBG(), DrawWeirdCornerBottom_BothBG(), DrawWeirdCornerTop_BothBG(), and InitializeDrawRoutines().

Here is the call graph for this function:

◆ Draw4x4Corner_BothBG()

void yaze::zelda3::ObjectDrawer::Draw4x4Corner_BothBG ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 4222 of file object_drawer.cc.

References DrawCorner4x4(), DrawWaterFace(), WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawWeirdCornerBottom_BothBG()

void yaze::zelda3::ObjectDrawer::DrawWeirdCornerBottom_BothBG ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 4243 of file object_drawer.cc.

References DrawCorner4x4(), DrawWaterFace(), WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawWeirdCornerTop_BothBG()

void yaze::zelda3::ObjectDrawer::DrawWeirdCornerTop_BothBG ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 4272 of file object_drawer.cc.

References DrawCorner4x4(), DrawWaterFace(), WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawLargeCanvasObject()

void yaze::zelda3::ObjectDrawer::DrawLargeCanvasObject ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
int width,
int height )
protected

Definition at line 4301 of file object_drawer.cc.

References WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Here is the call graph for this function:

◆ DrawBed4x5()

void yaze::zelda3::ObjectDrawer::DrawBed4x5 ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 4319 of file object_drawer.cc.

References DrawRightwards4x4_1to16(), WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawRightwards3x6()

void yaze::zelda3::ObjectDrawer::DrawRightwards3x6 ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 4342 of file object_drawer.cc.

References DrawRightwards4x4_1to16(), WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawUtility6x3()

void yaze::zelda3::ObjectDrawer::DrawUtility6x3 ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 4364 of file object_drawer.cc.

References DrawRightwardsDecor4x3spaced4_1to16(), WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawUtility3x5()

void yaze::zelda3::ObjectDrawer::DrawUtility3x5 ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 4386 of file object_drawer.cc.

References DrawRightwards4x4_1to16(), WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawVerticalTurtleRockPipe()

void yaze::zelda3::ObjectDrawer::DrawVerticalTurtleRockPipe ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 4412 of file object_drawer.cc.

References DrawRightwards2x2_1to16(), WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawHorizontalTurtleRockPipe()

void yaze::zelda3::ObjectDrawer::DrawHorizontalTurtleRockPipe ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 4434 of file object_drawer.cc.

References DrawRightwards2x2_1to16(), WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawLightBeam()

void yaze::zelda3::ObjectDrawer::DrawLightBeam ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 4456 of file object_drawer.cc.

References DrawRightwards4x4_1to16(), WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawBigLightBeam()

void yaze::zelda3::ObjectDrawer::DrawBigLightBeam ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 4479 of file object_drawer.cc.

References DrawRightwards4x4_1to16(), WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawBossShell4x4()

void yaze::zelda3::ObjectDrawer::DrawBossShell4x4 ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 4501 of file object_drawer.cc.

References DrawRightwards4x4_1to16().

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawSolidWallDecor3x4()

void yaze::zelda3::ObjectDrawer::DrawSolidWallDecor3x4 ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 4511 of file object_drawer.cc.

References DrawRightwards4x4_1to16(), WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawArcheryGameTargetDoor()

void yaze::zelda3::ObjectDrawer::DrawArcheryGameTargetDoor ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 4533 of file object_drawer.cc.

References DrawRightwards4x4_1to16(), WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawGanonTriforceFloorDecor()

void yaze::zelda3::ObjectDrawer::DrawGanonTriforceFloorDecor ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 4697 of file object_drawer.cc.

References DrawRightwards4x4_1to16(), WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawSingle2x2()

void yaze::zelda3::ObjectDrawer::DrawSingle2x2 ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 4579 of file object_drawer.cc.

References WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawSingle4x4()

void yaze::zelda3::ObjectDrawer::DrawSingle4x4 ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 4595 of file object_drawer.cc.

References WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawSingle4x3()

void yaze::zelda3::ObjectDrawer::DrawSingle4x3 ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 4618 of file object_drawer.cc.

References WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawRupeeFloor()

void yaze::zelda3::ObjectDrawer::DrawRupeeFloor ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 4636 of file object_drawer.cc.

References WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawActual4x4()

void yaze::zelda3::ObjectDrawer::DrawActual4x4 ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

Definition at line 4678 of file object_drawer.cc.

References WriteTile8(), yaze::zelda3::RoomObject::x_, and yaze::zelda3::RoomObject::y_.

Referenced by InitializeDrawRoutines().

Here is the call graph for this function:

◆ DrawCustomObject()

void yaze::zelda3::ObjectDrawer::DrawCustomObject ( const RoomObject & obj,
gfx::BackgroundBuffer & bg,
std::span< const gfx::TileInfo > tiles,
const DungeonState * state = nullptr )
protected

◆ WriteTile8()

void yaze::zelda3::ObjectDrawer::WriteTile8 ( gfx::BackgroundBuffer & bg,
int tile_x,
int tile_y,
const gfx::TileInfo & tile_info )
protected

Definition at line 3999 of file object_drawer.cc.

References yaze::gfx::BackgroundBuffer::bitmap(), DrawTileToBitmap(), LOG_DEBUG, yaze::gfx::BackgroundBuffer::mutable_priority_data(), yaze::gfx::TileInfo::over_, and room_gfx_buffer_.

Referenced by CustomDraw(), Draw4x4Corner_BothBG(), DrawActual4x4(), DrawArcheryGameTargetDoor(), DrawBed4x5(), DrawBigLightBeam(), DrawChest(), DrawClosedChestPlatform(), DrawCorner4x4(), DrawDiagonalAcute_1to16(), DrawDiagonalAcute_1to16_BothBG(), DrawDiagonalCeilingBottomLeft(), DrawDiagonalCeilingBottomRight(), DrawDiagonalCeilingTopLeft(), DrawDiagonalCeilingTopRight(), DrawDiagonalGrave_1to16(), DrawDiagonalGrave_1to16_BothBG(), DrawDoorSwitcherer(), DrawDownwards1x1Solid_1to16_plus3(), DrawDownwards2x2_1to15or32(), DrawDownwards2x2_1to16(), DrawDownwards4x2_1to15or26(), DrawDownwardsBar2x3_1to16(), DrawDownwardsBigRail3x1_1to16plus5(), DrawDownwardsBlock2x2spaced2_1to16(), DrawDownwardsCannonHole3x6_1to16(), DrawDownwardsDecor2x2spaced12_1to16(), DrawDownwardsDecor2x4spaced8_1to16(), DrawDownwardsDecor3x4spaced2_1to16(), DrawDownwardsDecor3x4spaced4_1to16(), DrawDownwardsDecor4x2spaced4_1to16(), DrawDownwardsDecor4x4spaced2_1to16(), DrawDownwardsEdge1x1_1to16(), DrawDownwardsFloor4x4_1to16(), DrawDownwardsHammerPegs2x2_1to16(), DrawDownwardsHasEdge1x1_1to16_plus23(), DrawDownwardsHasEdge1x1_1to16_plus3(), DrawDownwardsLeftCorners2x1_1to16_plus12(), DrawDownwardsLine1x1_1to16plus1(), DrawDownwardsPillar2x4spaced2_1to16(), DrawDownwardsPots2x2_1to16(), DrawDownwardsRightCorners2x1_1to16_plus12(), DrawGanonTriforceFloorDecor(), DrawHorizontalTurtleRockPipe(), DrawLargeCanvasObject(), DrawLightBeam(), DrawMovingWallEast(), DrawMovingWallWest(), DrawObject(), DrawOpenChestPlatform(), DrawRightwards1x1Solid_1to16_plus3(), DrawRightwards1x2_1to16_plus2(), DrawRightwards2x2_1to15or32(), DrawRightwards2x2_1to16(), DrawRightwards2x4_1to15or26(), DrawRightwards2x4_1to16(), DrawRightwards3x6(), DrawRightwards4x2_1to16(), DrawRightwards4x4_1to16(), DrawRightwardsBar4x3_1to16(), DrawRightwardsBigRail1x3_1to16plus5(), DrawRightwardsBlock2x2spaced2_1to16(), DrawRightwardsBottomCorners1x2_1to16_plus13(), DrawRightwardsCannonHole4x3_1to16(), DrawRightwardsDecor2x2spaced12_1to16(), DrawRightwardsDecor4x2spaced8_1to16(), DrawRightwardsDecor4x3spaced4_1to16(), DrawRightwardsDecor4x4spaced2_1to16(), DrawRightwardsDoubled2x2spaced2_1to16(), DrawRightwardsEdge1x1_1to16plus7(), DrawRightwardsHammerPegs2x2_1to16(), DrawRightwardsHasEdge1x1_1to16_plus2(), DrawRightwardsHasEdge1x1_1to16_plus3(), DrawRightwardsLine1x1_1to16plus1(), DrawRightwardsPillar2x4spaced4_1to16(), DrawRightwardsPots2x2_1to16(), DrawRightwardsShelf4x4_1to16(), DrawRightwardsStatue2x3spaced2_1to16(), DrawRightwardsTopCorners1x2_1to16_plus13(), DrawRupeeFloor(), DrawSingle2x2(), DrawSingle4x3(), DrawSingle4x4(), DrawSolidWallDecor3x4(), DrawSomariaLine(), DrawUtility3x5(), DrawUtility6x3(), DrawVerticalTurtleRockPipe(), DrawWaterFace(), DrawWeirdCornerBottom_BothBG(), DrawWeirdCornerTop_BothBG(), and InitializeDrawRoutines().

Here is the call graph for this function:

◆ IsValidTilePosition()

bool yaze::zelda3::ObjectDrawer::IsValidTilePosition ( int tile_x,
int tile_y ) const
protected

Definition at line 4049 of file object_drawer.cc.

References kMaxTilesY.

◆ RoutineDrawsToBothBGs()

◆ MarkBG1Transparent()

void yaze::zelda3::ObjectDrawer::MarkBG1Transparent ( gfx::BackgroundBuffer & bg1,
int tile_x,
int tile_y,
int pixel_width,
int pixel_height )
protected

Mark BG1 pixels as transparent where BG2 overlay objects are drawn.

This creates "holes" in BG1 that allow BG2 content to show through, matching SNES behavior where Layer 1 objects only write to BG2 tilemap.

Parameters
bg1Background layer 1 buffer to mark transparent
tile_xObject X position in tiles
tile_yObject Y position in tiles
pixel_widthWidth of the object in pixels
pixel_heightHeight of the object in pixels

Definition at line 3960 of file object_drawer.cc.

References yaze::gfx::BackgroundBuffer::bitmap(), and LOG_DEBUG.

Referenced by DrawObject().

Here is the call graph for this function:

◆ DrawDoorIndicator()

Member Data Documentation

◆ object_to_routine_map_

std::unordered_map<int16_t, int> yaze::zelda3::ObjectDrawer::object_to_routine_map_
protected

Definition at line 450 of file object_drawer.h.

Referenced by GetDrawRoutineId(), and InitializeDrawRoutines().

◆ draw_routines_

std::vector<DrawRoutine> yaze::zelda3::ObjectDrawer::draw_routines_
protected

Definition at line 451 of file object_drawer.h.

Referenced by DrawObject(), GetDrawRoutineCount(), and InitializeDrawRoutines().

◆ routines_initialized_

bool yaze::zelda3::ObjectDrawer::routines_initialized_ = false
protected

Definition at line 452 of file object_drawer.h.

Referenced by CalculateObjectDimensions(), DrawObject(), and InitializeDrawRoutines().

◆ rom_

Rom* yaze::zelda3::ObjectDrawer::rom_
protected

Definition at line 454 of file object_drawer.h.

Referenced by DrawDoor(), and DrawObject().

◆ room_id_

int yaze::zelda3::ObjectDrawer::room_id_
protected

Definition at line 455 of file object_drawer.h.

Referenced by DrawChest(), and DrawDoorSwitcherer().

◆ current_chest_index_

int yaze::zelda3::ObjectDrawer::current_chest_index_ = 0
mutableprotected

Definition at line 456 of file object_drawer.h.

Referenced by DrawChest(), and ResetChestIndex().

◆ room_gfx_buffer_

const uint8_t* yaze::zelda3::ObjectDrawer::room_gfx_buffer_
protected

Definition at line 458 of file object_drawer.h.

Referenced by DrawDoor(), and WriteTile8().

◆ kMaxTilesX

constexpr int yaze::zelda3::ObjectDrawer::kMaxTilesX = 64
staticconstexprprotected

Definition at line 461 of file object_drawer.h.

◆ kMaxTilesY

constexpr int yaze::zelda3::ObjectDrawer::kMaxTilesY = 64
staticconstexprprotected

Definition at line 462 of file object_drawer.h.

Referenced by IsValidTilePosition().


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