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

Handles functional mutations and queries for tile objects. More...

#include <tile_object_handler.h>

Inheritance diagram for yaze::editor::TileObjectHandler:
Collaboration diagram for yaze::editor::TileObjectHandler:

Classes

struct  GhostPreviewGeometry
 

Public Types

enum class  PlacementBlockReason { kNone = 0 , kInvalidRoom , kObjectLimit , kChestValidation }
 
enum class  PlacementPolicy { kRepeat , kOnce }
 
using GhostCapacityState = PlacementCapacityState
 
using ObjectMutationPreflight
 

Public Member Functions

 TileObjectHandler ()
 
 TileObjectHandler (InteractionContext *ctx)
 
void BeginPlacement () override
 Begin placement mode.
 
void CancelPlacement () override
 Cancel current placement.
 
bool IsPlacementActive () const override
 Check if placement mode is active.
 
bool HandleClick (int canvas_x, int canvas_y) override
 Handle mouse click at canvas position.
 
void HandleDrag (ImVec2 current_pos, ImVec2 delta) override
 Handle mouse drag.
 
void HandleRelease () override
 Handle mouse release.
 
bool HandleMouseWheel (float delta) override
 
void DrawGhostPreview () override
 Draw ghost preview during placement.
 
void DrawSelectionHighlight () override
 Draw selection highlight for selected entities.
 
void InitDrag (const ImVec2 &start_pos)
 
void BeginMarqueeSelection (const ImVec2 &start_pos)
 
void HandleMarqueeSelection (const ImVec2 &mouse_pos, bool mouse_left_down, bool mouse_left_released, bool shift_down, bool toggle_down, bool alt_down, bool draw_box=true)
 
std::optional< size_t > GetEntityAtPosition (int canvas_x, int canvas_y) const override
 Get entity at canvas position.
 
bool MoveObjects (int room_id, const std::vector< size_t > &indices, int delta_x, int delta_y, bool notify_mutation=true)
 Move a set of objects by a tile delta.
 
std::vector< size_t > DuplicateObjects (int room_id, const std::vector< size_t > &indices, int delta_x, int delta_y)
 Clone a set of objects and move them by a tile delta.
 
bool DeleteObjects (int room_id, std::vector< size_t > indices)
 Delete objects by indices.
 
bool DeleteAllObjects (int room_id)
 Delete all objects in a room.
 
void SendToFront (int room_id, const std::vector< size_t > &indices)
 Reorder objects.
 
void SendToBack (int room_id, const std::vector< size_t > &indices)
 
void MoveForward (int room_id, const std::vector< size_t > &indices)
 
void MoveBackward (int room_id, const std::vector< size_t > &indices)
 
bool ResizeObjects (int room_id, const std::vector< size_t > &indices, int delta, bool horizontal=false, bool uniform=false)
 Resize objects by a delta. Uniform changes both packed axes; otherwise horizontal selects packed-floor width.
 
bool PlaceObjectAt (int room_id, const zelda3::RoomObject &object, int x, int y)
 Place a new object. Returns false if blocked by ROM limits.
 
void SetPlacementPolicy (PlacementPolicy policy)
 
PlacementPolicy GetPlacementPolicy () const
 
void SetObjectMutationPreflight (ObjectMutationPreflight callback)
 
void SetBeforeObjectCommandCallback (std::function< void()> callback)
 
const absl::Status & mutation_status () const
 
void SetMutationErrorCallback (std::function< void(const absl::Status &)> callback)
 
void SetPlacementCallback (std::function< void(const zelda3::RoomObject &)> callback)
 
bool was_placement_blocked () const
 True if the most recent PlaceObjectAt was blocked.
 
PlacementBlockReason placement_block_reason () const
 
void clear_placement_blocked ()
 
GhostCapacityState GetPlacementGhostCapacityState () const
 
void UpdateObjectsId (int room_id, const std::vector< size_t > &indices, int16_t new_id)
 
void UpdateObjectsSize (int room_id, const std::vector< size_t > &indices, uint8_t new_size)
 
bool UpdateObjectsLayer (int room_id, const std::vector< size_t > &indices, int new_layer)
 
void SetPreviewObject (const zelda3::RoomObject &object)
 Set object for placement.
 
