diff options
Diffstat (limited to 'Source/RandomizerCore.cpp')
-rw-r--r-- | Source/RandomizerCore.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Source/RandomizerCore.cpp b/Source/RandomizerCore.cpp index 04bdd11..11802f5 100644 --- a/Source/RandomizerCore.cpp +++ b/Source/RandomizerCore.cpp | |||
@@ -27,6 +27,9 @@ void RandomizerCore::SwapPanels(int panel1, int panel2, int flags) { | |||
27 | if (flags & SWAP_TARGETS) { | 27 | if (flags & SWAP_TARGETS) { |
28 | offsets[TARGET] = sizeof(int); | 28 | offsets[TARGET] = sizeof(int); |
29 | } | 29 | } |
30 | if (flags & SWAP_AUDIO_NAMES) { | ||
31 | offsets[AUDIO_LOG_NAME] = sizeof(void*); | ||
32 | } | ||
30 | if (flags & SWAP_LINES) { | 33 | if (flags & SWAP_LINES) { |
31 | offsets[PATH_COLOR] = 16; | 34 | offsets[PATH_COLOR] = 16; |
32 | offsets[REFLECTION_PATH_COLOR] = 16; | 35 | offsets[REFLECTION_PATH_COLOR] = 16; |
@@ -109,3 +112,14 @@ void RandomizerCore::ReassignTargets(const std::vector<int>& panels, const std:: | |||
109 | WritePanelData<int>(panels[order[i]], TARGET, {panelTarget}); | 112 | WritePanelData<int>(panels[order[i]], TARGET, {panelTarget}); |
110 | } | 113 | } |
111 | } | 114 | } |
115 | |||
116 | void RandomizerCore::ReassignNames(const std::vector<int>& panels, const std::vector<int>& order) { | ||
117 | std::vector<int64_t> names; | ||
118 | for (const int panel : panels) { | ||
119 | names.push_back(ReadPanelData<int64_t>(panel, AUDIO_LOG_NAME, 1)[0]); | ||
120 | } | ||
121 | |||
122 | for (int i=0; i<panels.size(); i++) { | ||
123 | WritePanelData<int64_t>(panels[i], AUDIO_LOG_NAME, {names[order[i]]}); | ||
124 | } | ||
125 | } | ||