about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--src/subway_map.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/subway_map.cpp b/src/subway_map.cpp index 8364714..408c4f0 100644 --- a/src/subway_map.cpp +++ b/src/subway_map.cpp
@@ -98,6 +98,34 @@ void SubwayMap::OnConnect() {
98 } 98 }
99 } 99 }
100 100
101 if (AP_IsSunwarpShuffle()) {
102 for (const auto &[index, mapping] : AP_GetSunwarpMapping()) {
103 std::ostringstream tag;
104 tag << "sunwarp" << mapping.dots;
105
106 SubwaySunwarp fromWarp;
107 if (index < 6) {
108 fromWarp.dots = index + 1;
109 fromWarp.type = SubwaySunwarpType::kEnter;
110 } else {
111 fromWarp.dots = index - 5;
112 fromWarp.type = SubwaySunwarpType::kExit;
113 }
114
115 SubwaySunwarp toWarp;
116 if (mapping.exit_index < 6) {
117 toWarp.dots = mapping.exit_index + 1;
118 toWarp.type = SubwaySunwarpType::kEnter;
119 } else {
120 toWarp.dots = mapping.exit_index - 5;
121 toWarp.type = SubwaySunwarpType::kExit;
122 }
123
124 tagged[tag.str()].push_back(GD_GetSubwayItemForSunwarp(fromWarp));
125 tagged[tag.str()].push_back(GD_GetSubwayItemForSunwarp(toWarp));
126 }
127 }
128
101 for (const auto &[tag, items] : tagged) { 129 for (const auto &[tag, items] : tagged) {
102 // Pairwise connect all items with the same tag. 130 // Pairwise connect all items with the same tag.
103 for (auto tag_it1 = items.begin(); std::next(tag_it1) != items.end(); 131 for (auto tag_it1 = items.begin(); std::next(tag_it1) != items.end();