const zelda3::RoomObject & GetPreviewObject () const
 
bool SetPreviewSize (uint8_t size)
 
bool SetPreviewLayer (int layer)
 
void RefreshPreviewGraphics ()
 Refresh graphics without replacing the current placement geometry.
 
const gfx::BackgroundBuffer * ghost_preview_buffer_for_testing () const
 
void CopyObjectsToClipboard (int room_id, const std::vector< size_t > &indices)
 Copy objects to internal clipboard.
 
std::vector< size_t > PasteFromClipboard (int room_id, int offset_x, int offset_y)
 Paste objects from clipboard with offset.
 
std::vector< size_t > PasteFromClipboardAt (int room_id, int target_x, int target_y)
 Paste objects from clipboard at target location. Use first clipboard item as origin.
 
bool HasClipboardData () const
 Check if clipboard has data.
 
void ClearClipboard ()
 Clear the clipboard.
 
- Public Member Functions inherited from yaze::editor::BaseEntityHandler
virtual ~BaseEntityHandler ()=default
 
void SetContext (InteractionContext *ctx)
 Set the interaction context.
 
InteractionContext * context () const
 Get the interaction context.
 
void DrawPostPlacementToast ()
 

Static Public Member Functions

static GhostPreviewGeometry CalculateGhostPreviewGeometry (const zelda3::RoomObject &object)
 Resolve the render anchor and visual extent used by placement previews.
 

Private Member Functions

bool RejectMutation (absl::Status status)
 
bool CommitCandidate (int room_id, std::vector< zelda3::RoomObject > candidate, const std::vector< std::optional< size_t > > &sources, const std::vector< std::optional< chest_data > > &chest_overrides={}, std::optional< std::vector< size_t > > selection=std::nullopt)
 
void RenderGhostPreviewBitmap ()
 
ImVec2 ApplyDragModifiers (const ImVec2 &delta) const
 
void DrawSmartGuides (const std::vector< zelda3::RoomObject > &objects) const
 
zelda3::Room * GetRoom (int room_id)
 
void NotifyChange (zelda3::Room *room)
 

Private Attributes

bool object_placement_mode_ = false
 
PlacementPolicy placement_policy_ = PlacementPolicy::kOnce
 
std::function< void(const zelda3::RoomObject &) placement_callback_ )
 
PlacementBlockReason placement_block_reason_ = PlacementBlockReason::kNone
 
zelda3::RoomObject preview_object_ {-1, 0, 0, 0}
 
std::unique_ptr< gfx::BackgroundBuffer > ghost_preview_buffer_
 
bool ghost_preview_bitmap_ready_ = false
 
bool ghost_preview_create_queued_ = false
 
uint64_t ghost_preview_graphics_revision_ = 0
 
int ghost_preview_room_id_ = -1
 
std::vector< zelda3::RoomObject > clipboard_
 
std::vector< std::optional< chest_data > > clipboard_chests_
 
absl::Status clipboard_status_
 
absl::Status mutation_status_
 
ObjectMutationPreflight object_mutation_preflight_
 
std::function< void()> before_object_command_callback_
 
std::function< void(const absl::Status &) mutation_error_callback_ )
 
bool is_dragging_ = false
 
ImVec2 drag_start_ {0, 0}
 
ImVec2 drag_current_ {0, 0}
 
int drag_last_dx_ = 0
 
int drag_last_dy_ = 0
 
bool drag_has_duplicated_ = false
 
bool drag_mutation_started_ = false
 
std::optional< std::pair< int, int > > drag_rejected_delta_
 

Additional Inherited Members

- Protected Member Functions inherited from yaze::editor::BaseEntityHandler
void TriggerSuccessToast ()
 
void DrawSuccessToastOverlay (const char *msg, ImU32 color) const
 
std::pair< int, int > RoomToCanvas (int room_x, int room_y) const
 Convert room tile coordinates to canvas pixel coordinates.
 
std::pair< int, int > CanvasToRoom (int canvas_x, int canvas_y) const
 Convert canvas pixel coordinates to room tile coordinates.
 
bool IsWithinBounds (int canvas_x, int canvas_y) const
 Check if coordinates are within room bounds.
 
