From 5de975b03c7200cc66188a4b1a76e1213524975d Mon Sep 17 00:00:00 2001 From: jbzdarkid Date: Thu, 1 Nov 2018 20:56:56 -0700 Subject: pain and suffering, but I can read/write decorations & dots. --- Source/RandomizerCore.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'Source/RandomizerCore.cpp') diff --git a/Source/RandomizerCore.cpp b/Source/RandomizerCore.cpp index f14a76f..d4aadef 100644 --- a/Source/RandomizerCore.cpp +++ b/Source/RandomizerCore.cpp @@ -101,10 +101,10 @@ void RandomizerCore::SwapPanels(int panel1, int panel2, int flags) { } for (auto const& [offset, size] : offsets) { - std::vector panel1data = ReadPanelData(panel1, offset, size); - std::vector panel2data = ReadPanelData(panel2, offset, size); - WritePanelData(panel2, offset, panel1data); - WritePanelData(panel1, offset, panel2data); + std::vector panel1data = _memory.ReadPanelData(panel1, offset, size); + std::vector panel2data = _memory.ReadPanelData(panel2, offset, size); + _memory.WritePanelData(panel2, offset, panel1data); + _memory.WritePanelData(panel1, offset, panel2data); } } @@ -114,7 +114,7 @@ void RandomizerCore::ReassignTargets(const std::vector& panels, const std:: // The first panel may not have a wire to power it, so we use the panel ID itself. targets = {panels[0] + 1}; for (const int panel : panels) { - int target = ReadPanelData(panel, TARGET, 1)[0]; + int target = _memory.ReadPanelData(panel, TARGET, 1)[0]; targets.push_back(target); } } @@ -122,18 +122,18 @@ void RandomizerCore::ReassignTargets(const std::vector& panels, const std:: for (size_t i=0; i(panels[order[i]], TARGET, {panelTarget}); + _memory.WritePanelData(panels[order[i]], TARGET, {panelTarget}); } } void RandomizerCore::ReassignNames(const std::vector& panels, const std::vector& order) { std::vector names; for (const int panel : panels) { - names.push_back(ReadPanelData(panel, AUDIO_LOG_NAME, 1)[0]); + names.push_back(_memory.ReadPanelData(panel, AUDIO_LOG_NAME, 1)[0]); } for (int i=0; i(panels[i], AUDIO_LOG_NAME, {names[order[i]]}); + _memory.WritePanelData(panels[i], AUDIO_LOG_NAME, {names[order[i]]}); } } -- cgit 1.4.1