yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
entity_operations.h File Reference
#include "absl/status/status.h"
#include "absl/status/statusor.h"
#include "imgui/imgui.h"
#include "zelda3/overworld/overworld.h"
#include "zelda3/overworld/overworld_entrance.h"
#include "zelda3/overworld/overworld_exit.h"
#include "zelda3/overworld/overworld_item.h"
#include "zelda3/sprite/sprite.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  yaze
 
namespace  yaze::editor
 Editors are the view controllers for the application.
 

Functions

absl::StatusOr< zelda3::OverworldEntrance * > yaze::editor::InsertEntrance (zelda3::Overworld *overworld, ImVec2 mouse_pos, int current_map, bool is_hole=false)
 Flat helper functions for entity insertion/manipulation.
 
absl::StatusOr< zelda3::OverworldExit * > yaze::editor::InsertExit (zelda3::Overworld *overworld, ImVec2 mouse_pos, int current_map)
 Insert a new exit at the specified position.
 
absl::StatusOr< zelda3::Sprite * > yaze::editor::InsertSprite (zelda3::Overworld *overworld, ImVec2 mouse_pos, int current_map, int game_state, uint8_t sprite_id=0)
 Insert a new sprite at the specified position.
 
absl::StatusOr< zelda3::OverworldItem * > yaze::editor::InsertItem (zelda3::Overworld *overworld, ImVec2 mouse_pos, int current_map, uint8_t item_id=0)
 Insert a new item at the specified position.
 
absl::Status yaze::editor::RemoveItem (zelda3::Overworld *overworld, const zelda3::OverworldItem *item_ptr)
 Remove an item from the overworld item list by pointer identity.
 
absl::Status yaze::editor::RemoveItemByIdentity (zelda3::Overworld *overworld, const zelda3::OverworldItem &item_identity)
 Remove an item by value identity instead of pointer identity.
 
zelda3::OverworldItemyaze::editor::FindItemByIdentity (zelda3::Overworld *overworld, const zelda3::OverworldItem &item_identity)
 Find a live item by value identity.
 
absl::StatusOr< zelda3::OverworldItem * > yaze::editor::DuplicateItemByIdentity (zelda3::Overworld *overworld, const zelda3::OverworldItem &item_identity, int offset_x=16, int offset_y=0)
 Duplicate an existing item by identity with a positional offset.
 
absl::Status yaze::editor::NudgeItem (zelda3::OverworldItem *item, int delta_x, int delta_y)
 Move an item by pixel deltas with overworld bounds clamping.
 
zelda3::OverworldItemyaze::editor::FindNearestItemForSelection (zelda3::Overworld *overworld, const zelda3::OverworldItem &anchor_identity)
 Find the best next item to keep selection continuity after deletion.
 
uint8_t yaze::editor::GetParentMapId (const zelda3::OverworldMap *map, int current_map)
 Helper to get parent map ID for multi-area maps.
 
ImVec2 yaze::editor::SnapToEntityGrid (ImVec2 pos)
 Snap position to 16x16 grid (standard entity positioning)
 
ImVec2 yaze::editor::ClampToOverworldBounds (ImVec2 pos)
 Clamp position to valid overworld bounds.