Remove built-in stop and done events
Events are plain again: no built-in names offered, locked or listed in the Events window, and the game's copy of a trigger keeps its first event. The list rows' rename lock and event_id_resolve go with them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
5f01e8065d
commit
4141c53681
12 files changed
+21
-112
No files matched your search
@@ -22,18 +22,6 @@ namespace anm2ed::edit
|
||||
}
|
||||
}
|
||||
|
||||
// An event id from a choice: a built-in event not yet in the file is added (or found by name) first.
|
||||
int event_id_resolve(Model& model, int id)
|
||||
{
|
||||
auto index = EVENT_BUILT_IN_ID_FIRST - id;
|
||||
if (index < 0 || index >= (int)std::size(EVENT_BUILT_INS)) return id;
|
||||
auto& events = model.content.events;
|
||||
std::string name(EVENT_BUILT_INS[index]);
|
||||
auto event = std::ranges::find(events, name, &Event::name);
|
||||
if (event != events.end()) return event->id;
|
||||
return events.emplace_back(Event{.id = item_next_id_get(events), .name = name}).id;
|
||||
}
|
||||
|
||||
bool is_region_matched(const Region& region, const Frame& frame)
|
||||
{
|
||||
return glm::ivec2(region.crop) == glm::ivec2(frame.crop) && glm::ivec2(region.size) == glm::ivec2(frame.size) &&
|
||||
|
||||
@@ -137,7 +137,6 @@ namespace anm2ed::edit
|
||||
std::optional<resource::Image> spritesheet_pack(model::Model&, int, const resource::Image&, int);
|
||||
std::optional<resource::Image> spritesheets_merge(model::Model&, const std::set<int>&, const ImageGet&, bool, bool,
|
||||
bool, Origin);
|
||||
int event_id_resolve(model::Model&, int);
|
||||
|
||||
// Where a spritesheet path of a document (this one, or a library) points, from this document.
|
||||
using SpritesheetPathGet = std::function<std::filesystem::path(const model::Model&, const std::filesystem::path&)>;
|
||||
|
||||
Reference in new issue
Block a user