summary refs log tree commit diff stats
path: root/tools
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2025-08-07 21:35:25 -0400
committerStar Rauchenberger <fefferburbia@gmail.com>2025-08-07 21:35:25 -0400
commitbdffc8fe5dda6aa553017cd5bdbccafced225a55 (patch)
tree700abb05d1a35536278fb6e1f7f0c3a98e9aae6a /tools
parentc0c5431800d0306d01814e9902566c9b4fc9220b (diff)
downloadlingo2-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.cpp8
-rw-r--r--tools/datapacker/main.cpp5
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_;