ImVec2 GetCanvasZeroPoint () const
 Get canvas zero point (for screen coordinate conversion)
 
DungeonCanvasTransform GetCanvasTransform () const
 
std::optional< ImVec2 > GetPointerScreenPosition () const
 
bool HasValidContext () const
 Check if context is valid.
 
zelda3::Room * GetCurrentRoom () const
 Get current room (convenience method)
 
- Protected Attributes inherited from yaze::editor::BaseEntityHandler
InteractionContext * ctx_ = nullptr
 
float toast_expire_time_ = 0.0f
 
- Static Protected Attributes inherited from yaze::editor::BaseEntityHandler
static constexpr float kToastDuration = 1.5f
 

Detailed Description

Handles functional mutations and queries for tile objects.

This class abstracts the raw manipulation of zelda3::RoomObject vectors, providing a cleaner API for the UI and future CLI.

Definition at line 25 of file tile_object_handler.h.

Member Typedef Documentation

◆ GhostCapacityState

◆ ObjectMutationPreflight

Initial value:
std::function<absl::Status(int, const std::vector<zelda3::RoomObject>&,
const std::vector<chest_data>&)>

Definition at line 136 of file tile_object_handler.h.

Member Enumeration Documentation

◆ PlacementBlockReason

Enumerator
kNone 
kInvalidRoom 
kObjectLimit 
kChestValidation 

Definition at line 39 of file tile_object_handler.h.

◆ PlacementPolicy

Enumerator
kRepeat 
kOnce 

Definition at line 46 of file tile_object_handler.h.

Constructor & Destructor Documentation

◆ TileObjectHandler() [1/2]

yaze::editor::TileObjectHandler::TileObjectHandler ( )
inline

Definition at line 48 of file tile_object_handler.h.

◆ TileObjectHandler() [2/2]

yaze::editor::TileObjectHandler::TileObjectHandler ( InteractionContext * ctx)
inlineexplicit

Definition at line 49 of file tile_object_handler.h.

References yaze::editor::BaseEntityHandler::SetContext().

Here is the call graph for this function:

Member Function Documentation

◆ BeginPlacement()

void yaze::editor::TileObjectHandler::BeginPlacement ( )
overridevirtual

Begin placement mode.

Called when user selects an entity to place from the palette. Override to initialize placement state.

Implements yaze::editor::BaseEntityHandler.

Definition at line 276 of file tile_object_handler.cc.

References object_placement_mode_, and RenderGhostPreviewBitmap().

Here is the call graph for this function:

◆ CancelPlacement()

void yaze::editor::TileObjectHandler::CancelPlacement ( )
overridevirtual

Cancel current placement.

Called when user presses Escape or switches modes. Override to clean up placement state.

Implements yaze::editor::BaseEntityHandler.

Definition at line 281 of file tile_object_handler.cc.

References object_placement_mode_.

Referenced by yaze::editor::InteractionCoordinator::CancelCurrentMode(), and yaze::editor::InteractionCoordinator::CancelPlacement().

◆ IsPlacementActive()

◆ HandleClick()

bool yaze::editor::TileObjectHandler::HandleClick ( int canvas_x,
int canvas_y )
overridevirtual

◆ HandleDrag()

void yaze::editor::TileObjectHandler::HandleDrag ( ImVec2 current_pos,
ImVec2 delta )
overridevirtual

◆ HandleRelease()

void yaze::editor::TileObjectHandler::HandleRelease ( )
overridevirtual

Handle mouse release.

Called when left mouse button is released after a drag.

Implements yaze::editor::BaseEntityHandler.

Definition at line 425 of file tile_object_handler.cc.

References yaze::editor::BaseEntityHandler::ctx_, drag_has_duplicated_, drag_mutation_started_, is_dragging_, yaze::editor::kTileObjects, and yaze::editor::InteractionContext::NotifyInvalidateCache().

Referenced by yaze::editor::InteractionCoordinator::HandleRelease().

Here is the call graph for this function:

◆ HandleMouseWheel()

◆ DrawGhostPreview()

void yaze::editor::TileObjectHandler::DrawGhostPreview ( )
overridevirtual

◆ DrawSelectionHighlight()

void yaze::editor::TileObjectHandler::DrawSelectionHighlight ( )
overridevirtual

