diff options
| author | Star Rauchenberger <fefferburbia@gmail.com> | 2025-08-07 21:35:25 -0400 |
|---|---|---|
| committer | Star Rauchenberger <fefferburbia@gmail.com> | 2025-08-07 21:35:25 -0400 |
| commit | bdffc8fe5dda6aa553017cd5bdbccafced225a55 (patch) | |
| tree | 700abb05d1a35536278fb6e1f7f0c3a98e9aae6a /tools | |
| parent | c0c5431800d0306d01814e9902566c9b4fc9220b (diff) | |
| download | lingo2-archipelago-bdffc8fe5dda6aa553017cd5bdbccafced225a55.tar.gz lingo2-archipelago-bdffc8fe5dda6aa553017cd5bdbccafced225a55.tar.bz2 lingo2-archipelago-bdffc8fe5dda6aa553017cd5bdbccafced225a55.zip | |
Added special IDs
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/assign_ids/main.cpp | 8 | ||||
| -rw-r--r-- | tools/datapacker/main.cpp | 5 |
2 files changed, 13 insertions, 0 deletions
| diff --git a/tools/assign_ids/main.cpp b/tools/assign_ids/main.cpp index 1824c6f..39b532a 100644 --- a/tools/assign_ids/main.cpp +++ b/tools/assign_ids/main.cpp | |||
| @@ -40,6 +40,8 @@ class AssignIds { | |||
| 40 | ProcessMaps(datadir_path); | 40 | ProcessMaps(datadir_path); |
| 41 | 41 | ||
| 42 | WriteIds(ids_path); | 42 | WriteIds(ids_path); |
| 43 | |||
| 44 | std::cout << "Next ID: " << next_id_ << std::endl; | ||
| 43 | } | 45 | } |
| 44 | 46 | ||
| 45 | void ReadIds(std::filesystem::path path) { | 47 | void ReadIds(std::filesystem::path path) { |
| @@ -61,6 +63,12 @@ class AssignIds { | |||
| 61 | } | 63 | } |
| 62 | } | 64 | } |
| 63 | 65 | ||
| 66 | for (const auto& [_, id] : id_mappings_.special()) { | ||
| 67 | if (id > next_id_) { | ||
| 68 | next_id_ = id; | ||
| 69 | } | ||
| 70 | } | ||
| 71 | |||
| 64 | next_id_++; | 72 | next_id_++; |
| 65 | } | 73 | } |
| 66 | 74 | ||
| diff --git a/tools/datapacker/main.cpp b/tools/datapacker/main.cpp index 4b26141..92ff151 100644 --- a/tools/datapacker/main.cpp +++ b/tools/datapacker/main.cpp | |||
| @@ -408,6 +408,11 @@ class DataPacker { | |||
| 408 | } | 408 | } |
| 409 | } | 409 | } |
| 410 | } | 410 | } |
| 411 | |||
| 412 | auto& specials = *container_.all_objects().mutable_special_ids(); | ||
| 413 | for (const auto& [tag, id] : ids.special()) { | ||
| 414 | specials[tag] = id; | ||
| 415 | } | ||
| 411 | } | 416 | } |
| 412 | 417 | ||
| 413 | std::string mapdir_; | 418 | std::string mapdir_; |
