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

Editor-level service responsible for overworld entity mutations. More...

#include <entity_mutation_service.h>

Collaboration diagram for yaze::editor::EntityMutationService:

Classes

struct  MutationResult
 

Public Member Functions

 EntityMutationService (zelda3::Overworld &overworld)
 
MutationResult InsertEntity (const std::string &type, ImVec2 pos, int map_id, int game_state)
 Dispatches entity insertion based on type string.
 
MutationResult DeleteItem (const zelda3::OverworldItem &item_identity)
 
MutationResult DeleteSprite (zelda3::Sprite *sprite, int game_state)
 
MutationResult DeleteEntrance (zelda3::OverworldEntrance *entrance)
 
MutationResult DeleteExit (zelda3::OverworldExit *exit)
 
MutationResult DuplicateItem (const zelda3::OverworldItem &source, int offset_x, int offset_y)
 
zelda3::OverworldItemResolveNextSelection (const zelda3::OverworldItem &anchor_identity)
 Resolves the best next item to select after a deletion.
 

Private Attributes

zelda3::Overworldoverworld_
 

Detailed Description

Editor-level service responsible for overworld entity mutations.

This service coordinates high-level entity changes (insertion, deletion, duplication) that involve both domain mutation and UI-related dispatch.

Definition at line 29 of file entity_mutation_service.h.

Constructor & Destructor Documentation

◆ EntityMutationService()

yaze::editor::EntityMutationService::EntityMutationService ( zelda3::Overworld & overworld)
explicit

Definition at line 11 of file entity_mutation_service.cc.

Member Function Documentation

◆ InsertEntity()

EntityMutationService::MutationResult yaze::editor::EntityMutationService::InsertEntity ( const std::string & type,
ImVec2 pos,
int map_id,
int game_state )

◆ DeleteItem()

◆ DeleteSprite()

EntityMutationService::MutationResult yaze::editor::EntityMutationService::DeleteSprite ( zelda3::Sprite * sprite,
int game_state )

Definition at line 96 of file entity_mutation_service.cc.

References yaze::zelda3::Overworld::mutable_sprites(), overworld_, and yaze::editor::EntityMutationService::MutationResult::status.

Here is the call graph for this function:

◆ DeleteEntrance()

◆ DeleteExit()

◆ DuplicateItem()

◆ ResolveNextSelection()

zelda3::OverworldItem * yaze::editor::EntityMutationService::ResolveNextSelection ( const zelda3::OverworldItem & anchor_identity)

Resolves the best next item to select after a deletion.

Definition at line 140 of file entity_mutation_service.cc.

References yaze::editor::FindNearestItemForSelection(), and overworld_.

Here is the call graph for this function:

Member Data Documentation

◆ overworld_

zelda3::Overworld& yaze::editor::EntityMutationService::overworld_
private

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