◆ InitDrag()

void yaze::editor::TileObjectHandler::InitDrag ( const ImVec2 & start_pos)

◆ BeginMarqueeSelection()

void yaze::editor::TileObjectHandler::BeginMarqueeSelection ( const ImVec2 & start_pos)

◆ HandleMarqueeSelection()

◆ GetEntityAtPosition()

◆ MoveObjects()

bool yaze::editor::TileObjectHandler::MoveObjects ( int room_id,
const std::vector< size_t > & indices,
int delta_x,
int delta_y,
bool notify_mutation = true )

Move a set of objects by a tile delta.

Returns
True only when an encodable batch changed the room.

Definition at line 819 of file tile_object_handler.cc.

References yaze::editor::BaseEntityHandler::ctx_, yaze::editor::InteractionContext::current_room_id, GetRoom(), yaze::editor::kTileObjects, mutation_status_, NotifyChange(), yaze::editor::InteractionContext::NotifyMutation(), object_mutation_preflight_, and RejectMutation().

Referenced by HandleDrag().

Here is the call graph for this function:

◆ DuplicateObjects()

std::vector< size_t > yaze::editor::TileObjectHandler::DuplicateObjects ( int room_id,
const std::vector< size_t > & indices,
int delta_x,
int delta_y )

Clone a set of objects and move them by a tile delta.

Returns
Indices of the newly created clones.

Definition at line 1021 of file tile_object_handler.cc.

References yaze::zelda3::Chest, yaze::zelda3::IsStatefulChestObjectId(), and yaze::zelda3::UsesRoomObjectStream().

Here is the call graph for this function:

◆ DeleteObjects()

bool yaze::editor::TileObjectHandler::DeleteObjects ( int room_id,
std::vector< size_t > indices )

Delete objects by indices.

Definition at line 1053 of file tile_object_handler.cc.

◆ DeleteAllObjects()

bool yaze::editor::TileObjectHandler::DeleteAllObjects ( int room_id)

Delete all objects in a room.

Definition at line 1076 of file tile_object_handler.cc.

◆ SendToFront()

void yaze::editor::TileObjectHandler::SendToFront ( int room_id,
const std::vector< size_t > & indices )

Reorder objects.

Definition at line 1080 of file tile_object_handler.cc.

◆ SendToBack()

void yaze::editor::TileObjectHandler::SendToBack ( int room_id,
const std::vector< size_t > & indices )

Definition at line 1114 of file tile_object_handler.cc.

◆ MoveForward()

void yaze::editor::TileObjectHandler::MoveForward ( int room_id,
const std::vector< size_t > & indices )

Definition at line 1148 of file tile_object_handler.cc.

◆ MoveBackward()

void yaze::editor::TileObjectHandler::MoveBackward ( int room_id,
const std::vector< size_t > & indices )

Definition at line 1177 of file tile_object_handler.cc.

◆ ResizeObjects()

bool yaze::editor::TileObjectHandler::ResizeObjects ( int room_id,
const std::vector< size_t > & indices,
int delta,
bool horizontal = false,
bool uniform = false )

Resize objects by a delta. Uniform changes both packed axes; otherwise horizontal selects packed-floor width.

Returns
true if at least one editable object changed size.

Definition at line 1206 of file tile_object_handler.cc.

References yaze::zelda3::IsRoomObjectResizable(), yaze::zelda3::ResizeRoomObjectByDelta(), and yaze::zelda3::ResizeRoomObjectUniformlyByDelta().

Referenced by HandleMouseWheel().

Here is the call graph for this function:

◆ PlaceObjectAt()

bool yaze::editor::TileObjectHandler::PlaceObjectAt ( int room_id,
const zelda3::RoomObject & object,
int x,
int y )

Place a new object. Returns false if blocked by ROM limits.

Definition at line 1275 of file tile_object_handler.cc.

References yaze::zelda3::Chest, yaze::zelda3::IsStatefulChestObjectId(), yaze::zelda3::kMaxTileObjects, and yaze::zelda3::UsesRoomObjectStream().

Referenced by HandleClick(), and yaze::editor::DungeonCanvasViewer::HandleRoomCanvasDropTargets().

Here is the call graph for this function:

◆ SetPlacementPolicy()

void yaze::editor::TileObjectHandler::SetPlacementPolicy ( PlacementPolicy policy)
inline

◆ GetPlacementPolicy()

PlacementPolicy yaze::editor::TileObjectHandler::GetPlacementPolicy ( ) const
inline

◆ SetObjectMutationPreflight()

void yaze::editor::TileObjectHandler::SetObjectMutationPreflight ( ObjectMutationPreflight callback)
inline

◆ SetBeforeObjectCommandCallback()

void yaze::editor::TileObjectHandler::SetBeforeObjectCommandCallback ( std::function< void()> callback)
inline

◆ mutation_status()

const absl::Status & yaze::editor::TileObjectHandler::mutation_status ( ) const
inline

Definition at line 147 of file tile_object_handler.h.

References mutation_status_.

◆ SetMutationErrorCallback()

void yaze::editor::TileObjectHandler::SetMutationErrorCallback ( std::function< void(const absl::Status &)> callback)
inline

◆ SetPlacementCallback()

void yaze::editor::TileObjectHandler::SetPlacementCallback ( std::function< void(const zelda3::RoomObject &)> callback)
inline

◆ was_placement_blocked()

bool yaze::editor::TileObjectHandler::was_placement_blocked ( ) const
inline

True if the most recent PlaceObjectAt was blocked.

Definition at line 159 of file tile_object_handler.h.

References kNone, and placement_block_reason_.

◆ placement_block_reason()

PlacementBlockReason yaze::editor::TileObjectHandler::placement_block_reason ( ) const
inline

◆ clear_placement_blocked()

void yaze::editor::TileObjectHandler::clear_placement_blocked ( )
inline

Definition at line 165 of file tile_object_handler.h.

References kNone, and placement_block_reason_.

◆ GetPlacementGhostCapacityState()

TileObjectHandler::GhostCapacityState yaze::editor::TileObjectHandler::GetPlacementGhostCapacityState ( ) const

◆ UpdateObjectsId()

void yaze::editor::TileObjectHandler::UpdateObjectsId ( int room_id,
const std::vector< size_t > & indices,
int16_t new_id )

◆ UpdateObjectsSize()

void yaze::editor::TileObjectHandler::UpdateObjectsSize ( int room_id,
const std::vector< size_t > & indices,
uint8_t new_size )

◆ UpdateObjectsLayer()

bool yaze::editor::TileObjectHandler::UpdateObjectsLayer ( int room_id,
const std::vector< size_t > & indices,
int new_layer )

Definition at line 961 of file tile_object_handler.cc.

References LOG_WARN, and yaze::zelda3::ReassignObjectStorage().

Here is the call graph for this function:

◆ SetPreviewObject()

void yaze::editor::TileObjectHandler::SetPreviewObject ( const zelda3::RoomObject & object)

Set object for placement.

Definition at line 1323 of file tile_object_handler.cc.

◆ GetPreviewObject()

const zelda3::RoomObject & yaze::editor::TileObjectHandler::GetPreviewObject ( ) const
inline

Definition at line 186 of file tile_object_handler.h.

References preview_object_.

◆ SetPreviewSize()

bool yaze::editor::TileObjectHandler::SetPreviewSize ( uint8_t size)

◆ SetPreviewLayer()

bool yaze::editor::TileObjectHandler::SetPreviewLayer ( int layer)

Definition at line 1350 of file tile_object_handler.cc.

References yaze::zelda3::UsesSpecialLayerSelector().

Referenced by yaze::editor::DungeonObjectInteraction::SetPlacementPreviewLayer().

Here is the call graph for this function:

◆ RefreshPreviewGraphics()

void yaze::editor::TileObjectHandler::RefreshPreviewGraphics ( )

Refresh graphics without replacing the current placement geometry.

Definition at line 1363 of file tile_object_handler.cc.

Referenced by yaze::editor::DungeonObjectInteraction::SetCurrentPaletteGroup().

◆ CalculateGhostPreviewGeometry()

TileObjectHandler::GhostPreviewGeometry yaze::editor::TileObjectHandler::CalculateGhostPreviewGeometry ( const zelda3::RoomObject & object)
static

◆ ghost_preview_buffer_for_testing()

const gfx::BackgroundBuffer * yaze::editor::TileObjectHandler::ghost_preview_buffer_for_testing ( ) const
inline

Definition at line 200 of file tile_object_handler.h.

References ghost_preview_buffer_.

◆ CopyObjectsToClipboard()

void yaze::editor::TileObjectHandler::CopyObjectsToClipboard ( int room_id,
const std::vector< size_t > & indices )

Copy objects to internal clipboard.

Definition at line 1466 of file tile_object_handler.cc.

References yaze::zelda3::ChestIndexForObject(), yaze::zelda3::IsStatefulChestObjectId(), and yaze::zelda3::ValidateChestObjectMapping().

Here is the call graph for this function:

◆ PasteFromClipboard()

std::vector< size_t > yaze::editor::TileObjectHandler::PasteFromClipboard ( int room_id,
int offset_x,
int offset_y )

Paste objects from clipboard with offset.

Returns
Indices of newly pasted objects.

Definition at line 1504 of file tile_object_handler.cc.

References yaze::zelda3::Chest, yaze::zelda3::IsStatefulChestObjectId(), and yaze::zelda3::UsesRoomObjectStream().

Here is the call graph for this function:

◆ PasteFromClipboardAt()

std::vector< size_t > yaze::editor::TileObjectHandler::PasteFromClipboardAt ( int room_id,
int target_x,
int target_y )

Paste objects from clipboard at target location. Use first clipboard item as origin.

Definition at line 1540 of file tile_object_handler.cc.

◆ HasClipboardData()

bool yaze::editor::TileObjectHandler::HasClipboardData ( ) const
inline

Check if clipboard has data.

Definition at line 230 of file tile_object_handler.h.

References clipboard_.

◆ ClearClipboard()

void yaze::editor::TileObjectHandler::ClearClipboard ( )
inline

Clear the clipboard.

Definition at line 235 of file tile_object_handler.h.

References clipboard_, clipboard_chests_, and clipboard_status_.

◆ RejectMutation()

bool yaze::editor::TileObjectHandler::RejectMutation ( absl::Status status)
private

◆ CommitCandidate()

bool yaze::editor::TileObjectHandler::CommitCandidate ( int room_id,
std::vector< zelda3::RoomObject > candidate,
const std::vector< std::optional< size_t > > & sources,
const std::vector< std::optional< chest_data > > & chest_overrides = {},
std::optional< std::vector< size_t > > selection = std::nullopt )
private

◆ RenderGhostPreviewBitmap()

◆ ApplyDragModifiers()

ImVec2 yaze::editor::TileObjectHandler::ApplyDragModifiers ( const ImVec2 & delta) const
private

Definition at line 441 of file tile_object_handler.cc.

Referenced by HandleDrag().

◆ DrawSmartGuides()

◆ GetRoom()

◆ NotifyChange()

void yaze::editor::TileObjectHandler::NotifyChange ( zelda3::Room * room)
private

Member Data Documentation

◆ object_placement_mode_

bool yaze::editor::TileObjectHandler::object_placement_mode_ = false
private

◆ placement_policy_

PlacementPolicy yaze::editor::TileObjectHandler::placement_policy_ = PlacementPolicy::kOnce
private

Definition at line 244 of file tile_object_handler.h.

Referenced by GetPlacementPolicy(), and SetPlacementPolicy().

◆ placement_callback_

std::function<void(const zelda3::RoomObject&) yaze::editor::TileObjectHandler::placement_callback_)
private

Definition at line 245 of file tile_object_handler.h.

Referenced by SetPlacementCallback().

◆ placement_block_reason_

PlacementBlockReason yaze::editor::TileObjectHandler::placement_block_reason_ = PlacementBlockReason::kNone
private

◆ preview_object_

zelda3::RoomObject yaze::editor::TileObjectHandler::preview_object_ {-1, 0, 0, 0}
private

◆ ghost_preview_buffer_

std::unique_ptr<gfx::BackgroundBuffer> yaze::editor::TileObjectHandler::ghost_preview_buffer_
private

Definition at line 248 of file tile_object_handler.h.

Referenced by DrawGhostPreview(), and ghost_preview_buffer_for_testing().

◆ ghost_preview_bitmap_ready_

bool yaze::editor::TileObjectHandler::ghost_preview_bitmap_ready_ = false
private

Definition at line 249 of file tile_object_handler.h.

Referenced by DrawGhostPreview().

◆ ghost_preview_create_queued_

bool yaze::editor::TileObjectHandler::ghost_preview_create_queued_ = false
private

Definition at line 250 of file tile_object_handler.h.

◆ ghost_preview_graphics_revision_

uint64_t yaze::editor::TileObjectHandler::ghost_preview_graphics_revision_ = 0
private

Definition at line 251 of file tile_object_handler.h.

Referenced by DrawGhostPreview().

◆ ghost_preview_room_id_

int yaze::editor::TileObjectHandler::ghost_preview_room_id_ = -1
private

Definition at line 252 of file tile_object_handler.h.

Referenced by DrawGhostPreview().

◆ clipboard_

std::vector<zelda3::RoomObject> yaze::editor::TileObjectHandler::clipboard_
private

Definition at line 255 of file tile_object_handler.h.

Referenced by ClearClipboard(), and HasClipboardData().

◆ clipboard_chests_

std::vector<std::optional<chest_data> > yaze::editor::TileObjectHandler::clipboard_chests_
private

Definition at line 256 of file tile_object_handler.h.

Referenced by ClearClipboard().

◆ clipboard_status_

absl::Status yaze::editor::TileObjectHandler::clipboard_status_
private

Definition at line 257 of file tile_object_handler.h.

Referenced by ClearClipboard().

◆ mutation_status_

absl::Status yaze::editor::TileObjectHandler::mutation_status_
private

◆ object_mutation_preflight_

ObjectMutationPreflight yaze::editor::TileObjectHandler::object_mutation_preflight_
private

Definition at line 259 of file tile_object_handler.h.

Referenced by CommitCandidate(), MoveObjects(), and SetObjectMutationPreflight().

◆ before_object_command_callback_

std::function<void()> yaze::editor::TileObjectHandler::before_object_command_callback_
private

Definition at line 260 of file tile_object_handler.h.

Referenced by CommitCandidate(), and SetBeforeObjectCommandCallback().

◆ mutation_error_callback_

std::function<void(const absl::Status&) yaze::editor::TileObjectHandler::mutation_error_callback_)
private

Definition at line 261 of file tile_object_handler.h.

Referenced by RejectMutation(), and SetMutationErrorCallback().

◆ is_dragging_

bool yaze::editor::TileObjectHandler::is_dragging_ = false
private

Definition at line 273 of file tile_object_handler.h.

Referenced by DrawSelectionHighlight(), HandleDrag(), HandleRelease(), and InitDrag().

◆ drag_start_

ImVec2 yaze::editor::TileObjectHandler::drag_start_ {0, 0}
private

Definition at line 274 of file tile_object_handler.h.

Referenced by HandleDrag(), and InitDrag().

◆ drag_current_

ImVec2 yaze::editor::TileObjectHandler::drag_current_ {0, 0}
private

Definition at line 275 of file tile_object_handler.h.

Referenced by HandleDrag(), and InitDrag().

◆ drag_last_dx_

int yaze::editor::TileObjectHandler::drag_last_dx_ = 0
private

Definition at line 276 of file tile_object_handler.h.

Referenced by HandleDrag(), and InitDrag().

◆ drag_last_dy_

int yaze::editor::TileObjectHandler::drag_last_dy_ = 0
private

Definition at line 277 of file tile_object_handler.h.

Referenced by HandleDrag(), and InitDrag().

◆ drag_has_duplicated_

bool yaze::editor::TileObjectHandler::drag_has_duplicated_ = false
private

Definition at line 278 of file tile_object_handler.h.

Referenced by HandleRelease(), and InitDrag().

◆ drag_mutation_started_

bool yaze::editor::TileObjectHandler::drag_mutation_started_ = false
private

Definition at line 279 of file tile_object_handler.h.

Referenced by HandleDrag(), HandleRelease(), and InitDrag().

◆ drag_rejected_delta_

std::optional<std::pair<int, int> > yaze::editor::TileObjectHandler::drag_rejected_delta_
private

Definition at line 280 of file tile_object_handler.h.

Referenced by HandleDrag(), and InitDrag().


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